<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mars.merhot.dk/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Minoo</id>
		<title>Teknologisk videncenter - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://mars.merhot.dk/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Minoo"/>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php/Special:Contributions/Minoo"/>
		<updated>2026-04-22T13:32:42Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/makefile_script&amp;diff=28422</id>
		<title>Cluster der kan alt/makefile script</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/makefile_script&amp;diff=28422"/>
				<updated>2014-10-31T07:57:05Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: Created page with &amp;quot;&amp;lt;source lang=cli&amp;gt; CC := g++ CUDACC := /usr/local/cuda-6.5/bin/nvcc LINKER := /usr/local/cuda-6.5/bin/nvcc CCFLAGS := -Wall CUDAFLAGS := -arch sm_21 LINKFLAGS := -link CCSRC := in...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
CC := g++&lt;br /&gt;
CUDACC := /usr/local/cuda-6.5/bin/nvcc&lt;br /&gt;
LINKER := /usr/local/cuda-6.5/bin/nvcc&lt;br /&gt;
CCFLAGS := -Wall&lt;br /&gt;
CUDAFLAGS := -arch sm_21&lt;br /&gt;
LINKFLAGS := -link&lt;br /&gt;
CCSRC := integrateMain.c&lt;br /&gt;
CUDASRC := integrate.cu&lt;br /&gt;
INC := &lt;br /&gt;
TARGET := integrate&lt;br /&gt;
&lt;br /&gt;
$(TARGET) : $(patsubst %.c, %.o, $(CCSRC)) $(patsubst %.cu, %.o, $(CUDASRC))&lt;br /&gt;
	$(LINKER) $(LINKFLAGS) -o $@ $^&lt;br /&gt;
&lt;br /&gt;
%.o : %.c $(INC)&lt;br /&gt;
	$(CC) $(CCFLAGS) -c -o $@ $&amp;lt;&lt;br /&gt;
&lt;br /&gt;
%.o : %.cu $(INC)&lt;br /&gt;
	$(CUDACC) $(CUDAFLAGS) -c -o $@ $&amp;lt;&lt;br /&gt;
&lt;br /&gt;
clean :&lt;br /&gt;
	rm -f *.o *~&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28421</id>
		<title>Cluster der kan alt</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt&amp;diff=28421"/>
				<updated>2014-10-31T07:38:54Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Udvikling fase 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}} &lt;br /&gt;
