summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/smb_nfs/howtos/si/index.html
blob: 80d910debf2701cd2306ac2d455a7951f68fb212 (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
70
71
<!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>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>Virtualni računalniki</h2>
    <ul>
        <li>simpleArbiterDhcpGW</li>
        <li>student-fileserver</li>
    </ul>
    <h3>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>student-fileserver</h3>
    <p>Naj ima 1 omrežni vmesnik, povezan na interno omrežje “<i>intnet</i>”.</p>
    <h2>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>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">&amp;&amp;</span> <span class="ex">apt-get</span> install nfs-kernel-server samba</code></pre></div>
    <h3>Nastavitve NFS</h3>
    <p>V datoteki <code>/etc/exports</code> dodamo sledečo vrtstico: <code>/srv/nfs/[dir] [IP simpleArbiterDhcpGW](rw)</code>.</p> <p>Datoteko shranimo in znova poženemo NFS strežnik.</p>
    <div class="sourceCode"><pre class="sourceCode bash"><span class="ex">service</span> nfs-kernel-server restart</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">
<span class="fu">mkdir</span> /srv/nfs/[dir]
<span class="fu">chmod</span> oug+w /srv/nfs/[dir]
</pre>
    </div>
    <h3>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"><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</pre></div>
    <p>Ko popravimo to datoteko restartamo SMB in NetBios s spodnjima ukazoma.</p>
    <div class="sourceCode"><pre class="sourceCode bash"><span class="ex">service</span> smbd restart
<span class="ex">service</span> nmbd restart</pre></div>
    <h2>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"><span class="ex">./test_task.py</span></pre></div>

</body>

</html>