Actions
Add host » History » Revision 10
« Previous |
Revision 10/13
(diff)
| Next »
Anchi Cheng, 08/12/2014 02:27 PM
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.¶
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:
import socket socket.gethostname()
Find out the ip address associate with the hostname¶
Run the following in python command line:
import socket socket.gethostbyname('your_host_name')
REPEAT the above on each instrument WIndows PC* so you have all the information.¶
Modify your "hosts" file on the linux Leginon computer to include the instrument hosts if the latter is not already mapped by your domain name server¶
- On Linux, this "hosts" file is at
/etc/hosts
Example of a "hosts" file:
192.000.1.222 instrument_host_name.domain_name instrument_short_host_name
Use shorter linux 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
hostname your_shorter_hostname
and also add that to the /etc/hosts as an alternative name
192.000.1.333 long_host_name.domain_name your_shorter_hostname
You will need to restart networking to make it persistent.
/etc/init.d/network restart
Test the change by finding the ip address with the hostname as in the above section.
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
Updated by Anchi Cheng about 10 years ago · 10 revisions