wiki:Machinesetup

Version 3 (modified by ypap, 3 days ago) ( diff )

--

Machine Setup

1. Install Ubuntu or Debian - prefer the server version of your chosen Ubuntu or Debian LTS distro

2. Change root password

cslab@machine:~$ sudo su
root@machine:~# passwd

3. Update and install necessary packages ===

root@machine:~# apt update
root@machine:~# apt upgrade -y && apt install -y vim git htop dstat nfs-common nis tmux
root@machine:~# apt autoremove -y

4. Remove swap

root@machine:~# swapoff -a
root@machine:~# rm -v /swap.img

5. Connect the NFS (nemesis is down (3.3), comment it out)

root@machine:~# vim /etc/fstab: 
		# swap -> comment-out
		147.102.4.1:/home	/home	nfs	defaults	0	0
		147.102.4.1:/various	/various	nfs	defaults,nolock	0	0
		#147.102.3.3:/store/cluster_data	/risky_store	nfs	nfsvers=3,nolock	0	0

6. NIS setup

  • Determine users, passwords, groups
    root@machine:~# vim /etc/nsswitch.conf
    		at passwd, group, shadow add: files nis
    
  • Create defaultdomain file
root@machine:~# vim /etc/defaultdomain
               write: sci.nis
  • Set ypserver
root@machine:~# vim /etc/yp.conf
   at ypserver line, write:
   ypserver scirouter.cslab.ece.ntua.gr
  • Enable the service:
root@machine:~# systemctl enable ypbind.service

7. Test if the previous step was successful

root@machine:~# yptest (must read the config)
root@machine:~# id ypap (must return user)
root@machine:~# ps -ef | grep yp (ypbind.service must be running)

If not running:

root@machine:~# systemctl restart ypbind
root@machine:~# systemctl list-unit-files | grep yp

8. Remove Password authentication from sshd

root@machine:~# vim /etc/ssh/sshd_config
                PasswordAuthentication no

9. Connection fix [NOT NECESSARY]

root@machine:~# vim /lib/systemd/system/systemd-{logind, udevd}.service # comment-out IPAddressDeny=any
root@machine:~# systemctl daemon-reload
root@machine:~# systemctl restart systemctl-logind
root@machine:~# systemctl restart systemctl-udevd
Note: See TracWiki for help on using the wiki.