Difference between revisions of "Cluster der kan alt/Configure NFS server, Apt cacher and SSH auto login"

From Teknologisk videncenter
Jump to: navigation, search
 
(5 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
</source>
 
</source>
  
==Edit the exports file==
+
Edit the exports file
 
<source lang=cli>
 
<source lang=cli>
 
nano /etc/exports
 
nano /etc/exports
Line 36: Line 36:
 
</source>
 
</source>
  
=Apt-Cacher=
+
=apt-cacher=
 +
 
 +
'''Disregard of this manual for APT-CACHER for Ubuntu 14.04+ Use: apt-cacher-ng''' <br>
 +
http://www.tecmint.com/apt-cache-server-in-ubuntu/
 +
 
 +
 
 
Install the apt-cacher program
 
Install the apt-cacher program
 
<source lang=cli>
 
<source lang=cli>
Line 46: Line 51:
 
nano /etc/apt-cacher/apt-cacher.conf
 
nano /etc/apt-cacher/apt-cacher.conf
 
</source>
 
</source>
Instert the following
+
Insert the following
 
<source lang=cli>
 
<source lang=cli>
 
path_map = ubuntu de.archive.ubuntu.com/ubuntu; ubuntu-updates de.archive.ubuntu.com/ubuntu ; ubuntu-security security.ubuntu.com/ubuntu
 
path_map = ubuntu de.archive.ubuntu.com/ubuntu; ubuntu-updates de.archive.ubuntu.com/ubuntu ; ubuntu-security security.ubuntu.com/ubuntu
Line 67: Line 72:
  
 
=Auto SSH login=
 
=Auto SSH login=
På Master1 generere man nogle nøgler som kan bruges til at logge ind på alle maskinerne med.
+
Make a crypto dsa(digital signature algorithm) key for the auto login
 
<source lang=cli>
 
<source lang=cli>
 
ssh-keygen -t dsa
 
ssh-keygen -t dsa
 
</source>
 
</source>
Kopier vores public key ind i authorized_keys, så vi kan SSH til os selv
+
Copy the dsa key to the hidden /.ssh/ folder i the /home/<username> folder, which will be mounted on the nodes
 
<source lang=cli>
 
<source lang=cli>
 
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
 
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
</source>
 
Siden man mounter sit NFS share /home i Kickstart filen, så kigger alle maskiner i den samme folder, og derfor behøver vi ikke kopiere disse filer ud.
 
Og man kan nu SSH rundt til alle maskiner uden password
 
<source lang=cli>
 
ssh 10.0.0.10
 
 
</source>
 
</source>
 
{{Source cli}}
 
{{Source cli}}

Latest revision as of 12:15, 4 November 2014

NFS Server

Installer NFS Server

apt-get install nfs-kernel-server -y

Edit the exports file

nano /etc/exports

Add this line at the bottom

/home/      10.0.0.0/24(rw,no_root_squash,no_subtree_check,async)

Export the new share

exportfs

Restart the NFS server service

service nfs-kernel-server restart

Enter the idmapd.conf file

nano /etc/idmapd.conf

Change the domain to "Cluster"

Domain = Cluster

Restart the idmapd service

service idmapd restart

apt-cacher

Disregard of this manual for APT-CACHER for Ubuntu 14.04+ Use: apt-cacher-ng
http://www.tecmint.com/apt-cache-server-in-ubuntu/


Install the apt-cacher program

apt-get install apt-cacher

Enter the apt-cacher.conf file

nano /etc/apt-cacher/apt-cacher.conf

Insert the following

path_map = ubuntu de.archive.ubuntu.com/ubuntu; ubuntu-updates de.archive.ubuntu.com/ubuntu ; ubuntu-security security.ubuntu.com/ubuntu
allowed_hosts=*

Enter the apt-cacher file

nano /etc/default/apt-cacher

set the autostart to 1

AUTOSTART=1

Restart the apt-cacher service

sudo /etc/init.d/apt-cacher restart

Auto SSH login

Make a crypto dsa(digital signature algorithm) key for the auto login

ssh-keygen -t dsa

Copy the dsa key to the hidden /.ssh/ folder i the /home/<username> folder, which will be mounted on the nodes

cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys