Linux Installation Procedure

From CLONWiki
Revision as of 11:51, 24 February 2010 by 129.57.76.91 (talk) (→‎RHEL5)
Jump to navigation Jump to search

RHEL5

Installed using CD provided by Computer Center. Requires MAC address to be registered with Computer Center (email to helpdesk@jlab.org) because it is network-based installation.

Dialog:

  • boot: <enter>
  • ...[D]esktop: Server
  • root password: enter root password
  • system user: <enter>
  • manually partition disk: 100MB /boot, 2048 etc MB swap, the rest /.

Run /usr/bin/system-config-authentication and set NIS servers list as clon00,clon10,nis1.

Add following in the end of /etc/passwd:

clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh
clascron:x:6005:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh
nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh
+@clon_cluster::::::
+@ccc::::::

Add following in the end of /etc/group:

perl::9999:freyberg
onliners::9998:heyes,hujl,rwm,timmer,wolin,taylorw,cuevas,abbottd,abulafia,anciant,anghi,aswin,auger,avakian,banta,barrow,battagli,bjlee,bogdan,brooksw,bruhwel,boiarino,buckle,burchesk,burin,bzh,cetina,chen,cole,cords,corvi,costy,davidl,costy,davidl,dcarter,dcurry,dennisl,deppman,dhlee,doughty,drago,dytman,dugger,dugger,elton,fedro,ficenec,fklein,france,freyberg,gholden,gilfoyle,golovach,gurjyan,haddock,heddle,jenkins,jhardie,jmorris,kellyk,klusman,kmkim,kossov,lcsmith,longhi,manak,marchand,marki,mastersj,mjohnson,mosbackr,mueller,muguira,murphyl,necaise,odonnell,opper,parkkj,pasyuk,phkim,piot,riccardi,richardt,ripani,rossi,saw,sergpozd,serov,sholt,staylor,taiuti,tang,tedeschi,vineyard,vlassov,vvsap,weygand,wooyoung,burchesk,clasrun,giovanet,clasboot,clascoda,clasroot,clasmail,clascron,trigger,epics,southern,carstens,ccutter,danagu,heyes,huertas,jacobsg,kliv,lachniet,mestayer,primex,nerses
clon::383:clascoda,clascron,clasmail
nagios::9997:nagios

Install updates: normally all updates should be installed by now, it can be done manually later by commands

yum list updates
yum update

Configure SSH.

RHEL4

Get RHEL4 CDs from Paul Letta.

Connect terminal, keyboard and mouse.

Boot from CD1. Follow instructions. When asked, choose following options:

  • Choose 'Manually partition with Disk Druid', set /boot to 100MB, then / to 40GB, then swap to 8192MB or at least double memory size. The rest of disk can be set as /space.
  • Network: choose manually, type clonpc2.jlab.org; click 'EDIT', deactivate 'Configure using DHCP',

type IP address and netmask (255.255.255.0), click Ok. Type Gateway (for example 129.57.167.99) and 3 DNS servers (129.57.167.5,129.57.167.14,129.57.32.100).

  • Choose 'No firewall'
  • Disable 'SELinux'
  • Choose 'Customize software packages to be installed', click 'Everything'.

You will be asked to install CD2, CD3 and CD4, then CD1 again. Then you will be asked to click 'Reboot'. First remove CD, then click 'Reboot'. You will be asked few more questions. When asked to activate service, choose 'Tell me why I need to register ..' and click 'Next'. Choose 'I can not complete registration ..' and click 'Next'. You will see 'System user' screen, click 'Use network login..'. Choose 'Enable NIS support' and click 'Configure NIS'. Type NIS Domain: 'CCCHP' and NIS Server: clon00.jlab.org. Finish installation process.

  • fix files /etc/passwd, /etc/shadow and /etc/group adding clasrun etc (see examples on another machines).

NOTE: if machine has multiple network ports, Linux may not assign them properly to specified IP names and addresses. If problem occures, open network GUI and delete all existing records. After that, click New and pick hadrware port you want to configure from the list of available ports (tricky part is to know which RJ-45 connector corresponds to which port ..). Configure and activate it, make sure it works. Repeat for other ports. Results will be stored in directory /etc/sysconfig/network-scripts, file names will be ifcfg-eth0, ifcfg-eth1 etc. If modifying those files manually, restart network by /etc/init.d/network restart. Finally, set routing, for example for clonmon command route -n shows following:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
129.57.160.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
129.57.68.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3
129.57.69.0     0.0.0.0         255.255.255.0   U     0      0        0 dev5937
129.57.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3
0.0.0.0         129.57.68.100   0.0.0.0         UG    0      0        0 eth3

Run following commands:

