New Machine
From ILabWiki
User_Help: New_Member | New_Machine | Ftp_install | Machines | Common_Shares | Printing_From_Windows | My_New_Page
Nates Wicked Guide to Setting Up Your Machines Networking at iLab
This instruction will aid you in setting up
- internet bonding
- NFS (http://www.die.net/doc/linux/man/man5/nfs.5.html) (network file service) for file sharing
- NIS (http://dict.die.net/network%20information%20service/) (network information service) for network wide password authentication
For current information on servers
click here (http://ilab.usc.edu/wiki/index.php/Machines)
Follow these steps:
- NOTE: If not using internet bonding skip the Triple.net and Bonding steps completely
Get Bonding files from Laurent
Get a copy of triple-net.tgz from Laurent
Get a copy of bonding from another machine
it's in /etc/rc.d/init.d (http://www.linux.com/article.pl?sid=06/01/03/1728227)
EDIT /etc/modules.conf
In /etc/modules.conf (http://linux.about.com/od/commands/l/blcmdl5_modules.htm) add the line alias bond0 bonding
EDIT /etc/hosts
/etc/hosts (http://www.faqs.org/docs/securing/chap9sec95.html) should look like
127.0.0.1 localhost.localdomain localhost 192.168.0.249 iLab4.usc.edu iLab4
WHERE 192.168.x.x is your lab IP and 128.125.x.x is your internet IP
EDIT /etc/auto.master
In /etc/auto.mastermake (http://linux.about.com/library/cmd/blcmdl5_auto.master.htm) sure it only contains
On Mandriva 2007, the file is /etc/autofs/auto.master
FOR Mandrake 8
/lab auto.lab
FOR Mandrake 8.1 and newer
/lab yp:auto.lab
FOR Mandriva 2007 and later the file has moved to:
/etc/autofs/auto.master
Use the same line
/lab yp:auto.lab
Be sure and add a carrage return after this line!
- As a note, auto.master does not install by default sometimes. You may need to add it using DrakConf (http://en.wikipedia.org/wiki/Drakconf)
EDIT /etc/exports
This will indicate which directories you wish to share over NFS. /etc/exports (http://www.faqs.org/docs/securing/chap5sec33.html) should look like:
/home/tmp 192.168.0.0/24(rw,async) 128.125.37.155/32(rw,async) 128.125.111.57/32(rw,async) 128.125.37.131/32(rw,async) /home/mundhenk 192.168.0.0/24(rw,async) 128.125.37.155/32(rw,async) 128.125.111.57/32(rw,async) 128.125.37.131/32(rw,async)
Change /home/mundhenk to your own home directory
EDIT /etc/yp.conf
In /etc/yp.conf (http://linux.about.com/library/cmd/blcmdl5_yp.conf.htm) the line
domain lab server 192.168.0.200
WHERE 192.168.0.200 is address if the NIS server
- Note that yp my not be installed by default. as such you may need to install it using DrakConf (http://en.wikipedia.org/wiki/Drakconf)
EDIT /etc/passwd
In /etc/passwd (http://www.die.net/doc/linux/man/man1/passwd.1.html) add the line
+::::::
EDIT /etc/sysconfig/network
In /etc/sysconfig/network (http://www.faqs.org/docs/securing/chap9sec93.html) Add the nisdomain line
NISDOMAIN=lab
- If your network is connected to USC directly it should look like
NETWORKING=yes FORWARD_IPV4=false HOSTNAME=iLab4.usc.edu DOMAINNAME=usc.edu GATEWAY=128.125.254.43 GATEWAYDEV=eth0 NISDOMAIN=lab
- If your network is connected to the iLab internal network it should look like
NETWORKING=yes FORWARD_IPV4=false HOSTNAME=iLab4.java.usc.edu DOMAINNAME=java.usc.edu GATEWAY=192.168.0.101 GATEWAYDEV=eth0 NISDOMAIN=lab
- NISDOMAIN=lab tells ypbind (http://www.die.net/doc/linux/man/man8/ypbind.8.html) (NIS) on your machine what domain it is in VERY IMPORTANT.
- If you are using DHCP you only need to add the NISDOMAIN line.
Make Sure amd is not Installed
In ntsysv (http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/s1-services-ntsysv.html) Make sure amd (The service not the Chip Maker) is not running. However, amd tends not to be installed on newer Mandriva/Mandrake versions.
- ntsysv is Deprecated on Newer Mandrake Versions
Instead, type:
DrakConf
to run the Mandrake Control Center and set up services that way.
Install Triple Net (Bonding)
UNPACK triple-net.tgz into /etc/sysconfig/network-scripts
This should create directories:
/etc/sysconfig/network-scripts/ENSLAVED /etc/sysconfig/network-scripts/SEPARATE
along with files bond and unbond.
EDIT files in /etc/sysconfig/network-scripts/SEPARATE
ifcfg-eth0 should look like
DEVICE=eth0 BOOTPROTO=static IPADDR=128.125.111.157 NETMASK=255.255.0.0 NETWORK=128.125.0.0 BROADCAST=128.125.255.255 ONBOOT=yes
ifcfg-eth1 should look like
DEVICE="eth1" BOOTPROTO="none" IPADDR="192.168.0.249" NETMASK="255.255.255.0" NETWORK=192.168.0.0 BROADCAST=192.168.0.255 ONBOOT="yes" IPXNETNUM_802_2="" IPXPRIMARY_802_2="no" IPXACTIVE_802_2="no" IPXNETNUM_802_3="" IPXPRIMARY_802_3="no" IPXACTIVE_802_3="no" IPXNETNUM_ETHERII="" IPXPRIMARY_ETHERII="no" IPXACTIVE_ETHERII="no" IPXNETNUM_SNAP="" IPXPRIMARY_SNAP="no" IPXACTIVE_SNAP="no"
eth2 and eth3 should also look this way. Notice, change 192.168.0.x to your internal IP. eth2 should be set to 192.168.1.x and eth3 should be set to 192.168.2.x
EDIT files in /etc/sysconfig/network-scripts/ENSLAVED
You should change ifcfg-bond0 to you internal IP. it should look like
DEVICE="bond0" USERCTL="no" BOOTPROTO="none" IPADDR="192.168.0.249" NETMASK="255.255.255.0" NETWORK=192.168.0.0 BROADCAST=192.168.0.255 ONBOOT="yes" IPXNETNUM_802_2="" IPXPRIMARY_802_2="no" IPXACTIVE_802_2="no" IPXNETNUM_802_3="" IPXPRIMARY_802_3="no" IPXACTIVE_802_3="no" IPXNETNUM_ETHERII="" IPXPRIMARY_ETHERII="no" IPXACTIVE_ETHERII="no" IPXNETNUM_SNAP="" IPXPRIMARY_SNAP="no" IPXACTIVE_SNAP="no"
WHERE 192.168.0.x is your internal IP also edit ifcfg-etho it should look like
DEVICE="eth0" BOOTPROTO="none" IPADDR="128.125.111.203" NETMASK="255.255.0.0" NETWORK=128.125.0.0 BROADCAST=128.125.255.255 ONBOOT="yes" IPXNETNUM_802_2="" IPXPRIMARY_802_2="no" IPXACTIVE_802_2="no" IPXNETNUM_802_3="" IPXPRIMARY_802_3="no" IPXACTIVE_802_3="no" IPXNETNUM_ETHERII="" IPXPRIMARY_ETHERII="no" IPXACTIVE_ETHERII="no" IPXNETNUM_SNAP="" IPXPRIMARY_SNAP="no" IPXACTIVE_SNAP="no"
WHERE 128.125.11.203 is your IP address for the internet
COPY bonding to /etc/rc.d/init.d
Once the bonding init script is in /etc/rc.d/init.d (http://www.linux.com/article.pl?sid=06/01/03/1728227) Run ntsysv and make sure it is checked
- ntsysv is Deprecated on Newer Mandrake Versions
Instead, type:
DrakConf
to run the Mandrake Control Center and set up services that way.
In etc/rc.d/init.d type ./network stop then type ./bonding
Open the directory /etc/rc.d/init.d (http://www.linux.com/article.pl?sid=06/01/03/1728227) then you will stop networking by typing
./network stop.
then type
./bonding start
then type
./network start
if all went well you can type ifconfig (http://www.die.net/doc/linux/man/man8/ifconfig.8.html)
and it should look something like:
bond0 Link encap:Ethernet HWaddr 10:20:30:00:00:F9
inet addr:192.168.0.249 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:177722 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:115618393 (110.2 Mb)
eth0 Link encap:Ethernet HWaddr 00:02:44:03:F9:E3
inet addr:128.125.111.157 Bcast:128.125.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:250994 errors:0 dropped:0 overruns:0 frame:0
TX packets:78418 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:118639530 (113.1 Mb) TX bytes:7465330 (7.1 Mb)
Interrupt:11 Base address:0x1000
eth1 Link encap:Ethernet HWaddr 10:20:30:00:00:F9
inet addr:192.168.0.249 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:53720 errors:0 dropped:0 overruns:0 frame:0
TX packets:59241 errors:0 dropped:0 overruns:2 carrier:0
collisions:0 txqueuelen:100
RX bytes:12733951 (12.1 Mb) TX bytes:38839272 (37.0 Mb)
Interrupt:11 Base address:0x3000
eth2 Link encap:Ethernet HWaddr 10:20:30:00:00:F9
inet addr:192.168.0.249 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:53415 errors:0 dropped:0 overruns:0 frame:0
TX packets:59241 errors:0 dropped:0 overruns:3 carrier:0
collisions:0 txqueuelen:100
RX bytes:12940070 (12.3 Mb) TX bytes:38757819 (36.9 Mb)
Interrupt:5 Base address:0x5000
eth3 Link encap:Ethernet HWaddr 10:20:30:00:00:F9
inet addr:192.168.0.249 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:53413 errors:0 dropped:0 overruns:0 frame:0
TX packets:59240 errors:0 dropped:0 overruns:2 carrier:0
collisions:0 txqueuelen:100
RX bytes:12731770 (12.1 Mb) TX bytes:38072888 (36.3 Mb)
Interrupt:11 Base address:0x7000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3410 errors:0 dropped:0 overruns:0 frame:0
TX packets:3410 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:414236 (404.5 Kb) TX bytes:414236 (404.5 Kb)
Be sure and check /etc/resolv.conf
/etc/resolv.conf (http://blogs.cyberciti.biz/hm/index.php/2005/10/18/resolve-conf-linux-example/) should look like
domain java.usc.edu search java.usc.edu localdomain nameserver 192.168.0.102 nameserver 192.168.0.103 nameserver 192.168.0.104
Restart autofs
In /etc/rc.d/init.d type
./autofs (http://www.linux-consulting.com/Amd_AutoFS/autofs.html) stop
then type
./autofs start
REBOOT
If all went well
you can change directories like ~mundhenk or ~itti with no problem. You should also be able to log into this work station as other people in the NIS domain.</h2>
Install packages in /lab/packages/forall
Nathan 15:17, 2 Feb 2007 (PST)
Optional Install Sections
Install DNT
ERRORS: If you get a yp-bind error in start up run rpcinfo -p it should
look like:
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100007 2 udp 675 ypbind
100007 2 tcp 677 ypbind
100024 1 udp 32768 status
100024 1 tcp 32768 status
100011 1 udp 898 rquotad
100011 2 udp 898 rquotad
100005 1 udp 32769 mountd
100005 1 tcp 32769 mountd
100005 2 udp 32769 mountd
100005 2 tcp 32769 mountd
100005 3 udp 32769 mountd
100005 3 tcp 32769 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100021 1 udp 32771 nlockmgr
100021 3 udp 32771 nlockmgr
100021 4 udp 32771 nlockmgr
100002 3 udp 32772 rusersd
100002 2 udp 32772 rusersd
You can check here to make sure portmapper and nfs started. If not
make sure they are selected in ntsysv.
also make sure you set your NIS domainname as per previous instruction.
Also make sure that eth1-3 are all on the same IP. If not, then they
are not bonded. Make sure bonding is in /etc/rc.d/init.d and the it is
checked in ntsysv
Changing default Emacs colors
Edit /etc/X11/app-defaults/Emacs and change, for example:
emacs.Foreground: Black emacs.Background: Wheat
Exporting directories for use by other machines
Edit /etc/exports. Export only to machines on our fast local network, for security reasons. For example:
/home/tmp 192.168.0.*(rw) /home/cns 192.168.0.*(rw) /home/cnsdata 192.168.0.*(rw) /home/beo1 192.168.0.*(rw) /home/beo2 192.168.0.*(rw) /home/beo3 192.168.0.*(rw) /home/beo4 192.168.0.*(rw) /home/beo5 192.168.0.*(rw) /home/httpd 192.168.0.*(rw) /home/ftp 192.168.0.*(rw) /home/linux 192.168.0.*(rw) /home/packages 192.168.0.*(rw) /home/dntcfgd 192.168.0.*(rw) /home/dump 192.168.0.*(rw) /home/cvsroot 192.168.0.*(rw)
Make sure "nfs" and "nfslock" system services are active (see ntsysv). Web server configI prefer to have the web site in /home/httpd rather than the default location /var/www. To move it, physically move the directory, then edit
/etc/httpd/conf/commonhttpd.conf
and search/replace
/var/www
by
/home/httpd.
Then remove
/var/www
and
ln -s /home/httpd /var/www
User web pages should be placed in
~user/public_html
NTP Time Synchronization Configuration
To configure NTP (http://www.ntp.org/) edit /etc/ntp.conf (http://www.die.net/doc/linux/HOWTO/TimePrecision-HOWTO/ntp.html), remove the local server and fudge lines, and add the servers:
server nerd-cam
Then, create
/etc/ntp/step-tickers
that should contain the line:
nerd-cam
SNMP Client Monitoring
You can join your machine to the central cluster monitoring used by the lab by installing SNMP. This can be done on windows as well. For Linux install net-snmp that comes with Mandriva. You will need to rpm three packages:
- net-snmp-mibs
- net-snmp-utils
- net-snmp
After you have installed these, we suggest a few edits. However, SNMP will run right out of the box.
Edit /etc/snmp/snmpd.conf
Edit the machine and location lines like:
syscontact mundhenk@usc.edu sysname magnarama.java.usc.edu syslocation University of Southern California, HNB 10
replace sysname with the name of your machine and syscontact with your email address.
Edit /etc/init.d/snmpd/
The default is rather logging intensive. We can change that by altering the daemon options: Change:
OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd -a"
to
OPTIONS="-Lf /dev/null -p /var/run/snmpd -a"
Let Nathan Know You Installed SNMP
Nate will need to attach a monitor to your machine so that it appears in the lab statistics.
Anonymous ftp install
I prefer to have it in
/home/httpd/html/ftp
rather than
/var/ftp
Type
cp -arf /var/ftp/* /home.httpd/html/ftp rm -rf /var/ftp ln -s /home/httpd/html/ftp /var/ftp
Then run kwuftpd and configure from there.
General network security config
in /etc/hosts.allow: (http://www.die.net/doc/linux/man/man5/hosts.allow.5.html)
ALL: LOCAL 192.168.0.
in /etc/hosts.deny: (http://www.die.net/doc/linux/man/man5/hosts.deny.5.html)
ALL: ALL
in /etc/hosts.equiv: (http://www.die.net/doc/linux/man/man5/hosts.equiv.5.html)
192.168.0.*
YPserv config
edit /var/yp/Makefile; in particular change MINUID and MINGID. Then change
auto.home
into
auto.lab.
Automatic temporary cleanup
Create
/home/tmp/1 /home/tmp/7 /home/tmp/30 /home/tmp/u
and then
chmod 777
to all of them. Then edit
/etc/cron.daily/tmpwatch
and add the following lines (at top):
/usr/sbin/tmpwatch -m 24 /home/tmp/1 /usr/sbin/tmpwatch -m 168 /home/tmp/7 /usr/sbin/tmpwatch -m 720 /home/tmp/30
and make sure it is executable.
Matlab install
Consult the Matlab Help Page
Server Install Section
Listar config
- get the listar package
- copy listar.cfg to /etc
- copy the aliases into /etc/aliases
- copy listar account into /home
- rpm install created /var/listar ->
- overwrite its contents into /home/listar, delete it, then make a link from /var/listar to /home/listar
Creating a new list with Listar
cd /home/listar ./listar -newlist beobots
then copy the output to /etc/aliases and
cd /var/yp
and
make
if using postfx, also copy that stuff into
/etc/postfix/aliases
and restart postfix.
Restoring a dump
cat dumpxxx.gz.a* | gzip -d | restore -if - then add file to add to the restore list cd dir ls delete file to remove from restore list extract to get selected files
Postfix configuration (mail server)
Activate it with ntsysv export /var/spool/mail on server add /lab/mail to auto.lab instruct users to use /lab/mail as mail directory
Making fonts work for Dia
Install the package urw-aliases-0.0-1.noarch.rpm or later version. Then edit
/etc/X11/fs/config
and add the line
"usr/share/fonts/default/urw-aliases,"
just after the "...:unscaled" lines. Then do a
killall -USR1 xfs
to get the new fonts going.