&lt;br /&gt;
= Introduktion =&lt;br /&gt;
&lt;br /&gt;
At udvikle et [[Ubuntu]] cluster installationsmetode og implementere den fysisk således at programmer kan afvikles. &lt;br /&gt;
&lt;br /&gt;
= metode =&lt;br /&gt;
&lt;br /&gt;
Installationsmetoden udvikles på [[ESXi]] og implementeres på de fysiske servere. &lt;br /&gt;
&lt;br /&gt;
= Mål =&lt;br /&gt;
&lt;br /&gt;
*En master &lt;br /&gt;
*minimum to noder &lt;br /&gt;
*automatiseret installation af noder. (Så godt som muligt) &lt;br /&gt;
*automatiseret oprettelse af brugere [[LDAP]] eller [[NIS Ubuntu|NIS]] &lt;br /&gt;
*[[MPI]]&lt;br /&gt;
&lt;br /&gt;
==Lab environment on local PC==&lt;br /&gt;
&lt;br /&gt;
'''LAST UPDATE AUTUMN 2014 (pre-course edits)''' Comments, corrections and additions welcome! :-)&lt;br /&gt;
&lt;br /&gt;
This lab environment is build upon the virtual platform VMware Workstation and Ubuntu-Server 14.04.1 64Bit (ubuntu-14.04.1-server-amd64.iso) as cluster and nodes OS. Ubuntu server can be downloaded [http://www.ubuntu.com/download/server| here]&lt;br /&gt;
&lt;br /&gt;
This guide will guide you though how to build a virtual Linux/Ubuntu cluster lab environment on your local machine. This environment can later be implemented on the real cluster.&lt;br /&gt;
&lt;br /&gt;
*[[/Oprettelse af master og nodes maskiner|Create master and nodes machine]]&lt;br /&gt;
'''Master installation and configuration'''&lt;br /&gt;
#[[/Installation af master|Install master]]&lt;br /&gt;
#[[/Install DHCP server|Install and configure DHCP server]]&lt;br /&gt;
#[[/Install DNS server|Install and configure DNS server]]&lt;br /&gt;
#[[/Routing NAT and NIS|Configure Routing, NAT and NIS]]&lt;br /&gt;
#[[/PXE and Kickstart|PXE and Kickstart configuration]]&lt;br /&gt;
#[[/Configure NFS server, Apt cacher and SSH auto login|Install and configure NFS server, apt-cacher and SSH auto login]]&lt;br /&gt;
#[[/Multi Router Traffic Grapher|Install and configure Multi Router Traffic Grapher - MRTG]] - doesn't work properly&lt;br /&gt;
#[[/DSH and MPI|Install and configure DSH and OpenMPI]]&lt;br /&gt;
#[[/OpenCV|Install and configure OpenCV]]&lt;br /&gt;
'''Nodes installation and configuration'''&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 1 ==&lt;br /&gt;
&lt;br /&gt;
#Installer [[ESXi]] &lt;br /&gt;
#[[/Ubuntu Master|Installer Ubuntu Master]] &lt;br /&gt;
#[[/DHCP server|Installer og konfigurer DHCP server]] &lt;br /&gt;
#[[/DNS Server|Installer og konfigurer DNS server]] &lt;br /&gt;
#[[/Routning og NAT|Routening og NAT gennem Master]] &lt;br /&gt;
#[[/LDAP eller NIS|LDAP eller NIS til user login på noder]] &lt;br /&gt;
#[[/Tilføjelse af ny klient|Tilføjelse af ny klient]] &lt;br /&gt;
#[[/PXE installation af noder|PXE installation af noder]] &lt;br /&gt;
#[[/NFS Server|NFS Server til netværk shares ]] &lt;br /&gt;
#[[/apt-cacher installation|apt-cacher installation]] &lt;br /&gt;
#[[/Auto SSH|Auto SSH login på noder uden at skrive pass]] &lt;br /&gt;
#[[/Kickstart fil til installation af noder|Kickstart fil til installation af noder]] &lt;br /&gt;
#[[/Overvågning med MRTG|Overvågning med MRTG]] &lt;br /&gt;
#[[/dsh|Distributed Shell dsh]] &lt;br /&gt;
#[[/mpi|Installation af openMPI og MPICH]] &lt;br /&gt;
#[[Installation af OpenCV]] &lt;br /&gt;
#[[InfiniBand]]&lt;br /&gt;
&lt;br /&gt;
=== Test af head installation på fysisk maskine ===&lt;br /&gt;
&lt;br /&gt;
#[[/Installation af head node|Installation af head node]] &lt;br /&gt;
#[[/Installation af CUDA|Installation af CUDA]] &lt;br /&gt;
#[http://www.raben.com/content/opencv-installation-ubuntu-1204 Installation of OpenCV]&lt;br /&gt;
#[[/makefile script |Makefile]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 2 ==&lt;br /&gt;
&lt;br /&gt;
#Tilpasning af SW og konfigurationsfiler til noder&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 3 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af [[SAN]]&lt;br /&gt;
&lt;br /&gt;
== Udvikling fase 4 ==&lt;br /&gt;
&lt;br /&gt;
#Installation af fysiske maskiner&lt;br /&gt;
&lt;br /&gt;
= Netværk =&lt;br /&gt;
&lt;br /&gt;
*Qlogic switch &lt;br /&gt;
**Telnet eller http: til 172.16.4.11 (username '''admin''' password '''adminpass''') &lt;br /&gt;
*3550 Gb switch &lt;br /&gt;
**Telnet til 172.16.4.88 password '''cisco'''&lt;br /&gt;
&lt;br /&gt;
= Hastighed =&lt;br /&gt;
&lt;br /&gt;
Infinibands hastighed er 4.38 Gbits/sec &lt;br /&gt;
&lt;br /&gt;
= Harddisk partitionering =&lt;br /&gt;
&lt;br /&gt;
På det rigtige cluster er partitioneringen lavet som følger: &lt;br /&gt;
&lt;br /&gt;
;/&lt;br /&gt;
:ext4 5GB &lt;br /&gt;
;/tmp&lt;br /&gt;
:ext4 10GB &lt;br /&gt;
;/var&lt;br /&gt;
:ext4 15GB &lt;br /&gt;
;/boot&lt;br /&gt;
:ext4 2GB &lt;br /&gt;
;/usr&lt;br /&gt;
:ext4 50GB &lt;br /&gt;
;swap&lt;br /&gt;
:swap 2xRAM &lt;br /&gt;
;/home&lt;br /&gt;
:ext4 resterende plads - 10GB&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[Weekend Projekt - Test Cluster]] &lt;br /&gt;
*[[NIS Ubuntu]] &lt;br /&gt;
*[http://coen.boisestate.edu/ece/files/2013/05/Rasp.-Pi.pdf RPi Cluster] -&amp;amp;gt; [http://www.youtube.com/watch?v=i_r3z1jYHAc YouTube Video]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Kickstart_fil_til_installation_af_noder&amp;diff=28420</id>
		<title>Cluster der kan alt/Kickstart fil til installation af noder</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Kickstart_fil_til_installation_af_noder&amp;diff=28420"/>
				<updated>2014-10-31T07:22:40Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Kickstart fil */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*Der skal anvendes en http: server således at noderne kan hente kickstart filen. Anvend for ekempel '''lighttpd'''&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install lighttpd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*For at lave kickstart filer kan i ''håndlave'' dem i en editor eller anvende '''system-config-kickstart'''&lt;br /&gt;
&lt;br /&gt;
For at bruge '''system-config-kickstart''' skal du installere det med kommando'en&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install system-config-kickstart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For at du kan bruge '''sytem-config-kickstart''' skal du have installeret Xming på din windows pc. Du kan hente Xming på dette link: &lt;br /&gt;
http://sourceforge.net/projects/xming/&lt;br /&gt;
&lt;br /&gt;
==Putty Opsætning==&lt;br /&gt;
[[File:Putty-Xming-setup.png|350px]]&lt;br /&gt;
&lt;br /&gt;
==System-config-kickstart==&lt;br /&gt;
&lt;br /&gt;
Kør Kommando'en nedenfor for at starte med at lave din kickstart fil.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
system-config-kickstart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
:#så får du et grafisk window pop up til opsætning af en kickstart fil&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Filenplacering'''&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
/var/www/ks.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Kickstart fil==&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#Generated by Kickstart Configurator&lt;br /&gt;
#platform=x86&lt;br /&gt;
&lt;br /&gt;
#System language&lt;br /&gt;
lang da_DK&lt;br /&gt;
#Language modules to install&lt;br /&gt;
langsupport da_DK&lt;br /&gt;
#System keyboard&lt;br /&gt;
keyboard dk&lt;br /&gt;
#System mouse&lt;br /&gt;
mouse&lt;br /&gt;
#System timezone&lt;br /&gt;
timezone Europe/Copenhagen&lt;br /&gt;
#Root password&lt;br /&gt;
rootpw --iscrypted $1$AkUb1qdI$vMYeX3C37RX0pRjBppX7W.&lt;br /&gt;
#Initial user&lt;br /&gt;
user cluster --fullname &amp;quot;cluster admin&amp;quot; --iscrypted --password $1$9Za4QvWX$AXgp$&lt;br /&gt;
#Reboot after installation&lt;br /&gt;
reboot&lt;br /&gt;
#Use text mode install&lt;br /&gt;
text&lt;br /&gt;
#Install OS instead of upgrade&lt;br /&gt;
install&lt;br /&gt;
#Use Web installation&lt;br /&gt;
url --url http://mirror.tekkom.dk/ubuntu/&lt;br /&gt;
#System bootloader configuration&lt;br /&gt;
bootloader --location=mbr&lt;br /&gt;
#Clear the Master Boot Record&lt;br /&gt;
zerombr yes&lt;br /&gt;
#Partition clearing information&lt;br /&gt;
clearpart --all --initlabel&lt;br /&gt;
#Disk partitioning information&lt;br /&gt;
part / --fstype ext4 --size 1024&lt;br /&gt;
part /boot --fstype ext4 --size 512&lt;br /&gt;
part /home --fstype ext4 --size 1024&lt;br /&gt;
part /var --fstype ext4 --size 3072&lt;br /&gt;
part /tmp --fstype ext4 --size 3072&lt;br /&gt;
part /usr --fstype ext4 --size 5120&lt;br /&gt;
part swap --size 1024&lt;br /&gt;
#System authorization infomation&lt;br /&gt;
auth  --useshadow  --enablemd5  --enablenis --nisdomain dka.local --nisserver 1$&lt;br /&gt;
#Network information&lt;br /&gt;
network --bootproto=dhcp --device=eth0&lt;br /&gt;
#Firewall configuration&lt;br /&gt;
firewall --disabled&lt;br /&gt;
#Do not configure the X Window System&lt;br /&gt;
skipx&lt;br /&gt;
#Package install information&lt;br /&gt;
%packages&lt;br /&gt;
openssh-server&lt;br /&gt;
nmap&lt;br /&gt;
ssh&lt;br /&gt;
screen&lt;br /&gt;
bmon&lt;br /&gt;
iperf&lt;br /&gt;
bonnie++&lt;br /&gt;
lmbench&lt;br /&gt;
lm-sensors&lt;br /&gt;
snmpd&lt;br /&gt;
snmp&lt;br /&gt;
build-essential&lt;br /&gt;
gcc&lt;br /&gt;
openssh-client&lt;br /&gt;
nfs-common&lt;br /&gt;
mpich2&lt;br /&gt;
dsh&lt;br /&gt;
portmap&lt;br /&gt;
nis&lt;br /&gt;
%pre&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo &amp;quot;Pre-installation&amp;quot;&lt;br /&gt;
#Hostname, Dette script sætter hostname hvis den kan lave en reverse lookup på fra DNS, hvis DHCP er sat up&lt;br /&gt;
IP=$(hostname -I | awk '{print $1}')&lt;br /&gt;
Host=$(host $IP | awk '{print $5}' | cut -d '.' -f1)&lt;br /&gt;
if test $? == 0&lt;br /&gt;
then&lt;br /&gt;
echo $Host &amp;gt; /etc/hostname&lt;br /&gt;
fi&lt;br /&gt;
#Hostname END&lt;br /&gt;
%post --nochroot&lt;br /&gt;
echo &amp;quot;portmap : 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/hosts.allow&lt;br /&gt;
echo &amp;quot;ypserver 10.0.0.1&amp;quot; &amp;gt;&amp;gt; /target/etc/yp.conf&lt;br /&gt;
perl -pi -w -e 's/\/home/\/home.old/g;' /target/etc/fstab&lt;br /&gt;
mkdir /target/mnt/tmp&lt;br /&gt;
echo &amp;quot;10.0.0.1:/home /home nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
echo &amp;quot;10.0.0.1:/script /mnt/tmp/ nfs rw,bg,hard,intr 0 0&amp;quot; &amp;gt;&amp;gt; /target/etc/fstab&lt;br /&gt;
/target/etc/init.d/nis restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sådan ser vores gældende Kickstart fil ud&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
[[Category:Cluster]][[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28416</id>
		<title>Cluster der kan alt/Routing NAT and NIS</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28416"/>
				<updated>2014-10-30T09:04:33Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* NAT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Routing &amp;amp; NAT=&lt;br /&gt;
Configuring NAT (Sharing Internet)&lt;br /&gt;
&lt;br /&gt;
==Start Routing==&lt;br /&gt;
For this, we do not need to install anything new. Everything is right there but is currently disabled. &lt;br /&gt;
&lt;br /&gt;
First, edit sysctl.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Find this:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Uncomment it by removing the #. Now forwarding is enabled in the system kernel.&lt;br /&gt;
&lt;br /&gt;
===Start routing without a reboot===&lt;br /&gt;
This will enable it without a reboot. Like restart a service&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NAT==&lt;br /&gt;
*Before starting with Nat and switch user to sudo su root&lt;br /&gt;
This make a NAT rule for post-routing. It sets the eth0 as the output card (The one out to the internet) and sets source to it's own IP through MASQUERADE&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Save the iptable so it can be loaded correctly after a reboot/shutdown &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Load the iptables.rules at startup===&lt;br /&gt;
Edit the file interfaces&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/network/interfaces&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Insert these lines to the eth0 interface&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Like this&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# The extended interfaces&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Test it out on your other client.&lt;br /&gt;
&lt;br /&gt;
=NIS=&lt;br /&gt;
&lt;br /&gt;
Enter the hosts.allow file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/hosts.allow&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
portmap ypserv ypbind: 10.0.0.0/255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Install NIS. You will be prompted for domain name. The domain name is not the DNS-domain name - but a unique name for the nodes and master that share the same information.&lt;br /&gt;
*NOTE: It is recommended you install NIS using the VMware console instead of SSH&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install portmap nis&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Enter the nis file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/default/nis&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set the NISSERVER line to &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
NISSERVER=master&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the yp.conf file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/yp.conf &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
domain dka.local server 127.0.0.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the ypserv.securenets file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/ypserv.securenets&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace the 0.0.0.0 line with the 255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
0.0.0.0         0.0.0.0&lt;br /&gt;
&lt;br /&gt;
255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Reboot the Yellowpages service so the new configuration can be loaded&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
service ypserv restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==Adding a user==&lt;br /&gt;
Efter du har oprettet en ny bruger, '''adduser''' er det nødvendigt at genopbygge nis maps!&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root@head:~# &amp;lt;input&amp;gt;make -C /var/yp&amp;lt;/input&amp;gt;&lt;br /&gt;
make: Går til katalog '/var/yp'&lt;br /&gt;
make[1]: Går til katalog '/var/yp/c1.local'&lt;br /&gt;
Updating passwd.byname...&lt;br /&gt;
Updating passwd.byuid...&lt;br /&gt;
Updating netid.byname...&lt;br /&gt;
Updating shadow.byname...&lt;br /&gt;
make[1]: Forlader katalog '/var/yp/c1.local'&lt;br /&gt;
make: Forlader katalog '/var/yp'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Script adding user in a Cluster===&lt;br /&gt;
The following simple script:&lt;br /&gt;
*Add a user on the NIS server.&lt;br /&gt;
*Add a ssh key to the users '''/home''' library. &lt;br /&gt;
**In this cluster '''/home''' is distributed with [[NFS]] to all nodes. Logon to nodes without entering password&lt;br /&gt;
*Rebuilding the NIS database with the new user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo -e &amp;quot;Adding user to cluster\n&amp;quot;&lt;br /&gt;
echo -en &amp;quot;User login name: &amp;quot;&lt;br /&gt;
read NAME&lt;br /&gt;
adduser $NAME&lt;br /&gt;
&lt;br /&gt;
echo -e &amp;quot;Creating keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;ssh-keygen&amp;quot;&lt;br /&gt;
echo -e &amp;quot;Distributing keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;cat /home/$NAME/.ssh/id_rsa.pub &amp;gt;&amp;gt; /home/$NAME/.ssh/authorized_key$&lt;br /&gt;
echo -e &amp;quot;Rebuild NIS database&amp;quot;&lt;br /&gt;
make -C /var/yp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28415</id>
		<title>Cluster der kan alt/Routing NAT and NIS</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28415"/>
				<updated>2014-10-30T09:03:49Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* NAT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Routing &amp;amp; NAT=&lt;br /&gt;
Configuring NAT (Sharing Internet)&lt;br /&gt;
&lt;br /&gt;
==Start Routing==&lt;br /&gt;
For this, we do not need to install anything new. Everything is right there but is currently disabled. &lt;br /&gt;
&lt;br /&gt;
First, edit sysctl.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Find this:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Uncomment it by removing the #. Now forwarding is enabled in the system kernel.&lt;br /&gt;
&lt;br /&gt;
===Start routing without a reboot===&lt;br /&gt;
This will enable it without a reboot. Like restart a service&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NAT==&lt;br /&gt;
This make a NAT rule for post-routing. It sets the eth0 as the output card (The one out to the internet) and sets source to it's own IP through MASQUERADE&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Save the iptable so it can be loaded correctly after a reboot/shutdown &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Load the iptables.rules at startup===&lt;br /&gt;
Edit the file interfaces&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/network/interfaces&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Insert these lines to the eth0 interface&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Like this&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# The extended interfaces&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Test it out on your other client.&lt;br /&gt;
&lt;br /&gt;
=NIS=&lt;br /&gt;
&lt;br /&gt;
Enter the hosts.allow file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/hosts.allow&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
portmap ypserv ypbind: 10.0.0.0/255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Install NIS. You will be prompted for domain name. The domain name is not the DNS-domain name - but a unique name for the nodes and master that share the same information.&lt;br /&gt;
*NOTE: It is recommended you install NIS using the VMware console instead of SSH&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install portmap nis&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Enter the nis file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/default/nis&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set the NISSERVER line to &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
NISSERVER=master&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the yp.conf file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/yp.conf &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
domain dka.local server 127.0.0.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the ypserv.securenets file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/ypserv.securenets&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace the 0.0.0.0 line with the 255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
0.0.0.0         0.0.0.0&lt;br /&gt;
&lt;br /&gt;
255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Reboot the Yellowpages service so the new configuration can be loaded&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
service ypserv restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==Adding a user==&lt;br /&gt;
Efter du har oprettet en ny bruger, '''adduser''' er det nødvendigt at genopbygge nis maps!&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root@head:~# &amp;lt;input&amp;gt;make -C /var/yp&amp;lt;/input&amp;gt;&lt;br /&gt;
make: Går til katalog '/var/yp'&lt;br /&gt;
make[1]: Går til katalog '/var/yp/c1.local'&lt;br /&gt;
Updating passwd.byname...&lt;br /&gt;
Updating passwd.byuid...&lt;br /&gt;
Updating netid.byname...&lt;br /&gt;
Updating shadow.byname...&lt;br /&gt;
make[1]: Forlader katalog '/var/yp/c1.local'&lt;br /&gt;
make: Forlader katalog '/var/yp'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Script adding user in a Cluster===&lt;br /&gt;
The following simple script:&lt;br /&gt;
*Add a user on the NIS server.&lt;br /&gt;
*Add a ssh key to the users '''/home''' library. &lt;br /&gt;
**In this cluster '''/home''' is distributed with [[NFS]] to all nodes. Logon to nodes without entering password&lt;br /&gt;
*Rebuilding the NIS database with the new user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo -e &amp;quot;Adding user to cluster\n&amp;quot;&lt;br /&gt;
echo -en &amp;quot;User login name: &amp;quot;&lt;br /&gt;
read NAME&lt;br /&gt;
adduser $NAME&lt;br /&gt;
&lt;br /&gt;
echo -e &amp;quot;Creating keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;ssh-keygen&amp;quot;&lt;br /&gt;
echo -e &amp;quot;Distributing keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;cat /home/$NAME/.ssh/id_rsa.pub &amp;gt;&amp;gt; /home/$NAME/.ssh/authorized_key$&lt;br /&gt;
echo -e &amp;quot;Rebuild NIS database&amp;quot;&lt;br /&gt;
make -C /var/yp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28414</id>
		<title>Cluster der kan alt/Routing NAT and NIS</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28414"/>
				<updated>2014-10-30T09:03:14Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* NAT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Routing &amp;amp; NAT=&lt;br /&gt;
Configuring NAT (Sharing Internet)&lt;br /&gt;
&lt;br /&gt;
==Start Routing==&lt;br /&gt;
For this, we do not need to install anything new. Everything is right there but is currently disabled. &lt;br /&gt;
&lt;br /&gt;
First, edit sysctl.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Find this:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Uncomment it by removing the #. Now forwarding is enabled in the system kernel.&lt;br /&gt;
&lt;br /&gt;
===Start routing without a reboot===&lt;br /&gt;
This will enable it without a reboot. Like restart a service&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NAT==&lt;br /&gt;
Before starting with Nat and switch user to sudo su root&lt;br /&gt;
This make a NAT rule for post-routing. It sets the eth0 as the output card (The one out to the internet) and sets source to it's own IP through MASQUERADE&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Save the iptable so it can be loaded correctly after a reboot/shutdown &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Load the iptables.rules at startup===&lt;br /&gt;
Edit the file interfaces&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/network/interfaces&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Insert these lines to the eth0 interface&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Like this&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# The extended interfaces&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Test it out on your other client.&lt;br /&gt;
&lt;br /&gt;
=NIS=&lt;br /&gt;
&lt;br /&gt;
Enter the hosts.allow file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/hosts.allow&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
portmap ypserv ypbind: 10.0.0.0/255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Install NIS. You will be prompted for domain name. The domain name is not the DNS-domain name - but a unique name for the nodes and master that share the same information.&lt;br /&gt;
*NOTE: It is recommended you install NIS using the VMware console instead of SSH&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install portmap nis&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Enter the nis file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/default/nis&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set the NISSERVER line to &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
NISSERVER=master&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the yp.conf file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/yp.conf &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
domain dka.local server 127.0.0.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the ypserv.securenets file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/ypserv.securenets&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace the 0.0.0.0 line with the 255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
0.0.0.0         0.0.0.0&lt;br /&gt;
&lt;br /&gt;
255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Reboot the Yellowpages service so the new configuration can be loaded&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
service ypserv restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==Adding a user==&lt;br /&gt;
Efter du har oprettet en ny bruger, '''adduser''' er det nødvendigt at genopbygge nis maps!&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root@head:~# &amp;lt;input&amp;gt;make -C /var/yp&amp;lt;/input&amp;gt;&lt;br /&gt;
make: Går til katalog '/var/yp'&lt;br /&gt;
make[1]: Går til katalog '/var/yp/c1.local'&lt;br /&gt;
Updating passwd.byname...&lt;br /&gt;
Updating passwd.byuid...&lt;br /&gt;
Updating netid.byname...&lt;br /&gt;
Updating shadow.byname...&lt;br /&gt;
make[1]: Forlader katalog '/var/yp/c1.local'&lt;br /&gt;
make: Forlader katalog '/var/yp'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Script adding user in a Cluster===&lt;br /&gt;
The following simple script:&lt;br /&gt;
*Add a user on the NIS server.&lt;br /&gt;
*Add a ssh key to the users '''/home''' library. &lt;br /&gt;
**In this cluster '''/home''' is distributed with [[NFS]] to all nodes. Logon to nodes without entering password&lt;br /&gt;
*Rebuilding the NIS database with the new user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo -e &amp;quot;Adding user to cluster\n&amp;quot;&lt;br /&gt;
echo -en &amp;quot;User login name: &amp;quot;&lt;br /&gt;
read NAME&lt;br /&gt;
adduser $NAME&lt;br /&gt;
&lt;br /&gt;
echo -e &amp;quot;Creating keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;ssh-keygen&amp;quot;&lt;br /&gt;
echo -e &amp;quot;Distributing keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;cat /home/$NAME/.ssh/id_rsa.pub &amp;gt;&amp;gt; /home/$NAME/.ssh/authorized_key$&lt;br /&gt;
echo -e &amp;quot;Rebuild NIS database&amp;quot;&lt;br /&gt;
make -C /var/yp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28413</id>
		<title>Cluster der kan alt/Routing NAT and NIS</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28413"/>
				<updated>2014-10-30T08:57:21Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Start Routing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Routing &amp;amp; NAT=&lt;br /&gt;
Configuring NAT (Sharing Internet)&lt;br /&gt;
&lt;br /&gt;
==Start Routing==&lt;br /&gt;
For this, we do not need to install anything new. Everything is right there but is currently disabled. &lt;br /&gt;
&lt;br /&gt;
First, edit sysctl.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Find this:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Uncomment it by removing the #. Now forwarding is enabled in the system kernel.&lt;br /&gt;
&lt;br /&gt;
===Start routing without a reboot===&lt;br /&gt;
This will enable it without a reboot. Like restart a service&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NAT==&lt;br /&gt;
This make a NAT rule for post-routing. It sets the eth0 as the output card (The one out to the internet) and sets source to it's own IP through MASQUERADE&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Save the iptable so it can be loaded correctly after a reboot/shutdown &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Load the iptables.rules at startup===&lt;br /&gt;
Edit the file interfaces&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/network/interfaces&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Insert these lines to the eth0 interface&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Like this&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# The extended interfaces&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Test it out on your other client.&lt;br /&gt;
&lt;br /&gt;
=NIS=&lt;br /&gt;
&lt;br /&gt;
Enter the hosts.allow file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/hosts.allow&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
portmap ypserv ypbind: 10.0.0.0/255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Install NIS. You will be prompted for domain name. The domain name is not the DNS-domain name - but a unique name for the nodes and master that share the same information.&lt;br /&gt;
*NOTE: It is recommended you install NIS using the VMware console instead of SSH&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install portmap nis&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Enter the nis file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/default/nis&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set the NISSERVER line to &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
NISSERVER=master&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the yp.conf file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/yp.conf &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
domain dka.local server 127.0.0.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the ypserv.securenets file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/ypserv.securenets&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace the 0.0.0.0 line with the 255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
0.0.0.0         0.0.0.0&lt;br /&gt;
&lt;br /&gt;
255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Reboot the Yellowpages service so the new configuration can be loaded&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
service ypserv restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==Adding a user==&lt;br /&gt;
Efter du har oprettet en ny bruger, '''adduser''' er det nødvendigt at genopbygge nis maps!&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root@head:~# &amp;lt;input&amp;gt;make -C /var/yp&amp;lt;/input&amp;gt;&lt;br /&gt;
make: Går til katalog '/var/yp'&lt;br /&gt;
make[1]: Går til katalog '/var/yp/c1.local'&lt;br /&gt;
Updating passwd.byname...&lt;br /&gt;
Updating passwd.byuid...&lt;br /&gt;
Updating netid.byname...&lt;br /&gt;
Updating shadow.byname...&lt;br /&gt;
make[1]: Forlader katalog '/var/yp/c1.local'&lt;br /&gt;
make: Forlader katalog '/var/yp'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Script adding user in a Cluster===&lt;br /&gt;
The following simple script:&lt;br /&gt;
*Add a user on the NIS server.&lt;br /&gt;
*Add a ssh key to the users '''/home''' library. &lt;br /&gt;
**In this cluster '''/home''' is distributed with [[NFS]] to all nodes. Logon to nodes without entering password&lt;br /&gt;
*Rebuilding the NIS database with the new user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo -e &amp;quot;Adding user to cluster\n&amp;quot;&lt;br /&gt;
echo -en &amp;quot;User login name: &amp;quot;&lt;br /&gt;
read NAME&lt;br /&gt;
adduser $NAME&lt;br /&gt;
&lt;br /&gt;
echo -e &amp;quot;Creating keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;ssh-keygen&amp;quot;&lt;br /&gt;
echo -e &amp;quot;Distributing keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;cat /home/$NAME/.ssh/id_rsa.pub &amp;gt;&amp;gt; /home/$NAME/.ssh/authorized_key$&lt;br /&gt;
echo -e &amp;quot;Rebuild NIS database&amp;quot;&lt;br /&gt;
make -C /var/yp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28412</id>
		<title>Cluster der kan alt/Install DNS server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28412"/>
				<updated>2014-10-30T08:54:34Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* 5. Create a “rev.0.0.10.in-addr.arpa” file for reverse lookup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
Install DNS server&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install bind9&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Add domain zone  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the text below to the bottom of the file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
# Domain Zone&lt;br /&gt;
zone &amp;quot;dka.local.&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/dka.local.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# For reverse DNS&lt;br /&gt;
zone &amp;quot;0.0.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/rev.0.0.10.in-addr.arpa.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 2. Add DNS servers from your ISP  ===&lt;br /&gt;
&lt;br /&gt;
Enter the named.conf.options file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.options&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comment out the following lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
        dnssec-validation auto;&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following to the bottom of the file, just above '};'&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
        forwarders {&lt;br /&gt;
                172.16.4.77; # Mercantec DNS&lt;br /&gt;
         };&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
        listen-on { any; };&lt;br /&gt;
&lt;br /&gt;
        allow-query { 127.0.0.1; 172.16.4.77/24; 10.0.0.0/24; };&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Be aware of which IP segment you are in. 172.16.4.77 = Hovedforløb 172.16.2.50,172.16.2.51 = Grundforløb&lt;br /&gt;
&lt;br /&gt;
=== 3. Modify the resolv.conf file  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolvconf/resolv.conf.d/base file, and add the following lines. Replace 'dka.local' with your own domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nameserver 127.0.0.1&lt;br /&gt;
nameserver 10.0.0.1&lt;br /&gt;
nameserver 172.16.4.77&lt;br /&gt;
domain dka.local&lt;br /&gt;
search dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You may want to lock down the resolv.conf file, making it immutable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo chattr -f +i /etc/resolv.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Any problems with the resolv.conf file, look [http://ubuntuforums.org/showthread.php?t=1978656%7C here] &lt;br /&gt;
&lt;br /&gt;
=== 4. Define zones  ===&lt;br /&gt;
&lt;br /&gt;
First make the directory /etc/bind/zones &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /etc/bind/zones&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second make the file dka.local.db (replace with your own domain)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/zones/dka.local.db&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following text to the newly created file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
; BIND data file for local loopback interface&lt;br /&gt;
;&lt;br /&gt;
$TTL    604800&lt;br /&gt;
@       IN      SOA     ns.dka.local. root.dka.local. (&lt;br /&gt;
                              8         ; Serial&lt;br /&gt;
                         604800         ; Refresh&lt;br /&gt;
                          86400         ; Retry&lt;br /&gt;
                        2419200         ; Expire&lt;br /&gt;
                         604800 )       ; Negative Cache TTL&lt;br /&gt;
;&lt;br /&gt;
@       IN      NS      ns.dka.local.&lt;br /&gt;
ns      IN      A       10.0.0.1&lt;br /&gt;
cluster IN      A       10.0.0.1&lt;br /&gt;
node1   IN      A       10.0.0.11&lt;br /&gt;
node2   IN      A       10.0.0.12&lt;br /&gt;
node3   IN      A       10.0.0.13&lt;br /&gt;
node4   IN      A       10.0.0.14&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' TTL is set for 1 week.&lt;br /&gt;
&lt;br /&gt;
=== 5. Create a “rev.0.0.10.in-addr.arpa.db” file for reverse lookup  ===&lt;br /&gt;
&lt;br /&gt;
Create the rev.0.0.10.in-addr.arpa.db file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/zones/rev.0.0.10.in-addr.arpa.db&lt;br /&gt;
&amp;lt;/source&amp;gt; Add the following text &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 3D&lt;br /&gt;
@       IN      SOA     ns.dka.local. admin.dka.local. (&lt;br /&gt;
                2007062001&lt;br /&gt;
                28800&lt;br /&gt;
                604800&lt;br /&gt;
                604800&lt;br /&gt;
                86400&lt;br /&gt;
)&lt;br /&gt;
        IN      NS      ns.dka.local.&lt;br /&gt;
1       IN      PTR     ns.dka.local.&lt;br /&gt;
1       IN      PTR     cluster.dka.local.&lt;br /&gt;
11      IN      PTR     node1.dka.local.&lt;br /&gt;
12      IN      PTR     node2.dka.local.&lt;br /&gt;
13      IN      PTR     node3.dka.local.&lt;br /&gt;
14      IN      PTR     node4.dka.local.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 6. Verify domain and DNS entries  ===&lt;br /&gt;
&lt;br /&gt;
Restart the network service &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo service bind9 restart&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Dig &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$ dig dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Nslookup &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nslookup ns&lt;br /&gt;
&amp;lt;/source&amp;gt; {{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28411</id>
		<title>Cluster der kan alt/Install DNS server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28411"/>
				<updated>2014-10-30T08:53:13Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* 5. Create a “rev.0.0.10.in-addr.arpa” file for reverse lookup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
Install DNS server&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install bind9&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Add domain zone  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the text below to the bottom of the file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
# Domain Zone&lt;br /&gt;
zone &amp;quot;dka.local.&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/dka.local.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# For reverse DNS&lt;br /&gt;
zone &amp;quot;0.0.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/rev.0.0.10.in-addr.arpa.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 2. Add DNS servers from your ISP  ===&lt;br /&gt;
&lt;br /&gt;
Enter the named.conf.options file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.options&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comment out the following lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
        dnssec-validation auto;&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following to the bottom of the file, just above '};'&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
        forwarders {&lt;br /&gt;
                172.16.4.77; # Mercantec DNS&lt;br /&gt;
         };&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
        listen-on { any; };&lt;br /&gt;
&lt;br /&gt;
        allow-query { 127.0.0.1; 172.16.4.77/24; 10.0.0.0/24; };&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Be aware of which IP segment you are in. 172.16.4.77 = Hovedforløb 172.16.2.50,172.16.2.51 = Grundforløb&lt;br /&gt;
&lt;br /&gt;
=== 3. Modify the resolv.conf file  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolvconf/resolv.conf.d/base file, and add the following lines. Replace 'dka.local' with your own domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nameserver 127.0.0.1&lt;br /&gt;
nameserver 10.0.0.1&lt;br /&gt;
nameserver 172.16.4.77&lt;br /&gt;
domain dka.local&lt;br /&gt;
search dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You may want to lock down the resolv.conf file, making it immutable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo chattr -f +i /etc/resolv.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Any problems with the resolv.conf file, look [http://ubuntuforums.org/showthread.php?t=1978656%7C here] &lt;br /&gt;
&lt;br /&gt;
=== 4. Define zones  ===&lt;br /&gt;
&lt;br /&gt;
First make the directory /etc/bind/zones &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /etc/bind/zones&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second make the file dka.local.db (replace with your own domain)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/zones/dka.local.db&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following text to the newly created file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
; BIND data file for local loopback interface&lt;br /&gt;
;&lt;br /&gt;
$TTL    604800&lt;br /&gt;
@       IN      SOA     ns.dka.local. root.dka.local. (&lt;br /&gt;
                              8         ; Serial&lt;br /&gt;
                         604800         ; Refresh&lt;br /&gt;
                          86400         ; Retry&lt;br /&gt;
                        2419200         ; Expire&lt;br /&gt;
                         604800 )       ; Negative Cache TTL&lt;br /&gt;
;&lt;br /&gt;
@       IN      NS      ns.dka.local.&lt;br /&gt;
ns      IN      A       10.0.0.1&lt;br /&gt;
cluster IN      A       10.0.0.1&lt;br /&gt;
node1   IN      A       10.0.0.11&lt;br /&gt;
node2   IN      A       10.0.0.12&lt;br /&gt;
node3   IN      A       10.0.0.13&lt;br /&gt;
node4   IN      A       10.0.0.14&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' TTL is set for 1 week.&lt;br /&gt;
&lt;br /&gt;
=== 5. Create a “rev.0.0.10.in-addr.arpa” file for reverse lookup  ===&lt;br /&gt;
&lt;br /&gt;
Create the rev.0.0.10.in-addr.arpa file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nano /etc/bind/zones/rev.0.0.10.in-addr.arpa&lt;br /&gt;
&amp;lt;/source&amp;gt; Add the following text &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 3D&lt;br /&gt;
@       IN      SOA     ns.dka.local. admin.dka.local. (&lt;br /&gt;
                2007062001&lt;br /&gt;
                28800&lt;br /&gt;
                604800&lt;br /&gt;
                604800&lt;br /&gt;
                86400&lt;br /&gt;
)&lt;br /&gt;
        IN      NS      ns.dka.local.&lt;br /&gt;
1       IN      PTR     ns.dka.local.&lt;br /&gt;
1       IN      PTR     cluster.dka.local.&lt;br /&gt;
11      IN      PTR     node1.dka.local.&lt;br /&gt;
12      IN      PTR     node2.dka.local.&lt;br /&gt;
13      IN      PTR     node3.dka.local.&lt;br /&gt;
14      IN      PTR     node4.dka.local.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 6. Verify domain and DNS entries  ===&lt;br /&gt;
&lt;br /&gt;
Restart the network service &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo service bind9 restart&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Dig &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$ dig dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Nslookup &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nslookup ns&lt;br /&gt;
&amp;lt;/source&amp;gt; {{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28410</id>
		<title>Cluster der kan alt/Install DNS server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28410"/>
				<updated>2014-10-30T08:52:22Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* 4. Define zones */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
Install DNS server&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install bind9&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Add domain zone  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the text below to the bottom of the file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
# Domain Zone&lt;br /&gt;
zone &amp;quot;dka.local.&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/dka.local.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# For reverse DNS&lt;br /&gt;
zone &amp;quot;0.0.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/rev.0.0.10.in-addr.arpa.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 2. Add DNS servers from your ISP  ===&lt;br /&gt;
&lt;br /&gt;
Enter the named.conf.options file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.options&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comment out the following lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
        dnssec-validation auto;&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following to the bottom of the file, just above '};'&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
        forwarders {&lt;br /&gt;
                172.16.4.77; # Mercantec DNS&lt;br /&gt;
         };&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
        listen-on { any; };&lt;br /&gt;
&lt;br /&gt;
        allow-query { 127.0.0.1; 172.16.4.77/24; 10.0.0.0/24; };&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Be aware of which IP segment you are in. 172.16.4.77 = Hovedforløb 172.16.2.50,172.16.2.51 = Grundforløb&lt;br /&gt;
&lt;br /&gt;
=== 3. Modify the resolv.conf file  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolvconf/resolv.conf.d/base file, and add the following lines. Replace 'dka.local' with your own domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nameserver 127.0.0.1&lt;br /&gt;
nameserver 10.0.0.1&lt;br /&gt;
nameserver 172.16.4.77&lt;br /&gt;
domain dka.local&lt;br /&gt;
search dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You may want to lock down the resolv.conf file, making it immutable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo chattr -f +i /etc/resolv.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Any problems with the resolv.conf file, look [http://ubuntuforums.org/showthread.php?t=1978656%7C here] &lt;br /&gt;
&lt;br /&gt;
=== 4. Define zones  ===&lt;br /&gt;
&lt;br /&gt;
First make the directory /etc/bind/zones &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /etc/bind/zones&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second make the file dka.local.db (replace with your own domain)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/zones/dka.local.db&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following text to the newly created file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
; BIND data file for local loopback interface&lt;br /&gt;
;&lt;br /&gt;
$TTL    604800&lt;br /&gt;
@       IN      SOA     ns.dka.local. root.dka.local. (&lt;br /&gt;
                              8         ; Serial&lt;br /&gt;
                         604800         ; Refresh&lt;br /&gt;
                          86400         ; Retry&lt;br /&gt;
                        2419200         ; Expire&lt;br /&gt;
                         604800 )       ; Negative Cache TTL&lt;br /&gt;
;&lt;br /&gt;
@       IN      NS      ns.dka.local.&lt;br /&gt;
ns      IN      A       10.0.0.1&lt;br /&gt;
cluster IN      A       10.0.0.1&lt;br /&gt;
node1   IN      A       10.0.0.11&lt;br /&gt;
node2   IN      A       10.0.0.12&lt;br /&gt;
node3   IN      A       10.0.0.13&lt;br /&gt;
node4   IN      A       10.0.0.14&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' TTL is set for 1 week.&lt;br /&gt;
&lt;br /&gt;
=== 5. Create a “rev.0.0.10.in-addr.arpa” file for reverse lookup  ===&lt;br /&gt;
&lt;br /&gt;
Create the rev.0.0.10.in-addr.arpa file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nano /etc/bind/zones/rev.0.0.10.in-addr.arpa&lt;br /&gt;
&amp;lt;/source&amp;gt; Add the following text &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 3D&lt;br /&gt;
@       IN      SOA     ns.dka.local. admin.dka.local. (&lt;br /&gt;
                2007062001&lt;br /&gt;
                28800&lt;br /&gt;
                604800&lt;br /&gt;
                604800&lt;br /&gt;
                86400&lt;br /&gt;
)&lt;br /&gt;
        IN      NS      ns.dka.local.&lt;br /&gt;
1       IN      PTR     ns.dka.local.&lt;br /&gt;
1       IN      PTR     cluster.dka.local.&lt;br /&gt;
10      IN      PTR     node1.dka.local.&lt;br /&gt;
11      IN      PTR     node2.dka.local.&lt;br /&gt;
12      IN      PTR     node3.dka.local.&lt;br /&gt;
13      IN      PTR     node4.dka.local.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 6. Verify domain and DNS entries  ===&lt;br /&gt;
&lt;br /&gt;
Restart the network service &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo service bind9 restart&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Dig &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$ dig dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Nslookup &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nslookup ns&lt;br /&gt;
&amp;lt;/source&amp;gt; {{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DHCP_server&amp;diff=28409</id>
		<title>Cluster der kan alt/Install DHCP server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DHCP_server&amp;diff=28409"/>
				<updated>2014-10-30T08:50:55Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Configure dhcpd.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DHCP server ==&lt;br /&gt;
&lt;br /&gt;
Install DHCP server by download and install the DHCP package&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install isc-dhcp-server&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure dhcpd.conf ===&lt;br /&gt;
Ether the dhcp.conf&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
replace the context af the dhcp.conf file with this. You have to enter the nodes MAC-addresses. This can be added later on, but if you already know the MAC-addresses on the nodes type them in now&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
default-lease-time 3100;        # 51 minutes.&lt;br /&gt;
max-lease-time 604800;          # 1 week&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
subnet 10.0.0.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 10.0.0.11 10.0.0.20;&lt;br /&gt;
        option routers 10.0.0.1;&lt;br /&gt;
        option subnet-mask 255.255.255.0;&lt;br /&gt;
        option broadcast-address 10.0.0.255;&lt;br /&gt;
        option domain-name-servers 10.0.0.1;&lt;br /&gt;
        option domain-name &amp;quot;dka.local&amp;quot;;&lt;br /&gt;
        next-server 10.0.0.1;&lt;br /&gt;
        filename &amp;quot;pxelinux.0&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
        host node1 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F1:0B:4D;&lt;br /&gt;
                fixed-address 10.0.0.11;&lt;br /&gt;
        }&lt;br /&gt;
        host node2 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F0:C6:55;&lt;br /&gt;
                fixed-address 10.0.0.12;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        host node3 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F1:0B:F4;&lt;br /&gt;
                fixed-address 10.0.0.13;&lt;br /&gt;
        }&lt;br /&gt;
        host node4 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F0:C8:6D;&lt;br /&gt;
                fixed-address 10.0.0.14;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28408</id>
		<title>Cluster der kan alt/Routing NAT and NIS</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28408"/>
				<updated>2014-10-30T08:50:04Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* NIS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Routing &amp;amp; NAT=&lt;br /&gt;
Configuring NAT (Sharing Internet)&lt;br /&gt;
&lt;br /&gt;
==Start Routing==&lt;br /&gt;
For this, we do not need to install anything new. Everything is right there but is currently disabled. &lt;br /&gt;
&lt;br /&gt;
First, edit sysctl.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Find this:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Uncomment it by removing the #. Now forwarding is enabled in the system kernel.&lt;br /&gt;
&lt;br /&gt;
===Start routing without a reboot===&lt;br /&gt;
This will enable it without a reboot. Like restart a service&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NAT==&lt;br /&gt;
This make a NAT rule for post-routing. It sets the eth0 as the output card (The one out to the internet) and sets source to it's own IP through MASQUERADE&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Save the iptable so it can be loaded correctly after a reboot/shutdown &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Load the iptables.rules at startup===&lt;br /&gt;
Edit the file interfaces&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/network/interfaces&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Insert these lines to the eth0 interface&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Like this&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# The extended interfaces&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Test it out on your other client.&lt;br /&gt;
&lt;br /&gt;
=NIS=&lt;br /&gt;
&lt;br /&gt;
Enter the hosts.allow file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/hosts.allow&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
portmap ypserv ypbind: 10.0.0.0/255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Install NIS. You will be prompted for domain name. The domain name is not the DNS-domain name - but a unique name for the nodes and master that share the same information.&lt;br /&gt;
*NOTE: It is recommended you install NIS using the VMware console instead of SSH&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install portmap nis&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Enter the nis file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/default/nis&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set the NISSERVER line to &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
NISSERVER=master&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the yp.conf file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/yp.conf &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
domain dka.local server 127.0.0.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the ypserv.securenets file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/ypserv.securenets&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace the 0.0.0.0 line with the 255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
0.0.0.0         0.0.0.0&lt;br /&gt;
&lt;br /&gt;
255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Reboot the Yellowpages service so the new configuration can be loaded&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
service ypserv restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==Adding a user==&lt;br /&gt;
Efter du har oprettet en ny bruger, '''adduser''' er det nødvendigt at genopbygge nis maps!&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root@head:~# &amp;lt;input&amp;gt;make -C /var/yp&amp;lt;/input&amp;gt;&lt;br /&gt;
make: Går til katalog '/var/yp'&lt;br /&gt;
make[1]: Går til katalog '/var/yp/c1.local'&lt;br /&gt;
Updating passwd.byname...&lt;br /&gt;
Updating passwd.byuid...&lt;br /&gt;
Updating netid.byname...&lt;br /&gt;
Updating shadow.byname...&lt;br /&gt;
make[1]: Forlader katalog '/var/yp/c1.local'&lt;br /&gt;
make: Forlader katalog '/var/yp'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Script adding user in a Cluster===&lt;br /&gt;
The following simple script:&lt;br /&gt;
*Add a user on the NIS server.&lt;br /&gt;
*Add a ssh key to the users '''/home''' library. &lt;br /&gt;
**In this cluster '''/home''' is distributed with [[NFS]] to all nodes. Logon to nodes without entering password&lt;br /&gt;
*Rebuilding the NIS database with the new user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo -e &amp;quot;Adding user to cluster\n&amp;quot;&lt;br /&gt;
echo -en &amp;quot;User login name: &amp;quot;&lt;br /&gt;
read NAME&lt;br /&gt;
adduser $NAME&lt;br /&gt;
&lt;br /&gt;
echo -e &amp;quot;Creating keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;ssh-keygen&amp;quot;&lt;br /&gt;
echo -e &amp;quot;Distributing keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;cat /home/$NAME/.ssh/id_rsa.pub &amp;gt;&amp;gt; /home/$NAME/.ssh/authorized_key$&lt;br /&gt;
echo -e &amp;quot;Rebuild NIS database&amp;quot;&lt;br /&gt;
make -C /var/yp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28407</id>
		<title>Cluster der kan alt/Routing NAT and NIS</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28407"/>
				<updated>2014-10-30T08:49:12Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Load the iptables.rules at startup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Routing &amp;amp; NAT=&lt;br /&gt;
Configuring NAT (Sharing Internet)&lt;br /&gt;
&lt;br /&gt;
==Start Routing==&lt;br /&gt;
For this, we do not need to install anything new. Everything is right there but is currently disabled. &lt;br /&gt;
&lt;br /&gt;
First, edit sysctl.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Find this:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Uncomment it by removing the #. Now forwarding is enabled in the system kernel.&lt;br /&gt;
&lt;br /&gt;
===Start routing without a reboot===&lt;br /&gt;
This will enable it without a reboot. Like restart a service&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NAT==&lt;br /&gt;
This make a NAT rule for post-routing. It sets the eth0 as the output card (The one out to the internet) and sets source to it's own IP through MASQUERADE&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Save the iptable so it can be loaded correctly after a reboot/shutdown &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Load the iptables.rules at startup===&lt;br /&gt;
Edit the file interfaces&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/network/interfaces&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Insert these lines to the eth0 interface&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Like this&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# The extended interfaces&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Test it out on your other client.&lt;br /&gt;
&lt;br /&gt;
=NIS=&lt;br /&gt;
&lt;br /&gt;
Enter the hosts.allow file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/hosts.allow&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
portmap ypserv ypbind: 10.0.0.0/255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Install NIS. You will be prompted for domain name. The domain name is not the DNS-domain name - but a unique name for the nodes and master that share the same information.&lt;br /&gt;
*NOTE: It is recommended you install NIS using the VMware console instead of SSH&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
apt-get install portmap nis&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Enter the nis file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/default/nis&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set the NISSERVER line to &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
NISSERVER=master&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the yp.conf file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/yp.conf &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
domain dka.local server 127.0.0.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the ypserv.securenets file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/ypserv.securenets&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace the 0.0.0.0 line with the 255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
0.0.0.0         0.0.0.0&lt;br /&gt;
&lt;br /&gt;
255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Reboot the Yellowpages service so the new configuration can be loaded&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
service ypserv restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==Adding a user==&lt;br /&gt;
Efter du har oprettet en ny bruger, '''adduser''' er det nødvendigt at genopbygge nis maps!&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root@head:~# &amp;lt;input&amp;gt;make -C /var/yp&amp;lt;/input&amp;gt;&lt;br /&gt;
make: Går til katalog '/var/yp'&lt;br /&gt;
make[1]: Går til katalog '/var/yp/c1.local'&lt;br /&gt;
Updating passwd.byname...&lt;br /&gt;
Updating passwd.byuid...&lt;br /&gt;
Updating netid.byname...&lt;br /&gt;
Updating shadow.byname...&lt;br /&gt;
make[1]: Forlader katalog '/var/yp/c1.local'&lt;br /&gt;
make: Forlader katalog '/var/yp'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Script adding user in a Cluster===&lt;br /&gt;
The following simple script:&lt;br /&gt;
*Add a user on the NIS server.&lt;br /&gt;
*Add a ssh key to the users '''/home''' library. &lt;br /&gt;
**In this cluster '''/home''' is distributed with [[NFS]] to all nodes. Logon to nodes without entering password&lt;br /&gt;
*Rebuilding the NIS database with the new user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo -e &amp;quot;Adding user to cluster\n&amp;quot;&lt;br /&gt;
echo -en &amp;quot;User login name: &amp;quot;&lt;br /&gt;
read NAME&lt;br /&gt;
adduser $NAME&lt;br /&gt;
&lt;br /&gt;
echo -e &amp;quot;Creating keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;ssh-keygen&amp;quot;&lt;br /&gt;
echo -e &amp;quot;Distributing keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;cat /home/$NAME/.ssh/id_rsa.pub &amp;gt;&amp;gt; /home/$NAME/.ssh/authorized_key$&lt;br /&gt;
echo -e &amp;quot;Rebuild NIS database&amp;quot;&lt;br /&gt;
make -C /var/yp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DHCP_server&amp;diff=28406</id>
		<title>Cluster der kan alt/Install DHCP server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DHCP_server&amp;diff=28406"/>
				<updated>2014-10-30T08:37:28Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Configure dhcpd.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DHCP server ==&lt;br /&gt;
&lt;br /&gt;
Install DHCP server by download and install the DHCP package&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install isc-dhcp-server&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure dhcpd.conf ===&lt;br /&gt;
Ether the dhcp.conf&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
replace the context af the dhcp.conf file with this. You have to enter the nodes MAC-addresses. This can be added later on, but if you already know the MAC-addresses on the nodes type them in now&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
default-lease-time 3100;        # 51 minutes.&lt;br /&gt;
max-lease-time 604800;          # 1 week&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
subnet 10.0.0.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 10.0.0.11 10.0.0.20;&lt;br /&gt;
        option routers 10.0.0.1;&lt;br /&gt;
        option subnet-mask 255.255.255.0;&lt;br /&gt;
        option broadcast-address 10.0.0.255;&lt;br /&gt;
        option domain-name-servers 10.0.0.1;&lt;br /&gt;
        option domain-name &amp;quot;cluster.org&amp;quot;;&lt;br /&gt;
        next-server 10.0.0.1;&lt;br /&gt;
        filename &amp;quot;pxelinux.0&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
        host node1 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F1:0B:4D;&lt;br /&gt;
                fixed-address 10.0.0.11;&lt;br /&gt;
        }&lt;br /&gt;
        host node2 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F0:C6:55;&lt;br /&gt;
                fixed-address 10.0.0.12;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        host node3 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F1:0B:F4;&lt;br /&gt;
                fixed-address 10.0.0.13;&lt;br /&gt;
        }&lt;br /&gt;
        host node4 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F0:C8:6D;&lt;br /&gt;
                fixed-address 10.0.0.14;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DHCP_server&amp;diff=28405</id>
		<title>Cluster der kan alt/Install DHCP server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DHCP_server&amp;diff=28405"/>
				<updated>2014-10-30T08:35:50Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Configure dhcpd.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DHCP server ==&lt;br /&gt;
&lt;br /&gt;
Install DHCP server by download and install the DHCP package&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install isc-dhcp-server&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure dhcpd.conf ===&lt;br /&gt;
Ether the dhcp.conf&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment everything and add the following lines at the bottom of the dhcp.conf file. You have to enter the nodes MAC-addresses. This can be added later on, but if you already know the MAC-addresses on the nodes type them in now&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
default-lease-time 3100;        # 51 minutes.&lt;br /&gt;
max-lease-time 604800;          # 1 week&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
subnet 10.0.0.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 10.0.0.11 10.0.0.20;&lt;br /&gt;
        option routers 10.0.0.1;&lt;br /&gt;
        option subnet-mask 255.255.255.0;&lt;br /&gt;
        option broadcast-address 10.0.0.255;&lt;br /&gt;
        option domain-name-servers 10.0.0.1;&lt;br /&gt;
        option domain-name &amp;quot;cluster.org&amp;quot;;&lt;br /&gt;
        next-server 10.0.0.1;&lt;br /&gt;
        filename &amp;quot;pxelinux.0&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
        host node1 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F1:0B:4D;&lt;br /&gt;
                fixed-address 10.0.0.11;&lt;br /&gt;
        }&lt;br /&gt;
        host node2 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F0:C6:55;&lt;br /&gt;
                fixed-address 10.0.0.12;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        host node3 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F1:0B:F4;&lt;br /&gt;
                fixed-address 10.0.0.13;&lt;br /&gt;
        }&lt;br /&gt;
        host node4 {&lt;br /&gt;
                hardware ethernet 20:CF:30:F0:C8:6D;&lt;br /&gt;
                fixed-address 10.0.0.14;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_master&amp;diff=28404</id>
		<title>Cluster der kan alt/Installation af master</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_master&amp;diff=28404"/>
				<updated>2014-10-30T08:34:07Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Active /var/log/messages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation of the master=&lt;br /&gt;
==Mount the Ubuntu server .iso file (ubuntu-12.04.3-server-amd64.iso)==&lt;br /&gt;
#Step: Click '''CD/DVD''' under the devices menu under '''Cluster_Master'''&lt;br /&gt;
#Step: Marker '''Use ISO image file''' and browse the iso file. Click '''OK''' to finish&lt;br /&gt;
#Step: Click '''Power on this virtual machine''' to start the machine&lt;br /&gt;
== Install Ubuntu server  ==&lt;br /&gt;
&lt;br /&gt;
#Step: Choose Language (English) &lt;br /&gt;
#Step: Click '''Install Ubuntu Server''' &lt;br /&gt;
#Step: Select a language (English) &lt;br /&gt;
#Step: Select your location (Denmark) &lt;br /&gt;
#Step: Configure locales (en_US.UTF-8) &lt;br /&gt;
#Step: Configure the keyboard choose '''yes''' and follow the guide &lt;br /&gt;
#Step: Enter the hostname (Master) &lt;br /&gt;
#Step: Enter the full name (Cluster) &lt;br /&gt;
#Step: Username (cluster) &lt;br /&gt;
#Step: Password (cluster) &lt;br /&gt;
#Step: Use weak password, choose '''yes''' &lt;br /&gt;
#Step: Encrypt the home directory, choose '''No''' &lt;br /&gt;
#Step: Configure the clock, Europe/Copenhagen, choose '''yes''' &lt;br /&gt;
#Step: Partition disk , choose '''manual''' &lt;br /&gt;
#Step: Choose the virtual hard drive: '''21,5 GB VMware, VMware Virtual S''' &lt;br /&gt;
#Step: Create new empty partition table on this device, choose '''yes''' &lt;br /&gt;
#Step: Choose '''pri/log 17,2 GB FREE SPACE''' &lt;br /&gt;
#Step: Create the different partions as listed below:&lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Primary'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/''' &lt;br /&gt;
 Size: '''512MB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/boot''' &lt;br /&gt;
 Size: '''3GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/var''' &lt;br /&gt;
 Size: '''3GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/tmp''' &lt;br /&gt;
 Size: '''5GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/usr''' &lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/srv''' &lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/home''' &lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; '''Swap Area''' &lt;br /&gt;
#Step: Choose '''Finish partitioning and write changes to disk''' when you are finish &lt;br /&gt;
#Step: Write the change to disk, choose '''yes''' &lt;br /&gt;
#Step: HTTP proxy should be blank &lt;br /&gt;
#Step: Choose '''No automatic updates''' &lt;br /&gt;
#Step: Choose software to install, mark '''OpenSSH server''' and '''DNS server''' &lt;br /&gt;
#Step: Install GRUB boot loader, choose '''yes'''&lt;br /&gt;
#Step: Finish the installation, choose '''Continue''', the virtual machine will automatic unmount the iso file&lt;br /&gt;
&lt;br /&gt;
==Assign root permission to the cluster user==&lt;br /&gt;
&lt;br /&gt;
Enter the passwd file by:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/passwd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Change the cluster line in the bottom of the file from:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cluster:x:1000:1000:Cluster,,,:/home/cluster:/bin/bash&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
To:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cluster:x:0:0:Cluster,,,:/home/cluster:/bin/bash&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You have to logout before the changes can take effect&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
logout&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the sudoers file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/sudoers&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the cluster user below the root user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root        ALL=(ALL:ALL) ALL&lt;br /&gt;
username    ALL=(ALL:ALL) ALL&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Login via SSH==&lt;br /&gt;
Manage the server from SSH is a huge benefit because it will enable the copy/paste feature &lt;br /&gt;
&lt;br /&gt;
Open a terminal software, like Putty or TeraTerm&lt;br /&gt;
&lt;br /&gt;
Enter the server IP address and use the cluster/cluster for login&lt;br /&gt;
&lt;br /&gt;
==Update the system==&lt;br /&gt;
First search after updates&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Second install the updates. -y = yes to all (unattenuated install)&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get upgrade -y&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Active the secondary network card(eth1)==&lt;br /&gt;
Add a new network card i Vmware&lt;br /&gt;
Right-click on Cluster_Master&amp;gt;Settings&amp;gt;Add&amp;gt;Network Adapter&amp;gt;Next&amp;gt;Host-Only&amp;gt;Finish&lt;br /&gt;
Enter the network card file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/network/interfaces&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add this at the bottum of the file (after eth0) &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# The secondary network interface&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
address 10.0.0.1&lt;br /&gt;
netmask 255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the network servise&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo /etc/init.d/networking restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
To verify the activation use&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
ip addr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Active /var/log/messages==&lt;br /&gt;
Edit 50-default.conf&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/rsyslog.d/50-default.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Uncomment the lines&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
*.=info;*.=notice;*.=warn;\&lt;br /&gt;
auth,authpriv.none;\&lt;br /&gt;
cron,daemon.none;\&lt;br /&gt;
mail,news.none -/var/log/messages&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then restart the rsyslog daemon:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo service rsyslog restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Or reboot the entire system&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_master&amp;diff=28403</id>
		<title>Cluster der kan alt/Installation af master</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_master&amp;diff=28403"/>
				<updated>2014-10-30T08:33:19Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Active the secondary network card(eth1) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation of the master=&lt;br /&gt;
==Mount the Ubuntu server .iso file (ubuntu-12.04.3-server-amd64.iso)==&lt;br /&gt;
#Step: Click '''CD/DVD''' under the devices menu under '''Cluster_Master'''&lt;br /&gt;
#Step: Marker '''Use ISO image file''' and browse the iso file. Click '''OK''' to finish&lt;br /&gt;
#Step: Click '''Power on this virtual machine''' to start the machine&lt;br /&gt;
== Install Ubuntu server  ==&lt;br /&gt;
&lt;br /&gt;
#Step: Choose Language (English) &lt;br /&gt;
#Step: Click '''Install Ubuntu Server''' &lt;br /&gt;
#Step: Select a language (English) &lt;br /&gt;
#Step: Select your location (Denmark) &lt;br /&gt;
#Step: Configure locales (en_US.UTF-8) &lt;br /&gt;
#Step: Configure the keyboard choose '''yes''' and follow the guide &lt;br /&gt;
#Step: Enter the hostname (Master) &lt;br /&gt;
#Step: Enter the full name (Cluster) &lt;br /&gt;
#Step: Username (cluster) &lt;br /&gt;
#Step: Password (cluster) &lt;br /&gt;
#Step: Use weak password, choose '''yes''' &lt;br /&gt;
#Step: Encrypt the home directory, choose '''No''' &lt;br /&gt;
#Step: Configure the clock, Europe/Copenhagen, choose '''yes''' &lt;br /&gt;
#Step: Partition disk , choose '''manual''' &lt;br /&gt;
#Step: Choose the virtual hard drive: '''21,5 GB VMware, VMware Virtual S''' &lt;br /&gt;
#Step: Create new empty partition table on this device, choose '''yes''' &lt;br /&gt;
#Step: Choose '''pri/log 17,2 GB FREE SPACE''' &lt;br /&gt;
#Step: Create the different partions as listed below:&lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Primary'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/''' &lt;br /&gt;
 Size: '''512MB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/boot''' &lt;br /&gt;
 Size: '''3GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/var''' &lt;br /&gt;
 Size: '''3GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/tmp''' &lt;br /&gt;
 Size: '''5GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/usr''' &lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/srv''' &lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/home''' &lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; '''Swap Area''' &lt;br /&gt;
#Step: Choose '''Finish partitioning and write changes to disk''' when you are finish &lt;br /&gt;
#Step: Write the change to disk, choose '''yes''' &lt;br /&gt;
#Step: HTTP proxy should be blank &lt;br /&gt;
#Step: Choose '''No automatic updates''' &lt;br /&gt;
#Step: Choose software to install, mark '''OpenSSH server''' and '''DNS server''' &lt;br /&gt;
#Step: Install GRUB boot loader, choose '''yes'''&lt;br /&gt;
#Step: Finish the installation, choose '''Continue''', the virtual machine will automatic unmount the iso file&lt;br /&gt;
&lt;br /&gt;
==Assign root permission to the cluster user==&lt;br /&gt;
&lt;br /&gt;
Enter the passwd file by:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/passwd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Change the cluster line in the bottom of the file from:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cluster:x:1000:1000:Cluster,,,:/home/cluster:/bin/bash&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
To:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cluster:x:0:0:Cluster,,,:/home/cluster:/bin/bash&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You have to logout before the changes can take effect&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
logout&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the sudoers file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/sudoers&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the cluster user below the root user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root        ALL=(ALL:ALL) ALL&lt;br /&gt;
username    ALL=(ALL:ALL) ALL&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Login via SSH==&lt;br /&gt;
Manage the server from SSH is a huge benefit because it will enable the copy/paste feature &lt;br /&gt;
&lt;br /&gt;
Open a terminal software, like Putty or TeraTerm&lt;br /&gt;
&lt;br /&gt;
Enter the server IP address and use the cluster/cluster for login&lt;br /&gt;
&lt;br /&gt;
==Update the system==&lt;br /&gt;
First search after updates&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Second install the updates. -y = yes to all (unattenuated install)&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get upgrade -y&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Active the secondary network card(eth1)==&lt;br /&gt;
Add a new network card i Vmware&lt;br /&gt;
Right-click on Cluster_Master&amp;gt;Settings&amp;gt;Add&amp;gt;Network Adapter&amp;gt;Next&amp;gt;Host-Only&amp;gt;Finish&lt;br /&gt;
Enter the network card file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/network/interfaces&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add this at the bottum of the file (after eth0) &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# The secondary network interface&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
address 10.0.0.1&lt;br /&gt;
netmask 255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the network servise&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo /etc/init.d/networking restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
To verify the activation use&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
ip addr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Active /var/log/messages==&lt;br /&gt;
Edit 50-default.conf&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/rsyslog.d/50-default.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Uncomment the lines&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
*.=info;*.=notice;*.=warn;\&lt;br /&gt;
auth,authpriv.none;\&lt;br /&gt;
cron,daemon.none;\&lt;br /&gt;
mail,news.none -/var/log/messages&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then restart the rsyslog daemon:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
service rsyslog restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Or reboot the entire system&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
reboot&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_master&amp;diff=28402</id>
		<title>Cluster der kan alt/Installation af master</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Installation_af_master&amp;diff=28402"/>
				<updated>2014-10-30T08:32:52Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Update the system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation of the master=&lt;br /&gt;
==Mount the Ubuntu server .iso file (ubuntu-12.04.3-server-amd64.iso)==&lt;br /&gt;
#Step: Click '''CD/DVD''' under the devices menu under '''Cluster_Master'''&lt;br /&gt;
#Step: Marker '''Use ISO image file''' and browse the iso file. Click '''OK''' to finish&lt;br /&gt;
#Step: Click '''Power on this virtual machine''' to start the machine&lt;br /&gt;
== Install Ubuntu server  ==&lt;br /&gt;
&lt;br /&gt;
#Step: Choose Language (English) &lt;br /&gt;
#Step: Click '''Install Ubuntu Server''' &lt;br /&gt;
#Step: Select a language (English) &lt;br /&gt;
#Step: Select your location (Denmark) &lt;br /&gt;
#Step: Configure locales (en_US.UTF-8) &lt;br /&gt;
#Step: Configure the keyboard choose '''yes''' and follow the guide &lt;br /&gt;
#Step: Enter the hostname (Master) &lt;br /&gt;
#Step: Enter the full name (Cluster) &lt;br /&gt;
#Step: Username (cluster) &lt;br /&gt;
#Step: Password (cluster) &lt;br /&gt;
#Step: Use weak password, choose '''yes''' &lt;br /&gt;
#Step: Encrypt the home directory, choose '''No''' &lt;br /&gt;
#Step: Configure the clock, Europe/Copenhagen, choose '''yes''' &lt;br /&gt;
#Step: Partition disk , choose '''manual''' &lt;br /&gt;
#Step: Choose the virtual hard drive: '''21,5 GB VMware, VMware Virtual S''' &lt;br /&gt;
#Step: Create new empty partition table on this device, choose '''yes''' &lt;br /&gt;
#Step: Choose '''pri/log 17,2 GB FREE SPACE''' &lt;br /&gt;
#Step: Create the different partions as listed below:&lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Primary'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/''' &lt;br /&gt;
 Size: '''512MB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/boot''' &lt;br /&gt;
 Size: '''3GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/var''' &lt;br /&gt;
 Size: '''3GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/tmp''' &lt;br /&gt;
 Size: '''5GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/usr''' &lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/srv''' &lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Mounting point: '''/home''' &lt;br /&gt;
 Size: '''1GB''',&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Partion type: '''Logical'''&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; '''Swap Area''' &lt;br /&gt;
#Step: Choose '''Finish partitioning and write changes to disk''' when you are finish &lt;br /&gt;
#Step: Write the change to disk, choose '''yes''' &lt;br /&gt;
#Step: HTTP proxy should be blank &lt;br /&gt;
#Step: Choose '''No automatic updates''' &lt;br /&gt;
#Step: Choose software to install, mark '''OpenSSH server''' and '''DNS server''' &lt;br /&gt;
#Step: Install GRUB boot loader, choose '''yes'''&lt;br /&gt;
#Step: Finish the installation, choose '''Continue''', the virtual machine will automatic unmount the iso file&lt;br /&gt;
&lt;br /&gt;
==Assign root permission to the cluster user==&lt;br /&gt;
&lt;br /&gt;
Enter the passwd file by:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/passwd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Change the cluster line in the bottom of the file from:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cluster:x:1000:1000:Cluster,,,:/home/cluster:/bin/bash&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
To:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
cluster:x:0:0:Cluster,,,:/home/cluster:/bin/bash&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You have to logout before the changes can take effect&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
logout&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the sudoers file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/sudoers&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the cluster user below the root user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root        ALL=(ALL:ALL) ALL&lt;br /&gt;
username    ALL=(ALL:ALL) ALL&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Login via SSH==&lt;br /&gt;
Manage the server from SSH is a huge benefit because it will enable the copy/paste feature &lt;br /&gt;
&lt;br /&gt;
Open a terminal software, like Putty or TeraTerm&lt;br /&gt;
&lt;br /&gt;
Enter the server IP address and use the cluster/cluster for login&lt;br /&gt;
&lt;br /&gt;
==Update the system==&lt;br /&gt;
First search after updates&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Second install the updates. -y = yes to all (unattenuated install)&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get upgrade -y&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Active the secondary network card(eth1)==&lt;br /&gt;
Add a new network card i Vmware&lt;br /&gt;
Right-click on Cluster_Master&amp;gt;Settings&amp;gt;Add&amp;gt;Network Adapter&amp;gt;Next&amp;gt;Host-Only&amp;gt;Finish&lt;br /&gt;
Enter the network card file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/network/interfaces&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add this at the bottum of the file (after eth0) &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# The secondary network interface&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
address 10.0.0.1&lt;br /&gt;
netmask 255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the network servise&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo /etc/init.d/networking restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
To verify the activation use&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
ip addr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Active /var/log/messages==&lt;br /&gt;
Edit 50-default.conf&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/rsyslog.d/50-default.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Uncomment the lines&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
*.=info;*.=notice;*.=warn;\&lt;br /&gt;
auth,authpriv.none;\&lt;br /&gt;
cron,daemon.none;\&lt;br /&gt;
mail,news.none -/var/log/messages&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then restart the rsyslog daemon:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
service rsyslog restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Or reboot the entire system&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
reboot&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/DNS_Server&amp;diff=28371</id>
		<title>Cluster der kan alt/DNS Server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/DNS_Server&amp;diff=28371"/>
				<updated>2014-10-22T11:04:53Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* configure DNS (Bind) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation af DNS=&lt;br /&gt;
&lt;br /&gt;
Instruktioner&lt;br /&gt;
 &lt;br /&gt;
==Installer DNS Server==&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install bind9&lt;br /&gt;
&lt;br /&gt;
==configure DNS (Bind)==&lt;br /&gt;
Vi skal bruge 5 filer.&lt;br /&gt;
 &lt;br /&gt;
We will edit 3 files.&lt;br /&gt;
#/etc/bind/named.conf.local&lt;br /&gt;
#/etc/bind/named.conf.options&lt;br /&gt;
#/etc/resolvconf/resolv.conf.d/base &lt;br /&gt;
 &lt;br /&gt;
We will create 2 files.&lt;br /&gt;
#/etc/bind/zones/dka.local.db&lt;br /&gt;
#/etc/bind/zones/rev.0.0.10.in-addr.arpa.db&lt;br /&gt;
 &lt;br /&gt;
===First step: add domain zone – dka.local===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*sudo vi /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# Our Domain zone&lt;br /&gt;
zone &amp;quot;dka.local.&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/dka.local.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# For reverse DNS&lt;br /&gt;
zone &amp;quot;0.0.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/rev.0.0.10.in-addr.arpa.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Secund step: Add the DNS servers from your ISP===&lt;br /&gt;
&lt;br /&gt;
# Sudo vi /etc/bind/named.conf.options&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
        forwarders {&lt;br /&gt;
                172.16.4.66;&lt;br /&gt;
         };&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
        listen-on { any; };&lt;br /&gt;
&lt;br /&gt;
allow-query { 127.0.0.1; 172.16.4.66/24; 10.0.0.0/24;};&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Third step: Modify the resolv.conf file ===&lt;br /&gt;
&lt;br /&gt;
$ Sudo vi /etc/resolve.conf - Version 12.04 skal man ændre nano /etc/resolvconf/resolv.conf.d/base&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nameserver 10.0.0.1&lt;br /&gt;
domain dka.local&lt;br /&gt;
search dka.local&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fourth step: Define zones===&lt;br /&gt;
&lt;br /&gt;
Sudo mkdir /etc/bind/zones&lt;br /&gt;
Sudo vi /etc/bind/zones/dka.local.db&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; BIND data file for local loopback interface&lt;br /&gt;
;&lt;br /&gt;
$TTL    604800&lt;br /&gt;
@       IN      SOA     ns.dka.local. root.dka.local. (&lt;br /&gt;
                              8         ; Serial&lt;br /&gt;
                         604800         ; Refresh&lt;br /&gt;
                          86400         ; Retry&lt;br /&gt;
                        2419200         ; Expire&lt;br /&gt;
                         604800 )       ; Negative Cache TTL&lt;br /&gt;
;&lt;br /&gt;
@       IN      NS      ns.dka.local.&lt;br /&gt;
ns      IN      A       10.0.0.1&lt;br /&gt;
ubuntu  IN      A       10.0.0.21&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The TTL or time to live is set for 3 days&lt;br /&gt;
The ns.mydomain.com nameserver is defined&lt;br /&gt;
ubuntudesktop, pc and gateway are entered as an A record&lt;br /&gt;
An alias of www is assigned to ubuntudesktop using CNAME&lt;br /&gt;
&lt;br /&gt;
===Step five: Create a “rev.0.0.10.in-addr.arpa” file for reverse lookup===&lt;br /&gt;
&lt;br /&gt;
Sudo nano /etc/bind/zones/rev.0.0.10.in-addr.arpa.db&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
$TTL 3D&lt;br /&gt;
@       IN      SOA     ns.dka.local. admin.dka.local. (&lt;br /&gt;
                2007062001&lt;br /&gt;
                28800&lt;br /&gt;
                604800&lt;br /&gt;
                604800&lt;br /&gt;
                86400&lt;br /&gt;
)&lt;br /&gt;
        IN      NS      ns.dka.local.&lt;br /&gt;
2       IN      PTR     ubuntu.dka.local&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step seks: Test vores nye domæne og DNS entries===&lt;br /&gt;
&lt;br /&gt;
Dig&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
$ dig dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nslookup&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nslookup ns&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
[[Category:Cluster]][[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/DNS_Server&amp;diff=28370</id>
		<title>Cluster der kan alt/DNS Server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/DNS_Server&amp;diff=28370"/>
				<updated>2014-10-22T11:04:05Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Step five: Create a “rev.0.0.10.in-addr.arpa.db” file for reverse lookup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation af DNS=&lt;br /&gt;
&lt;br /&gt;
Instruktioner&lt;br /&gt;
 &lt;br /&gt;
==Installer DNS Server==&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install bind9&lt;br /&gt;
&lt;br /&gt;
==configure DNS (Bind)==&lt;br /&gt;
Vi skal bruge 5 filer.&lt;br /&gt;
 &lt;br /&gt;
We will edit 3 files.&lt;br /&gt;
#/etc/bind/named.conf.local&lt;br /&gt;
#/etc/bind/named.conf.options&lt;br /&gt;
#/etc/resolvconf/resolv.conf.d/base &lt;br /&gt;
 &lt;br /&gt;
We will create 2 files.&lt;br /&gt;
#/etc/bind/zones/dka.local.db&lt;br /&gt;
#/etc/bind/zones/rev.0.0.10.in-addr.arpa&lt;br /&gt;
 &lt;br /&gt;
===First step: add domain zone – dka.local===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*sudo vi /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# Our Domain zone&lt;br /&gt;
zone &amp;quot;dka.local.&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/dka.local.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# For reverse DNS&lt;br /&gt;
zone &amp;quot;0.0.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/rev.0.0.10.in-addr.arpa.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Secund step: Add the DNS servers from your ISP===&lt;br /&gt;
&lt;br /&gt;
# Sudo vi /etc/bind/named.conf.options&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
        forwarders {&lt;br /&gt;
                172.16.4.66;&lt;br /&gt;
         };&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
        listen-on { any; };&lt;br /&gt;
&lt;br /&gt;
allow-query { 127.0.0.1; 172.16.4.66/24; 10.0.0.0/24;};&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Third step: Modify the resolv.conf file ===&lt;br /&gt;
&lt;br /&gt;
$ Sudo vi /etc/resolve.conf - Version 12.04 skal man ændre nano /etc/resolvconf/resolv.conf.d/base&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nameserver 10.0.0.1&lt;br /&gt;
domain dka.local&lt;br /&gt;
search dka.local&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fourth step: Define zones===&lt;br /&gt;
&lt;br /&gt;
Sudo mkdir /etc/bind/zones&lt;br /&gt;
Sudo vi /etc/bind/zones/dka.local.db&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; BIND data file for local loopback interface&lt;br /&gt;
;&lt;br /&gt;
$TTL    604800&lt;br /&gt;
@       IN      SOA     ns.dka.local. root.dka.local. (&lt;br /&gt;
                              8         ; Serial&lt;br /&gt;
                         604800         ; Refresh&lt;br /&gt;
                          86400         ; Retry&lt;br /&gt;
                        2419200         ; Expire&lt;br /&gt;
                         604800 )       ; Negative Cache TTL&lt;br /&gt;
;&lt;br /&gt;
@       IN      NS      ns.dka.local.&lt;br /&gt;
ns      IN      A       10.0.0.1&lt;br /&gt;
ubuntu  IN      A       10.0.0.21&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The TTL or time to live is set for 3 days&lt;br /&gt;
The ns.mydomain.com nameserver is defined&lt;br /&gt;
ubuntudesktop, pc and gateway are entered as an A record&lt;br /&gt;
An alias of www is assigned to ubuntudesktop using CNAME&lt;br /&gt;
&lt;br /&gt;
===Step five: Create a “rev.0.0.10.in-addr.arpa” file for reverse lookup===&lt;br /&gt;
&lt;br /&gt;
Sudo nano /etc/bind/zones/rev.0.0.10.in-addr.arpa.db&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
$TTL 3D&lt;br /&gt;
@       IN      SOA     ns.dka.local. admin.dka.local. (&lt;br /&gt;
                2007062001&lt;br /&gt;
                28800&lt;br /&gt;
                604800&lt;br /&gt;
                604800&lt;br /&gt;
                86400&lt;br /&gt;
)&lt;br /&gt;
        IN      NS      ns.dka.local.&lt;br /&gt;
2       IN      PTR     ubuntu.dka.local&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step seks: Test vores nye domæne og DNS entries===&lt;br /&gt;
&lt;br /&gt;
Dig&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
$ dig dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nslookup&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nslookup ns&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
[[Category:Cluster]][[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28369</id>
		<title>Cluster der kan alt/Routing NAT and NIS</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Routing_NAT_and_NIS&amp;diff=28369"/>
				<updated>2014-10-22T10:33:39Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Script adding user in a Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Routing &amp;amp; NAT=&lt;br /&gt;
Configuring NAT (Sharing Internet)&lt;br /&gt;
&lt;br /&gt;
==Start Routing==&lt;br /&gt;
For this, we do not need to install anything new. Everything is right there but is currently disabled. &lt;br /&gt;
&lt;br /&gt;
First, edit sysctl.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Find this:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Uncomment it by removing the #. Now forwarding is enabled in the system kernel.&lt;br /&gt;
&lt;br /&gt;
===Start routing without a reboot===&lt;br /&gt;
This will enable it without a reboot. Like restart a service&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NAT==&lt;br /&gt;
This make a NAT rule for post-routing. It sets the eth0 as the output card (The one out to the internet) and sets source to it's own IP through MASQUERADE&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Save the iptable so it can be loaded correctly after a reboot/shutdown &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Load the iptables.rules at startup===&lt;br /&gt;
Edit the file interfaces&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/network/interfaces&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Insert these lines to the eth0 interface&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Like this&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
# The extended interfaces&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
pre-up iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
post-down iptables-restore &amp;lt; /etc/iptables.rules&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Test it out on your other client.&lt;br /&gt;
&lt;br /&gt;
=NIS=&lt;br /&gt;
&lt;br /&gt;
Enter the hosts.allow file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/hosts.allow&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
portmap ypserv ypbind: 10.0.0.0/255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Install NIS. You will be prompted for domain name. The domain name is not the DNS-domain name - but a unique name for the nodes and master that share the same information.&lt;br /&gt;
*NOTE: It is recommended you install NIS using the VMware console instead of SSH&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
apt-get install portmap nis&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Enter the nis file &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/default/nis&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Set the NISSERVER line to &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
NISSERVER=master&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the yp.conf file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/yp.conf &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the line&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
domain dka.local server 127.0.0.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enter the ypserv.securenets file&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
nano /etc/ypserv.securenets&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace the 0.0.0.0 line with the 255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
0.0.0.0         0.0.0.0&lt;br /&gt;
&lt;br /&gt;
255.255.255.0         10.0.0.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Reboot the Yellowpages service so the new configuration can be loaded&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
service ypserv restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==Adding a user==&lt;br /&gt;
Efter du har oprettet en ny bruger, '''adduser''' er det nødvendigt at genopbygge nis maps!&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root@head:~# &amp;lt;input&amp;gt;make -C /var/yp&amp;lt;/input&amp;gt;&lt;br /&gt;
make: Går til katalog '/var/yp'&lt;br /&gt;
make[1]: Går til katalog '/var/yp/c1.local'&lt;br /&gt;
Updating passwd.byname...&lt;br /&gt;
Updating passwd.byuid...&lt;br /&gt;
Updating netid.byname...&lt;br /&gt;
Updating shadow.byname...&lt;br /&gt;
make[1]: Forlader katalog '/var/yp/c1.local'&lt;br /&gt;
make: Forlader katalog '/var/yp'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Script adding user in a Cluster===&lt;br /&gt;
The following simple script:&lt;br /&gt;
*Add a user on the NIS server.&lt;br /&gt;
*Add a ssh key to the users '''/home''' library. &lt;br /&gt;
**In this cluster '''/home''' is distributed with [[NFS]] to all nodes. Logon to nodes without entering password&lt;br /&gt;
*Rebuilding the NIS database with the new user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo -e &amp;quot;Adding user to cluster\n&amp;quot;&lt;br /&gt;
echo -en &amp;quot;User login name: &amp;quot;&lt;br /&gt;
read NAME&lt;br /&gt;
adduser $NAME&lt;br /&gt;
&lt;br /&gt;
echo -e &amp;quot;Creating keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;ssh-keygen&amp;quot;&lt;br /&gt;
echo -e &amp;quot;Distributing keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;cat /home/$NAME/.ssh/id_rsa.pub &amp;gt;&amp;gt; /home/$NAME/.ssh/authorized_key$&lt;br /&gt;
echo -e &amp;quot;Rebuild NIS database&amp;quot;&lt;br /&gt;
make -C /var/yp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28368</id>
		<title>Cluster der kan alt/Install DNS server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28368"/>
				<updated>2014-10-22T10:31:36Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* 6. Verify domain and DNS entries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
Install DNS server&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install bind9&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Add domain zone  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the text below to the bottom of the file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
# Domain Zone&lt;br /&gt;
zone &amp;quot;dka.local.&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/dka.local.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# For reverse DNS&lt;br /&gt;
zone &amp;quot;0.0.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/rev.0.0.10.in-addr.arpa.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 2. Add DNS servers from your ISP  ===&lt;br /&gt;
&lt;br /&gt;
Enter the named.conf.options file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.options&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comment out the following lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
        dnssec-validation auto;&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following to the bottom of the file, just above '};'&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
        forwarders {&lt;br /&gt;
                172.16.4.77; # Mercantec DNS&lt;br /&gt;
         };&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
        listen-on { any; };&lt;br /&gt;
&lt;br /&gt;
        allow-query { 127.0.0.1; 172.16.4.77/24; 10.0.0.0/24; };&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Be aware of which IP segment you are in. 172.16.4.77 = Hovedforløb 172.16.2.50,172.16.2.51 = Grundforløb&lt;br /&gt;
&lt;br /&gt;
=== 3. Modify the resolv.conf file  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolvconf/resolv.conf.d/base file, and add the following lines. Replace 'dka.local' with your own domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nameserver 127.0.0.1&lt;br /&gt;
nameserver 10.0.0.1&lt;br /&gt;
nameserver 172.16.4.77&lt;br /&gt;
domain dka.local&lt;br /&gt;
search dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You may want to lock down the resolv.conf file, making it immutable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo chattr -f +i /etc/resolv.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Any problems with the resolv.conf file, look [http://ubuntuforums.org/showthread.php?t=1978656%7C here] &lt;br /&gt;
&lt;br /&gt;
=== 4. Define zones  ===&lt;br /&gt;
&lt;br /&gt;
First make the directory /etc/bind/zones &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /etc/bind/zones&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second make the file dka.local.db (replace with your own domain)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/zones/dka.local.db&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following text to the newly created file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
; BIND data file for local loopback interface&lt;br /&gt;
;&lt;br /&gt;
$TTL    604800&lt;br /&gt;
@       IN      SOA     ns.dka.local. root.dka.local. (&lt;br /&gt;
                              8         ; Serial&lt;br /&gt;
                         604800         ; Refresh&lt;br /&gt;
                          86400         ; Retry&lt;br /&gt;
                        2419200         ; Expire&lt;br /&gt;
                         604800 )       ; Negative Cache TTL&lt;br /&gt;
;&lt;br /&gt;
@       IN      NS      ns.dka.local.&lt;br /&gt;
ns      IN      A       10.0.0.1&lt;br /&gt;
cluster IN      A       10.0.0.1&lt;br /&gt;
node1   IN      A       10.0.0.10&lt;br /&gt;
node2   IN      A       10.0.0.11&lt;br /&gt;
node3   IN      A       10.0.0.12&lt;br /&gt;
node4   IN      A       10.0.0.13&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' TTL is set for 1 week.&lt;br /&gt;
&lt;br /&gt;
=== 5. Create a “rev.0.0.10.in-addr.arpa” file for reverse lookup  ===&lt;br /&gt;
&lt;br /&gt;
Create the rev.0.0.10.in-addr.arpa file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nano /etc/bind/zones/rev.0.0.10.in-addr.arpa&lt;br /&gt;
&amp;lt;/source&amp;gt; Add the following text &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 3D&lt;br /&gt;
@       IN      SOA     ns.dka.local. admin.dka.local. (&lt;br /&gt;
                2007062001&lt;br /&gt;
                28800&lt;br /&gt;
                604800&lt;br /&gt;
                604800&lt;br /&gt;
                86400&lt;br /&gt;
)&lt;br /&gt;
        IN      NS      ns.dka.local.&lt;br /&gt;
1       IN      PTR     ns.dka.local.&lt;br /&gt;
1       IN      PTR     cluster.dka.local.&lt;br /&gt;
10      IN      PTR     node1.dka.local.&lt;br /&gt;
11      IN      PTR     node2.dka.local.&lt;br /&gt;
12      IN      PTR     node3.dka.local.&lt;br /&gt;
13      IN      PTR     node4.dka.local.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 6. Verify domain and DNS entries  ===&lt;br /&gt;
&lt;br /&gt;
Restart the network service &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo service bind9 restart&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Dig &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$ dig dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Nslookup &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nslookup ns&lt;br /&gt;
&amp;lt;/source&amp;gt; {{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28367</id>
		<title>Cluster der kan alt/Install DNS server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28367"/>
				<updated>2014-10-22T10:30:25Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* 4. Define zones */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
Install DNS server&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install bind9&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Add domain zone  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the text below to the bottom of the file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
# Domain Zone&lt;br /&gt;
zone &amp;quot;dka.local.&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/dka.local.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# For reverse DNS&lt;br /&gt;
zone &amp;quot;0.0.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/rev.0.0.10.in-addr.arpa.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 2. Add DNS servers from your ISP  ===&lt;br /&gt;
&lt;br /&gt;
Enter the named.conf.options file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.options&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comment out the following lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
        dnssec-validation auto;&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following to the bottom of the file, just above '};'&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
        forwarders {&lt;br /&gt;
                172.16.4.77; # Mercantec DNS&lt;br /&gt;
         };&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
        listen-on { any; };&lt;br /&gt;
&lt;br /&gt;
        allow-query { 127.0.0.1; 172.16.4.77/24; 10.0.0.0/24; };&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Be aware of which IP segment you are in. 172.16.4.77 = Hovedforløb 172.16.2.50,172.16.2.51 = Grundforløb&lt;br /&gt;
&lt;br /&gt;
=== 3. Modify the resolv.conf file  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolvconf/resolv.conf.d/base file, and add the following lines. Replace 'dka.local' with your own domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nameserver 127.0.0.1&lt;br /&gt;
nameserver 10.0.0.1&lt;br /&gt;
nameserver 172.16.4.77&lt;br /&gt;
domain dka.local&lt;br /&gt;
search dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You may want to lock down the resolv.conf file, making it immutable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo chattr -f +i /etc/resolv.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Any problems with the resolv.conf file, look [http://ubuntuforums.org/showthread.php?t=1978656%7C here] &lt;br /&gt;
&lt;br /&gt;
=== 4. Define zones  ===&lt;br /&gt;
&lt;br /&gt;
First make the directory /etc/bind/zones &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /etc/bind/zones&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second make the file dka.local.db (replace with your own domain)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/zones/dka.local.db&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following text to the newly created file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
; BIND data file for local loopback interface&lt;br /&gt;
;&lt;br /&gt;
$TTL    604800&lt;br /&gt;
@       IN      SOA     ns.dka.local. root.dka.local. (&lt;br /&gt;
                              8         ; Serial&lt;br /&gt;
                         604800         ; Refresh&lt;br /&gt;
                          86400         ; Retry&lt;br /&gt;
                        2419200         ; Expire&lt;br /&gt;
                         604800 )       ; Negative Cache TTL&lt;br /&gt;
;&lt;br /&gt;
@       IN      NS      ns.dka.local.&lt;br /&gt;
ns      IN      A       10.0.0.1&lt;br /&gt;
cluster IN      A       10.0.0.1&lt;br /&gt;
node1   IN      A       10.0.0.10&lt;br /&gt;
node2   IN      A       10.0.0.11&lt;br /&gt;
node3   IN      A       10.0.0.12&lt;br /&gt;
node4   IN      A       10.0.0.13&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' TTL is set for 1 week.&lt;br /&gt;
&lt;br /&gt;
=== 5. Create a “rev.0.0.10.in-addr.arpa” file for reverse lookup  ===&lt;br /&gt;
&lt;br /&gt;
Create the rev.0.0.10.in-addr.arpa file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nano /etc/bind/zones/rev.0.0.10.in-addr.arpa&lt;br /&gt;
&amp;lt;/source&amp;gt; Add the following text &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 3D&lt;br /&gt;
@       IN      SOA     ns.dka.local. admin.dka.local. (&lt;br /&gt;
                2007062001&lt;br /&gt;
                28800&lt;br /&gt;
                604800&lt;br /&gt;
                604800&lt;br /&gt;
                86400&lt;br /&gt;
)&lt;br /&gt;
        IN      NS      ns.dka.local.&lt;br /&gt;
1       IN      PTR     ns.dka.local.&lt;br /&gt;
1       IN      PTR     cluster.dka.local.&lt;br /&gt;
10      IN      PTR     node1.dka.local.&lt;br /&gt;
11      IN      PTR     node2.dka.local.&lt;br /&gt;
12      IN      PTR     node3.dka.local.&lt;br /&gt;
13      IN      PTR     node4.dka.local.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 6. Verify domain and DNS entries  ===&lt;br /&gt;
&lt;br /&gt;
Restart the network service &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
service bind9 restart&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Dig &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$ dig dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Nslookup &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nslookup ns&lt;br /&gt;
&amp;lt;/source&amp;gt; {{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28366</id>
		<title>Cluster der kan alt/Install DNS server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28366"/>
				<updated>2014-10-22T10:29:55Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* 2. Add DNS servers from your ISP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
Install DNS server&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install bind9&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Add domain zone  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the text below to the bottom of the file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
# Domain Zone&lt;br /&gt;
zone &amp;quot;dka.local.&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/dka.local.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# For reverse DNS&lt;br /&gt;
zone &amp;quot;0.0.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/rev.0.0.10.in-addr.arpa.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 2. Add DNS servers from your ISP  ===&lt;br /&gt;
&lt;br /&gt;
Enter the named.conf.options file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.options&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comment out the following lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
        dnssec-validation auto;&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following to the bottom of the file, just above '};'&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
        forwarders {&lt;br /&gt;
                172.16.4.77; # Mercantec DNS&lt;br /&gt;
         };&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
        listen-on { any; };&lt;br /&gt;
&lt;br /&gt;
        allow-query { 127.0.0.1; 172.16.4.77/24; 10.0.0.0/24; };&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Be aware of which IP segment you are in. 172.16.4.77 = Hovedforløb 172.16.2.50,172.16.2.51 = Grundforløb&lt;br /&gt;
&lt;br /&gt;
=== 3. Modify the resolv.conf file  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolvconf/resolv.conf.d/base file, and add the following lines. Replace 'dka.local' with your own domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nameserver 127.0.0.1&lt;br /&gt;
nameserver 10.0.0.1&lt;br /&gt;
nameserver 172.16.4.77&lt;br /&gt;
domain dka.local&lt;br /&gt;
search dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You may want to lock down the resolv.conf file, making it immutable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo chattr -f +i /etc/resolv.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Any problems with the resolv.conf file, look [http://ubuntuforums.org/showthread.php?t=1978656%7C here] &lt;br /&gt;
&lt;br /&gt;
=== 4. Define zones  ===&lt;br /&gt;
&lt;br /&gt;
First make the directory /etc/bind/zones &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
mkdir /etc/bind/zones&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second make the file dka.local.db (replace with your own domain)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nano /etc/bind/zones/dka.local.db&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following text to the newly created file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
; BIND data file for local loopback interface&lt;br /&gt;
;&lt;br /&gt;
$TTL    604800&lt;br /&gt;
@       IN      SOA     ns.dka.local. root.dka.local. (&lt;br /&gt;
                              8         ; Serial&lt;br /&gt;
                         604800         ; Refresh&lt;br /&gt;
                          86400         ; Retry&lt;br /&gt;
                        2419200         ; Expire&lt;br /&gt;
                         604800 )       ; Negative Cache TTL&lt;br /&gt;
;&lt;br /&gt;
@       IN      NS      ns.dka.local.&lt;br /&gt;
ns      IN      A       10.0.0.1&lt;br /&gt;
cluster IN      A       10.0.0.1&lt;br /&gt;
node1   IN      A       10.0.0.10&lt;br /&gt;
node2   IN      A       10.0.0.11&lt;br /&gt;
node3   IN      A       10.0.0.12&lt;br /&gt;
node4   IN      A       10.0.0.13&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' TTL is set for 1 week.&lt;br /&gt;
&lt;br /&gt;
=== 5. Create a “rev.0.0.10.in-addr.arpa” file for reverse lookup  ===&lt;br /&gt;
&lt;br /&gt;
Create the rev.0.0.10.in-addr.arpa file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nano /etc/bind/zones/rev.0.0.10.in-addr.arpa&lt;br /&gt;
&amp;lt;/source&amp;gt; Add the following text &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 3D&lt;br /&gt;
@       IN      SOA     ns.dka.local. admin.dka.local. (&lt;br /&gt;
                2007062001&lt;br /&gt;
                28800&lt;br /&gt;
                604800&lt;br /&gt;
                604800&lt;br /&gt;
                86400&lt;br /&gt;
)&lt;br /&gt;
        IN      NS      ns.dka.local.&lt;br /&gt;
1       IN      PTR     ns.dka.local.&lt;br /&gt;
1       IN      PTR     cluster.dka.local.&lt;br /&gt;
10      IN      PTR     node1.dka.local.&lt;br /&gt;
11      IN      PTR     node2.dka.local.&lt;br /&gt;
12      IN      PTR     node3.dka.local.&lt;br /&gt;
13      IN      PTR     node4.dka.local.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 6. Verify domain and DNS entries  ===&lt;br /&gt;
&lt;br /&gt;
Restart the network service &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
service bind9 restart&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Dig &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$ dig dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Nslookup &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nslookup ns&lt;br /&gt;
&amp;lt;/source&amp;gt; {{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28365</id>
		<title>Cluster der kan alt/Install DNS server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DNS_server&amp;diff=28365"/>
				<updated>2014-10-22T10:29:32Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Install DNS Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
Install DNS server&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install bind9&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure DNS Server  ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Add domain zone  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo nano /etc/bind/named.conf.local&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the text below to the bottom of the file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
# Domain Zone&lt;br /&gt;
zone &amp;quot;dka.local.&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/dka.local.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
# For reverse DNS&lt;br /&gt;
zone &amp;quot;0.0.10.in-addr.arpa&amp;quot; {&lt;br /&gt;
        type master;&lt;br /&gt;
        file &amp;quot;/etc/bind/zones/rev.0.0.10.in-addr.arpa.db&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 2. Add DNS servers from your ISP  ===&lt;br /&gt;
&lt;br /&gt;
Enter the named.conf.options file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nano /etc/bind/named.conf.options&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comment out the following lines&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
        dnssec-validation auto;&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add the following to the bottom of the file, just above '};'&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
        forwarders {&lt;br /&gt;
                172.16.4.77; # Mercantec DNS&lt;br /&gt;
         };&lt;br /&gt;
&lt;br /&gt;
        auth-nxdomain no;    # conform to RFC1035&lt;br /&gt;
        listen-on-v6 { any; };&lt;br /&gt;
        listen-on { any; };&lt;br /&gt;
&lt;br /&gt;
        allow-query { 127.0.0.1; 172.16.4.77/24; 10.0.0.0/24; };&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Be aware of which IP segment you are in. 172.16.4.77 = Hovedforløb 172.16.2.50,172.16.2.51 = Grundforløb&lt;br /&gt;
&lt;br /&gt;
=== 3. Modify the resolv.conf file  ===&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolvconf/resolv.conf.d/base file, and add the following lines. Replace 'dka.local' with your own domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nameserver 127.0.0.1&lt;br /&gt;
nameserver 10.0.0.1&lt;br /&gt;
nameserver 172.16.4.77&lt;br /&gt;
domain dka.local&lt;br /&gt;
search dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You may want to lock down the resolv.conf file, making it immutable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
sudo chattr -f +i /etc/resolv.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Any problems with the resolv.conf file, look [http://ubuntuforums.org/showthread.php?t=1978656%7C here] &lt;br /&gt;
&lt;br /&gt;
=== 4. Define zones  ===&lt;br /&gt;
&lt;br /&gt;
First make the directory /etc/bind/zones &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
mkdir /etc/bind/zones&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second make the file dka.local.db (replace with your own domain)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nano /etc/bind/zones/dka.local.db&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following text to the newly created file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
; BIND data file for local loopback interface&lt;br /&gt;
;&lt;br /&gt;
$TTL    604800&lt;br /&gt;
@       IN      SOA     ns.dka.local. root.dka.local. (&lt;br /&gt;
                              8         ; Serial&lt;br /&gt;
                         604800         ; Refresh&lt;br /&gt;
                          86400         ; Retry&lt;br /&gt;
                        2419200         ; Expire&lt;br /&gt;
                         604800 )       ; Negative Cache TTL&lt;br /&gt;
;&lt;br /&gt;
@       IN      NS      ns.dka.local.&lt;br /&gt;
ns      IN      A       10.0.0.1&lt;br /&gt;
cluster IN      A       10.0.0.1&lt;br /&gt;
node1   IN      A       10.0.0.10&lt;br /&gt;
node2   IN      A       10.0.0.11&lt;br /&gt;
node3   IN      A       10.0.0.12&lt;br /&gt;
node4   IN      A       10.0.0.13&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' TTL is set for 1 week.&lt;br /&gt;
&lt;br /&gt;
=== 5. Create a “rev.0.0.10.in-addr.arpa” file for reverse lookup  ===&lt;br /&gt;
&lt;br /&gt;
Create the rev.0.0.10.in-addr.arpa file &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nano /etc/bind/zones/rev.0.0.10.in-addr.arpa&lt;br /&gt;
&amp;lt;/source&amp;gt; Add the following text &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 3D&lt;br /&gt;
@       IN      SOA     ns.dka.local. admin.dka.local. (&lt;br /&gt;
                2007062001&lt;br /&gt;
                28800&lt;br /&gt;
                604800&lt;br /&gt;
                604800&lt;br /&gt;
                86400&lt;br /&gt;
)&lt;br /&gt;
        IN      NS      ns.dka.local.&lt;br /&gt;
1       IN      PTR     ns.dka.local.&lt;br /&gt;
1       IN      PTR     cluster.dka.local.&lt;br /&gt;
10      IN      PTR     node1.dka.local.&lt;br /&gt;
11      IN      PTR     node2.dka.local.&lt;br /&gt;
12      IN      PTR     node3.dka.local.&lt;br /&gt;
13      IN      PTR     node4.dka.local.&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== 6. Verify domain and DNS entries  ===&lt;br /&gt;
&lt;br /&gt;
Restart the network service &amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
service bind9 restart&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Dig &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
$ dig dka.local&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Nslookup &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cli&amp;quot;&amp;gt;&lt;br /&gt;
nslookup ns&lt;br /&gt;
&amp;lt;/source&amp;gt; {{Source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DHCP_server&amp;diff=28364</id>
		<title>Cluster der kan alt/Install DHCP server</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/Install_DHCP_server&amp;diff=28364"/>
				<updated>2014-10-22T10:28:45Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: /* Configure dhcpd.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install DHCP server ==&lt;br /&gt;
&lt;br /&gt;
Install DHCP server by download and install the DHCP package&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install isc-dhcp-server&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure dhcpd.conf ===&lt;br /&gt;
Ether the dhcp.conf&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment everything and add the following lines at the bottom of the dhcp.conf file. You have to enter the nodes MAC-addresses. This can be added later on, but if you already know the MAC-addresses on the nodes type them in now&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
authoritative;&lt;br /&gt;
 &lt;br /&gt;
option domain-name &amp;quot;dka.local&amp;quot;;&lt;br /&gt;
option domain-name-servers 10.0.0.1;&lt;br /&gt;
 &lt;br /&gt;
default-lease-time 3100;	# 51 minutes.&lt;br /&gt;
max-lease-time 604800;		# 1 week&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
subnet 10.0.0.0 netmask 255.255.255.0 {&lt;br /&gt;
        option routers 10.0.0.1;&lt;br /&gt;
        option subnet-mask 255.255.255.0;&lt;br /&gt;
        option broadcast-address 10.0.0.255;&lt;br /&gt;
        next-server 10.0.0.1;&lt;br /&gt;
        filename &amp;quot;pxelinux.0&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        # The latest input from layer-9 required us to shift the dynamic&lt;br /&gt;
        # range from the top half of the subnet down to the bottom half.&lt;br /&gt;
        # This pool clause will elicit NAKs for the old leases while the&lt;br /&gt;
        # clients migrate.  Remember to remove this once they've all booted&lt;br /&gt;
        # once or expired.&lt;br /&gt;
        pool {&lt;br /&gt;
                range 10.0.0.1 10.0.0.20;&lt;br /&gt;
                deny all clients;&lt;br /&gt;
        }&lt;br /&gt;
        pool {&lt;br /&gt;
                range 10.0.0.21 10.0.0.254;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        host node1 {&lt;br /&gt;
                hardware ethernet &amp;lt;node1 MAC address&amp;gt;;&lt;br /&gt;
                server-name &amp;quot;node1.dka.local&amp;quot;;&lt;br /&gt;
                fixed-address 10.0.0.10;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        host node2 {&lt;br /&gt;
                hardware ethernet &amp;lt;node2 MAC address&amp;gt;;&lt;br /&gt;
                server-name &amp;quot;node2.dka.local&amp;quot;;&lt;br /&gt;
                fixed-address 10.0.0.11;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        host node3 {&lt;br /&gt;
                hardware ethernet &amp;lt;node3 MAC address&amp;gt;;&lt;br /&gt;
                server-name &amp;quot;node3.dka.local&amp;quot;;&lt;br /&gt;
                fixed-address 10.0.0.12;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        host node4 {&lt;br /&gt;
                hardware ethernet &amp;lt;node4 MAC address&amp;gt;;&lt;br /&gt;
                server-name &amp;quot;node4.dka.local&amp;quot;;&lt;br /&gt;
                fixed-address 10.0.0.13;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Source cli}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cluster]]&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/LDAP_eller_NIS&amp;diff=28347</id>
		<title>Cluster der kan alt/LDAP eller NIS</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Cluster_der_kan_alt/LDAP_eller_NIS&amp;diff=28347"/>
				<updated>2014-10-21T12:09:51Z</updated>
		
		<summary type="html">&lt;p&gt;Minoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Installation af master server=&lt;br /&gt;
&lt;br /&gt;
Tilføj følgende linje til '''sudo nano /etc/hosts.allow'''.&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
portmap ypserv ypbind: 10.0.0.0/255.255.255.0&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Installer NIS. Du vil blive bedt om at indtaste domænenavnet. Domænenavnet er ikke DNS-domænenavn - men et unikt navn for klyngen af maskiner deler de samme oplysninger.&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install portmap nis&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
*Ret '''sudo nano /etc/default/nis''' (nano /etc/default/nis) og set NISSERVER linjen til &lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
NISSERVER =master&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*Ret '''sudo nano/etc/yp.conf''' og tilføj en linje med:&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
domain dka.local server 127.0.0.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*Ret '''sudo nano /etc/ypserv.securenets''' fjern '''0.0.0.0''' linjen - insecure - og tilføj dit eget net(255.255.255.0 10.0.0.0).&lt;br /&gt;
*genstart så yellowpages servicen for at loade det nye configuration.&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo service ypserv restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==Adding a user==&lt;br /&gt;
Efter du har oprettet en ny bruger, '''adduser''' er det nødvendigt at genopbygge nis maps!&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
root@head:~# &amp;lt;input&amp;gt;make -C /var/yp&amp;lt;/input&amp;gt;&lt;br /&gt;
make: Går til katalog '/var/yp'&lt;br /&gt;
make[1]: Går til katalog '/var/yp/c1.local'&lt;br /&gt;
Updating passwd.byname...&lt;br /&gt;
Updating passwd.byuid...&lt;br /&gt;
Updating netid.byname...&lt;br /&gt;
Updating shadow.byname...&lt;br /&gt;
make[1]: Forlader katalog '/var/yp/c1.local'&lt;br /&gt;
make: Forlader katalog '/var/yp'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Script adding user in a Cluster===&lt;br /&gt;
The following simple script:&lt;br /&gt;
*Add a user on the NIS server.&lt;br /&gt;
*Add a ssh key to the users '''/home''' library. &lt;br /&gt;
**In this cluster '''/home''' is distributed with [[NFS]] to all nodes. Logon to nodes without entering password&lt;br /&gt;
*Rebuilding the NIS database with the new user&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
echo -e &amp;quot;Adding user to cluster&amp;quot;&lt;br /&gt;
echo -e &amp;quot;======================\n&amp;quot;&lt;br /&gt;
echo -en &amp;quot;User login name: &amp;quot;&lt;br /&gt;
read NAME&lt;br /&gt;
adduser $NAME&lt;br /&gt;
&lt;br /&gt;
echo -e &amp;quot;Creating keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;ssh-keygen&amp;quot;&lt;br /&gt;
echo -e &amp;quot;Distributing keys&amp;quot;&lt;br /&gt;
su $NAME -c &amp;quot;cat /home/$NAME/.ssh/id_rsa.pub &amp;gt;&amp;gt; /home/$NAME/.ssh/authorized_keys&amp;quot;&lt;br /&gt;
echo -e &amp;quot;Rebuild NIS database&amp;quot;&lt;br /&gt;
make -C /var/yp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation på klienten=&lt;br /&gt;
Installer software&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
sudo apt-get install portmap nis&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Kør disse kommandoer, hvor NIS_SERVER_IP = din nis server ip&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
echo &amp;quot;portmap : &amp;lt;notice&amp;gt;NIS_SERVER_IP&amp;quot;&amp;lt;/notice&amp;gt; &amp;gt;&amp;gt; /etc/hosts.allow&lt;br /&gt;
echo &amp;quot;+::::::&amp;quot; &amp;gt;&amp;gt; /etc/passwd&lt;br /&gt;
echo &amp;quot;+:::&amp;quot; &amp;gt;&amp;gt; /etc/group&lt;br /&gt;
echo &amp;quot;+::::::::&amp;quot; &amp;gt;&amp;gt; /etc/shadow&lt;br /&gt;
echo &amp;quot;Domain = Cluster&amp;quot; &amp;gt;&amp;gt; /etc/idmapd.conf&lt;br /&gt;
echo &amp;quot;ypserver &amp;lt;notice&amp;gt;NIS_SERVER_IP&amp;quot;&amp;lt;/notice&amp;gt; &amp;gt;&amp;gt; /etc/yp.conf&lt;br /&gt;
service ypbind restart&lt;br /&gt;
service idmapd restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Test med&lt;br /&gt;
&amp;lt;source lang=cli&amp;gt;&lt;br /&gt;
yptest&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{source cli}}&lt;/div&gt;</summary>
		<author><name>Minoo</name></author>	</entry>

	</feed>