/sbin/route add -net 129.57.160.0 netmask 255.255.255.0 gw 129.57.160.5 dev eth1
/sbin/route add -net 129.57.68.0 netmask 255.255.255.0 gw 129.57.68.26 dev eth3
/sbin/route add -net 129.57.69.0 netmask 255.255.255.0 gw 129.57.69.206 dev dev5937
/sbin/route add -net 129.57.64.0 netmask 255.255.255.0 gw 129.57.64.57 dev eth0

Now route -n shows following:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
129.57.160.0    129.57.160.5    255.255.255.0   UG    0      0        0 eth1
129.57.160.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
129.57.68.0     129.57.68.26    255.255.255.0   UG    0      0        0 eth3
129.57.68.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3
129.57.69.0     129.57.69.206   255.255.255.0   UG    0      0        0 dev5937
129.57.69.0     0.0.0.0         255.255.255.0   U     0      0        0 dev5937
129.57.64.0     129.57.64.57    255.255.255.0   UG    0      0        0 eth0
129.57.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3
0.0.0.0         129.57.68.100   0.0.0.0         UG    0      0        0 eth3

In that example automount will do configured using clonmon-daq1 interface, because default clonmon interface is on external subnet. To make that routing table permanent (retore it after reboot) I tried to add four files with following contents to the /etc/sysconfig/network-scripts directory:

route-eth1:
  GATEWAY0=129.57.160.5
  NETMASK0=255.255.255.0
  ADDRESS0=129.57.160.0
route-eth3:
  GATEWAY0=129.57.68.26
  NETMASK0=255.255.255.0
  ADDRESS0=129.57.68.0
route-dev5937:
  GATEWAY0=129.57.69.206
  NETMASK0=255.255.255.0
  ADDRESS0=129.57.69.0
route-eth0:
  GATEWAY0=129.57.64.57
  NETMASK0=255.255.255.0
  ADDRESS0=129.57.64.0

It did not worked. Then I added four /sbin/route add .. lines to /etc/rc.local script, and it worked.

From now on you can use remote 'ssh' connection.

  • To configure your system to use the patch server, issue the following commands as root:
# mount jlabsite:/site /mnt
# /mnt/CC/linux/satellite-connect --patchall

The script will prompt you for an activation key, but if you don't know what this is, just hit ENTER and it will use a sensible default. Depending on how many patches need to be applied to your system to bring it up to the current level, this script may take a very long time to run. When it finishes, you should reboot your machine to make the new patches take effect.

To install updates later run up2date -uf as root.

Configure SSH.

To boot Linux in single user mode (no graphics), add single to the end of boot line during boot process.


background info

Add startup script

Create script in /etc/init.d/ directory (use existing scripts as example). Must have a line like

# chkconfig:	- 91 09

which specifies start and stop order. Run commands

chkconfig --add <scriptname>
chkconfig --level 3 <scriptname> on

for every level you want that script to be executed (usualy 3 and/or 4 and/or 5). Check if it os done using command

chkconfig --list | grep <scriptname>


xxx

You can choose to download the RHEL operating system directly from the Red Hat Web site and not receive a media kit from HP containing the software. This scenario occurs when the media option AJR is deselected from the order. (The media kit option is always selected by default. )

It is necessary to register at the Red Hat Web site prior to download. Registration requires the activation code that each customer receives from HP when ordering either RHEL.

You can download RHEL for each available platform as four CD ISO images or one DVD ISO image.

Use the following procedure to download RHEL and create the installation media:

  1.
     Register and log in at the following Red Hat Web site:
     www.redhat.com/rhn
  2.
     Click on channels and then select Red Hat Enterprise Linux ES (v.4 for 64–bit Intel Itanium).
  3.
     Select Downloads and then download the ISO images of install, compatibility and source disks
     Files with ia64 in the name are for the Itanium platform.
  4.
     Create the CDs or a DVD from the ISO images.


IMPORTANT: Create the CDs or DVD using the contents of the ISO images. Do not create the CDs or DVD by burning the .iso files themselves to CD or DVD. For example, if you are using K3b to burn a CD, click Tools>CD>Burn CD Image, select the .iso image, then click Burn.

Bootup scripts for example for level 5 execution (multiuser with X):

cp <script-file> /etc/init.d/
chmod +x /etc/init.d/<script-file>
ln -s /etc/init.d/<scriptfile> /etc/rc.d/rc5.d/S50<scriptfile>
ln -s /etc/init.d/<scriptfile> /etc/rc.d/rc5.d/K50<scriptfile>


Changing hostname/IP address

Changing hostname on RHEL
1. Change the HOSTNAME line in /etc/sysconfig/network
2. Change the hostname (FQDN and alias) in /etc/hosts
3. Run '/bin/hostname new_hostname' for the hostname change to take effect immediately.
4. Run '/sbin/service syslog restart' for syslog to log using the new hostname.
A reboot is not required to change the system hostname.
IP address: You have to change the IP address entry in
/etc/sysconfig/network-scripts/ifcfg-eth0.