SETTING UP A BACKEND LINUX MACHINE ========================================================================= 1. Download the Fedora 23 image: https://spins.fedoraproject.org/lxde/download/index.html. 2. Use a CD burning program to burn this image to a DVD. You need to select the option that says something like "burn image." If you burn the data to the DVD, it will not unpack the image and you will be left with a useless DVD. 3. This next step will vary depending on the computer manufacturer. You need to put the DVD in the CD-DVD drive and reboot the computer. When the computer displays the hardware manufacturer's logo, you need to press some key to enter the BIOS menu. Usually it is an F-button, usually F10. In the BIOS you need to navigate through the menus until you find the boot order and change the boot order so that booting the CD-DVD is ahead of the hard disk. Save changes and exit and let it reboot completely. 4. Next you will eventually enter a live Linux desktop. Double click on the "install to hard drive" icon on the desktop. 5. Follow the instructions for setting up the Linux install. Most things can be left at the defaults. The only tricky thing is the installation destination. If you are uncertain of how to set this up, either accept the defaults or follow an online tutorial. If you only want to run this machine as a server for Rosetta and do not need Windows, you can tell the installer to reclaim all the space on the hard drive and only install Linux. Otherwise let it setup the computer as a dual boot. 6. You may want to connect the computer to an Ethernet cable before proceeding, to make sure it has Internet access. 7. Click on the button to begin the installation process. 8. It should complete without any issues and only takes about 15-20 minutes at most. Set the root password while you are waiting but don't create any users. 9. When it is done, remove the DVD and click on the start menu-ish icon and instruct the computer to reboot. 10. Now it should boot into the Linux desktop. CONFIGURING THE MACHINE AS A BACKEND NODE 1. Leave the computer connected to the Internet for now. 2. Open a terminal. 3. Install emacs: “yum install emacs.” 4. Install gcc: “yum install gcc.” 5. Install gfortran: “yum install gcc-gfortran.” 6. Install ncsd: “yum install nscd.” 7. Install ypbind: “yum install ypbind.” 8. Install autofs: “yum install autofs.” 9. Install mpi: "yum install openmpi" 10. Find the IP address of the machine: enter “ifconfig” and look for the “inet” field for enp1s5f0/eth0 or something similar to that (not “lo” or “virbr0”). (If ifconfig is not installed, you can install it by doing “yum install net-tools”. 11. Disable the firewall: “systemctl stop firewalld; systemctl disable firewalld.” 12. Turn off SELinux: edit /etc/sysconfig/selinux and set SELINUX=disabled. 13. Edit /etc/nsswitch.conf: ... passwd: files nis shadow: files nis group: files nis hosts: files nis dns ... netgroup: files nis ... automount: files nis aliases: files nisplus 14. Give the machine a unique name by editing the /etc/hostname file. ==== FOR THE CENTRAL COMPUTER ==== 15. One computer needs to host all of the usernames and passwords and is the central machine you will log into. This can also be the computer that hosts the HTTP URL that InteractiveROSETTA will access. Unfortunately I don't have notes on how to set this up. You need to install ypserv and set the domain to be some unique ID. ====================================== 15. For all other machines, edit /etc/yp.conf and make the first line "domain server " where is the ID from 15 (i.e. "ROSETTA" could be the ID) and is the contents of /etc/hostname on the central computer hosting the usernames/passwords. 16. Edit /etc/sysconfig/network (replace "machine" with the new name for this computer"): NETWORKING=yes HOSTNAME=machine NISDOMAIN= NTPSERVERARGS=iburst 17. Enable sshd: “systemctl enable sshd” 18. Enable rpcbind: “systemctl enable rpcbind” ==== FOR THE CENTRAL COMPUTER ==== 19. ypserv needs to be enabled, probably something like "systemctl enable ypserv" ====================================== 18. For all other computers, enable ypbind: “systemctl enable ypbind” 19. Reboot, and then make sure that ypbind is working: “ypcat passwd.byname” and you should see all the encoded data of the passwords from central computer on the non-main computer. Yes, this reboot step is necessary because SELinux is still running and will cause problems for NIS and autofs. Since we disabled it SELinux will not be started up again after rebooting. 20. Make sure central computer is pingable: “ping ”. You should get regular responses back. 21. If step 19 and 20 succeeded, on the backend machine, edit /etc/exports: /home (rw,no_root_squash) /usr (rw,no_root_squash) Again, replace with the actual computer name. 22. On the backend machine, “exportfs -a” (if exportfs is not installed, do “yum install nfs-utils” 23. On the central computer, edit /etc/exports and append a new entry for the new machine at the end of the /home and /usr lines: newmachine(rw,sync,no_root_squash). 24. As root on the central computer, “exportfs -a” 25. We're going to be using autofs to mount the backend hard drives, so you DO NOT need to edit /etc/fstab. If you have both /etc/fstab set to mount a computer and autofs enabled, you'll probably cause the computer to hang at reboot/shutdown because autofs will unmount the backend hard drives first and then the regular fstab mounting daemon will attempt to unmount things that are already gone and hang forever. 26. Make the directories //home and //usr on the backend computers (if you want to mount other filesystems you have to make the mountpoints there as well). 27. I forget exactly how to do this, but on the backend computer you will be editing the /etc/auto.master file. You will have a list of mounting instructions for autofs. Here's an example line: / /etc/auto. --timeout 60 -retry=3 hard intr The first field is the mount point you created in step 26. Keep in mind this is the new backend machine you are setting up. The only thing that needs to be done on the central computer that is unique is setting up ypserv. The second field is a file that you will be creating. Create the file /etc/auto.. It should look like this: home -fstype=nfs :/home usr -fstype=nfs :/usr This tells autofs that it should look for the mount point of / and mount the /home and /usr directories of the central machine onto the backend machine at that mountpoint. 28. Enable autofs: “systemctl enable autofs” 29. Start autofs: “systemctl start autofs” 30. Edit your user preferences and make sure your home directory is set to //home/. You need this so on the backend computers it will set your home directory to the central-machine's home directory and not the backend home directory. 31. Try logging in to the new machine from the central computer and you should be placed into your home directory from bach1. 32. If not, if the user uses tcsh as their shell, make sure that tcsh is installed on the new node (it will give you a password error if it tries to start tcsh and cannot do so because tcsh is not installed). 33. Another useful tool you may want to install is ipython, which is an interactive version of Python that has tab-completion which is really useful for exploring PyRosetta and other large packages with poor documentation: as root “easy_install ipython” 34. Now you need to set the backend computer to have a static IP address. You will probably want the backend to be hooked up to the network via an Ethernet cable instead of over wireless. 35. Log into the backend and edit the /etc/hosts file and make sure the central computer machine name is listed and that its proper IP address is entered. Find this out by using the ifconfig command from a terminal on the central computer. 36. Check to see what the ethernet port is called by typing “ifconfig”. There will probably be three ports. You don't want “lo” or “vibr0.” The one you want is probably called “eth0”, “enp1s5f0”, or “p21p0” (assuming you hooked the ethernet cable into the first port, otherwise it will be 1 instead of 0). I will assume that it is called “enps1s5f0” from here on out so substitute the correct name if this is not what it is called. 37. Edit the file /etc/sysconfig/network-scripts/ifcfg-enp1s5f0. Change the line “BOOTPROTO=dhcp” to “BOOTPROTO=static”. Add three lines at the end of the file: IPADDR=192.168.1.[some number 0-255] NETMASK=255.255.255.0 GATEWAY=192.168.1.254 Replace [some number] with an integer unique to the backend machine. I'm not sure what the gateway should be because it will depend on your individual router setup. 38. Restart the network: “/etc/init.d/network restart”. Do “ifconfig”. Check to see that enp1s5f0 has “inet” set to the right IP address. It probably doesn't. Do “/etc/init.d/network restart” again. Now do “ifconfig”. It should be there now. I don't know why you need to do this twice. And I tried doing “systemctl restart network” but it doesn't seem to work (even though /etc/init.d/network claims to call systemctl). 43. Restart ypbind: “systemctl restart ypbind”. 44. Edit /etc/hosts on the central computer, add an entry for this new backend computer name, and change the IP address of the new machine to whatever you picked in step 37. 45. Make sure the central computer is pingable from the backend. Make sure the new machine is pingable from the central computer and that a user can log into the new machine from the central computer. 46. MPI doesn't need to be installed on the backend nodes, because all those files are loaded from the central computer via NFS mounting at //usr. Just edit your ~/.bashrc file and update the path to have "//usr" on your search path. 47. Make sure Rosetta is installed on the central computer.