summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/smb_nfs/howtos/en/index.html
blob: 004b4f40349b17bdeffaf57ff3436bea55a50321 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<html>

<head>
<meta http-equiv="content-type" content="text/html" charset="utf-8">
<title>smb_nfs</title>
</head>

<body>
	<h1>smb_nfs</h1>
	
	<h2>Quick guide</h2>
		<p>
			Set-up two virtual computers - SimpleArbiterDhcp and FileServer.
		</p>
		<p>
			Make sure that the directory /srv/nfs/ERLbbBrT on FileServer is accessible
			over NFS and over SMB under the sharename urania-03.
			Set the SMB server name to zarptica-32.
		</p>
		<p>
			SimpleArbiterDhcp should have write access to /srv/nfs/ERLbbBrT over NFS.
		</p>

	<h2>Instructions</h2>
	
	<ul style="list-style: none;">
		<li><b>Download these VM images:</b>
			<ul type="disc">
				<li>
					<a href="http://kpov.fri.uni-lj.si/kpov-disks/jm9632@student.uni-lj.si/07-preparation-smb_nfs/student-fileserver.vdi">student-fileserver.vdi</a>
				</li>
				<li>
					<a href="http://kpov.fri.uni-lj.si/kpov-disks/jm9632@student.uni-lj.si/07-preparation-smb_nfs/simpleArbiterDhcpGW.vdi">simpleArbiterDhcpGW.vdi</a>
				</li>
				<br>
			</ul>
		</li>

		<li><b>VirtualBox Settings:</b>
			<ul type="disc">
				<li>enable PAE/NX for both VMs: Settings&rArr;System&rArr;Processor</li>
				<li>for FileServer
					<ul>
						<li>Adapter 1 - NAT</li>
						<li>Adapter 2 - Internal network</li>
					</ul>
				</li>
				<li>for SimpleArbiterDhcp
					<ul>
						<li>Adapter 1 - Internal Network</li>
					</ul>
				</li>
			</ul>
		</li>
		
		<br>

		<li><b>Server FileServer</b>
			<ol>
				<li>Set-up a DHCP server
					<ol>
						<li>apt-get update</li>
						<li>apt-get install isc-dhcp-server</li>
						<li>The server will not start (error <i>Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!</i>), configure 3 files:
							<ul>
								<li>in /etc/network/interfaces set static IP for eth1 on which the DHCP server will be running,
								e.g.:
									<p style="font-family:Courier New; font-size:12">
										auto eth1<br>
										iface eth1 inet static<br>
										address 192.168.1.10<br>
										netmask 255.255.255.0<br>
										network 192.168.1.0<br>
										broadcast 192.168.1.255<br>
									</p>
								</li>

								<li>in /etc/default/isc-dhcp-server:
									<p style="font-family:Courier New; font-size:12">
										INTERFACES="eth1"
									</p>
								</li>

								<li>in /etc/dhcp/dhcpd.conf configure the subnet properties,
								e.g.:
									<p style="font-family:Courier New; font-size:12">
										authoritative;<br>
										default-lease-time 600;<br>
										max-lease-time 7200;<br>
										<br>
										subnet 192.168.1.0 netmask 255.255.255.0 {<br>
										range 192.168.1.100 192.168.1.200;<br>
										option routers 192.168.1.10;<br>
										option domain-name-servers 193.2.1.66, 8.8.4.4;<br>
										<br>
										host SimpleArbiter {<br>
												hardware ethernet 08:00:27:A2:FB:B4;<br>
												fixed-address 192.168.1.180;<br>
											}<br>
										}<br>
									</p>
								</li>

							</ul>	
						</li>

					</ol>
				</li>

				<li>Set-up a NFS server
					<ol>
						<li>apt-get install nfs-kernel-server</li>
						<li>Determine the rules in /etc/exports,npt.:
							<p style="font-family:Courier New; font-size:12">
								/srv/nfs/ERLbbBrT 192.168.1.0/24(ro,sync,no_subtree_check)<br>
								#privileges for SimpleArbiterDhcp<br>
								/srv/nfs/ERLbbBrT 192.168.1.180/24(rw,sync,no_subtree_check)<br>
							</p>
						</li>
					</ol>
				</li>

			</ol>
		</li>

		<li><b>Client SimpleArbiterDhcp</b>
			<ul type="disc">
				<li>as root: run the command mount -t nfs nfs_server_ip:shared_dir dest, e.g.:
					<p style="font-family:Courier New; font-size:12">
						mount -t -nfs 192.168.1.10:/srv/nfs/ERLbbBrT shared
					</p>
				</li>
			</ul>
		</li>

	</ul>

</body>
</html>