Add host » History » Revision 9
Revision 8 (Anchi Cheng, 08/12/2014 02:09 PM) → Revision 9/13 (Anchi Cheng, 08/12/2014 02:15 PM)
h2. Add the IP address and matching hostname of the microscope and digital camera computer in your host file on the main Leginon computer, and vice versa. h3. Find out what python thinks the hostname is. * REPEAT THIS BOTH ON Linux processing server and instrument WIndows PC* so you have all the information. Run the following in python command line: <pre> import socket socket.gethostname() </pre> h3. Find out the ip address associate with the hostname Run the following in python command line: <pre> import socket socket.gethostbyname('your_host_name') </pre> h3. Modify your host file on the linux Leginon computer to include the instrument host if the latter is not already mapped by your domain name server * On Linux, this host file is > /etc/hosts Example of hosts file: <pre> 192.000.1.222 instrument_host_name.domain_name instrument_short_host_name </pre> h3. Use shorter hostname if desired If you'd like to shorten your linux hostname recognized by socket without the domain name, you may do so as root <pre> hostname your_shorter_hostname </pre> and also add that to the /etc/hosts as an alternative name <pre> 192.000.1.333 long_host_name.domain_name your_shorter_hostname </pre> You will need to restart networking to make it persistent. <pre> /etc/init.d/network restart </pre> Test the change by finding the ip address with the hostname as in the above section. h3. The Linux main Leginon computer also needs to identify itself by its hostname registered on the instrument Windows computer. * On Window XP and WIndows 7 this host file is > C:\\WINDOWS\system32\drivers\etc\hosts * On Window NT, this host file is > C:\\WINNT\system32\drivers\etc\hosts