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

From Teknologisk videncenter
Jump to: navigation, search
(Apt-cacher)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
=NFS Server=
 
=NFS Server=
===NFS server===
 
 
 
 
Installer NFS Server
 
Installer NFS Server
 
<source lang=cli>
 
<source lang=cli>
apt-get install nfs-kernel-server
+
apt-get install nfs-kernel-server -y
 
</source>
 
</source>
  
==Exports==
+
Edit the exports file
 
+
<source lang=cli>
Editer /etc/exports
+
nano /etc/exports
:tilføj 1 linie i bunden
+
</source>
 
+
Add this line at the bottom
 
<source lang=cli>
 
<source lang=cli>
 
/home/      10.0.0.0/24(rw,no_root_squash,no_subtree_check,async)
 
/home/      10.0.0.0/24(rw,no_root_squash,no_subtree_check,async)
 
</source>
 
</source>
  
Exporter de nye shares:
+
Export the new share
 
<source lang=cli>
 
<source lang=cli>
 
exportfs
 
exportfs
 
</source>
 
</source>
 
+
Restart the NFS server service
Genstart NFS serveren med
 
 
 
 
<source lang=cli>
 
<source lang=cli>
 
service nfs-kernel-server restart
 
service nfs-kernel-server restart
 
</source>
 
</source>
  
*For at UID og GID bliver overført korrekt til klienterne skal de have det samme domain i /etc/idmapd.conf  
+
Enter the idmapd.conf file
 +
<source lang=cli>
 +
nano /etc/idmapd.conf  
 +
</source>
 +
Change the domain to "Cluster"
 
<source lang=cli>
 
<source lang=cli>
 
Domain = Cluster
 
Domain = Cluster
 
</source>
 
</source>
*genstart så idmapd servicen for at loade det nye configuration.
+
Restart  the idmapd service
 
<source lang=cli>
 
<source lang=cli>
 
service idmapd restart
 
service idmapd restart
 
</source>
 
</source>
===NFS Clienter===
+
 
Installer NFS clienten
+
=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
 
<source lang=cli>
 
<source lang=cli>
apt-get install nfs-common
+
apt-get install apt-cacher
 
</source>
 
</source>
*For at UID og GID bliver overført korrekt til Klienterne skal de have det samme
 
  
IDMAPD domain i /etc/idmapd.conf
+
Enter the apt-cacher.conf file
 
<source lang=cli>
 
<source lang=cli>
Domain = Cluster
+
nano /etc/apt-cacher/apt-cacher.conf
 
</source>
 
</source>
*genstart så idmapd servicen for at loade det nye configuration.
+
Insert the following
 
<source lang=cli>
 
<source lang=cli>
service idmapd restart
+
path_map = ubuntu de.archive.ubuntu.com/ubuntu; ubuntu-updates de.archive.ubuntu.com/ubuntu ; ubuntu-security security.ubuntu.com/ubuntu
 +
allowed_hosts=*
 
</source>
 
</source>
Mount folderen på klienten
+
 
 +
Enter the apt-cacher file
 
<source lang=cli>
 
<source lang=cli>
mount 10.0.0.1:/home/ /home/
+
nano /etc/default/apt-cacher
 +
</source>
 +
set the autostart to 1
 +
<source lang=cli>
 +
AUTOSTART=1
 
</source>
 
</source>
  
=Apt-Cacher=
+
Restart the apt-cacher service
===Apt-cacher===
 
Indtast apt-getinstall apt-cacher.
 
 
 
Ændre i /etc/apt-cacher/apt-cacher.conf
 
 
<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
+
sudo /etc/init.d/apt-cacher restart
allowed_hosts=*
 
 
</source>
 
</source>
Ændre i /etc/default/apt-cacher også:
+
 
 +
=Auto SSH login=
 +
Make a crypto dsa(digital signature algorithm) key for the auto login
 
<source lang=cli>
 
<source lang=cli>
AUTOSTART=1
+
ssh-keygen -t dsa
 
</source>
 
</source>
Og genstart apt-cacher:
+
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>
/etc/init.d/apt-cacher restart
+
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
 
</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