blob: 0c268b86dfedba97e391d6073057c1f143ffe966 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
<DOCTYPE html>
<html lang="sl">
<head>
<title>SMB NFS How To</title>
<meta charset="utf-8" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body class="container">
<h1 id="kpov-judge-7-smb-nfs">KPOV Judge 7 (SMB NFS)</h1>
<p>V tej vaji postavimo na linux-u strežnik za nudenje datotek prek mreže in strežnik za SMB, s katerim lahko na Windows sistemih postavimo datoteko v skupno rabo. Pazi da bo simpleArbiterDhcpGW imel NFS pravico pisanja po imeniku!</p>
<h2 id="virtualni-računalniki">Virtualni računalniki</h2>
<ul>
<li>simpleArbiterDhcpGW</li>
<li>student-fileserver</li>
</ul>
<h3 id="simplearbiterdhcpgw">simpleArbiterDhcpGW</h3>
<p>Naj ima 2 omrežna vmesnika, prvi naj bo preko NAT povezan na svetovni splet, drugi vmesnik pa naj vsebuje interno povezavo znotraj virtualnih sistemov na tvojem računalniku “<i>intnet</i>”.</p>
<h3 id="student-fileserver">student-fileserver</h3>
<p>Naj ima 1 omrežni vmesnik, povezan na interno omrežje “<i>intnet</i>”.</p>
<h2 id="parametri">Parametri</h2>
<div class="figure">
<img src="../images/parameters.png" alt="Parametri" />
<p class="caption">Parametri za reševanje naloge</p>
</div>
<p>Tokrat imamo tri parametre. “Imenovani” <strong>dir</strong>, <strong>smb-share</strong>, <strong>smb-server</strong>.</p>
<p>Oziroma iz slike so to: </p>
<ul>
<li><strong>dir</strong> = TeNVU74X</li>
<li><strong>smb-share</strong> = aurora-85</li>
<li><strong>smb-server</strong> = melete-04</li>
</ul>
<h2 id="postopek">Postopek</h2>
<p>Ko zaženemo simpleArbiterDhcpGW in student-fileserver se najprej prijavimo v oba sistema. Nato pa na student-fileserver poženemo</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">apt-get</span> update <span class="kw">&&</span> <span class="ex">apt-get</span> install nfs-kernel-server samba</code></pre></div>
<h3 id="nastavitve-nfs">Nastavitve NFS</h3>
<p>V datoteki <code>/etc/exports</code> dodamo sledečo vrtstico: <br /><code>/srv/nfs/[dir] [IP simpleArbiterDhcpGW](rw)</code>. <br /><br /> Datoteko shranimo in znova poženemo NFS strežnik.</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">service</span> nfs-kernel-server restart</code></pre></div>
<p>Ustvarimo imenik, ki smo ga malce prej navedli v nastavitvah NFS. In nato omogočimo vsem pisanje po tem imeniku.</p>
<div class="sourceCode">
<pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">mkdir</span> /srv/nfs/[dir]</code></pre>
<pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">chmod</span> oug+w /srv/nfs/[dir]</code></pre>
</div>
<h3 id="nastavitve-smb">Nastavitve SMB</h3>
<p>Vse nastavitvene datoteke SMB se nahajajo v imeniku: <code>/etc/samba</code>. Zanima pa nas datoteka <code>smb.conf</code>.</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># Datoteka smb.conf</span>
[<span class="ex">global</span>]
<span class="ex">workgroup</span> = WORKGROUP
<span class="ex">netbios</span> name = [smb-server] <span class="co"># Nadomestek DNS, ki si ga je izmislil Microsoft</span>
<span class="co"># Malce nižje pod vrstico =========== Share Definitions =========== dodamo svoje nastavitve</span>
[[<span class="ex">smb-share</span>]] <span class="co"># Primer iz slike: [aurora-85]</span>
<span class="ex">path</span> = /srv/nfs/[dir]
<span class="bu">read</span> <span class="va">only</span> <span class="va">=</span> <span class="va">no</span>
<span class="ex">guest</span> ok = yes
<span class="ex">browseable</span> = yes</code></pre></div>
<p>Ko popravimo to datoteko restartamo SMB in NetBios s spodnjima ukazoma.</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">service</span> smbd restart</code></pre>
<pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">service</span> nmbd restart</code></pre></div>
<h2 id="testiranje">Testiranje</h2>
<p>Sedaj samo še testiranje :) Za to pa na <strong>simpleArbiterDhcpGW</strong> poženi testno skripto.</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">./test_task.py</span></code></pre></div>
</body>
</html>
|