Linux Installation Procedure

From CLONWiki
Revision as of 12:36, 26 September 2013 by 129.57.76.91 (talk) (→‎RHEL5)
Jump to navigation Jump to search

RHEL6

Installed using CD provided by Computer Center. Requires MAC address to be registered with Computer Center (using jnet.jlab.org as 'boiarino') because it is network-based installation.

NOTE: all disks will be reformatted in a process, all information will be lost !

Dialog:

  • boot: <enter>
  • ...[D]esktop: <enter>
  • root password: enter root password
  • admin user: boiarino

Installation will proceed. When prompted, remove installation disk and reboot machine if not done automatically. After reboot patching process will be started and it will take a while, do not interrupt it, otherwise system will not be installed correctly.


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 (it is ignored, will do Desktop anyway ...)
  • root password: enter root password
  • system user: <enter>
  • manually partition disk: 100MB /boot, 2048 etc MB swap, the rest /.

CFENGINE: there are procesess restoring some system config files (in particular /etc/ssh/sshd_config) in according to the Computer Center - maintained templete. To shut them down: (1) comment out cfengine-related stuff in root cronjobs; (2) do /etc/init.d/cfengine stop; (3) do chkconfig cfengine off. Ask CC (Sherman White, Paul Letta) to fix templete.

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
clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh
clascron:x:6005:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh
clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh
clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh
epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh
nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh
+@clon_cluster::::::
+@ccc::::::

Add following in the end of /etc/group:

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,hovanes,nerses,sytnik
clon::383:clascoda,clascron,clasmail
nagios::9997:nagios

Create /etc/shadow files with entries for users clasrun, epics and nagios (copy from another machine).

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

yum list updates
yum update

Configure SSH.

Install missing packages:

yum install openmotif-devel xinetd mysql-devel cmake

Some additional packages on request (for EPICS):

yum install mc lapack lapack-devel blas blas-devel giflib-devel

Proceed to the Linux Customization on CLON Cluster.

PROBLEMS:

1. /usr/lib/libg2c.so link is missing

FIXED ??? 2. /usr/lib/libXm.so link is missing

3. Created /etc/shadow file for clasrun, epics and nagios

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.