version and create the six CD’s for loading from
Transcription
version and create the six CD’s for loading from
How to install the PROMPT System under CentOS Linux Download the CentOS 5.3, i386 version and create the six CD’s for loading from CD. The procedure explained here involves a Dell Poweredge T105 with two Sato 160GB drives. All steps marked with ** are required to bring up PROMPT. A. Load CentOS ** 1. Be sure to have a mouse installed because the install is GUI 2. Insert the first CD disk 1 of 6. 3. When the hardware starts up chose F11 for the boot menu 4. Select the CD Rom (Embedded Optical Drive Port C) 5. A screen will appear and under it will say boot: Type linux nomraid Then press enter 6. Verify Media – Skip 7. Welcome to CentOS - Next 8. Language; English - Next 9. Keyboard: us – Next 10. If CentOS is already installed choose Reinstall to replace and start over or CentOS 5.3 to upgrade 11. Choose the option below and check mark Review and Modify Partitioning Layout (The remaining steps a-k will set up the software RAID 1) Remove all partitions on selected drive(s) and create default layout a) Delete all partitions including LVM’s only /dev/sda and /dev/sdb remaining with free space b) Click New and create 101MB software RAID partition one at a time on both dsa and sdb for /boot. Check mark the box “force to be primary partition”. c) Click New and create a 4032MB software RAID partition one at a time on sda and sdb for swap d) Click New and create a software RAID partition one at a time on sda and sdb for /. Click “Fill to maximum allowable size to use remaining space”. e) Click the RAID button, create a RAID device f) Pick the two 101MB partitions (sda1 and sda2), mount point /boot, filesystem type ext3, RAID1 (default RAID device should be md0), click OK g) Click the RAID button, create a RAID device h) Pick the two 4032MB partitions (sda2 and sdb2), filesystem type swap, RAID1, (default RAID device should be md1), click OK i) Click the RAID button, create a RAID device. j) Pick the two large remaining partitions, mount point /, filesystem type ext3, RAID1, (default RAID device should be md2), click OK k) Your partitions are complete. Your screen should be like this example: 1 RAID Devices /dev/md0 /boot /dev/md1 /dev/md2 / ext3 [check mark] swap [check mark] ext3 [check mark] 101 4031 148452 Hard Drives /dev/sda /dev/sda1 /dev/md0 Software Raid [No checkmark] 101 /dev/sda2 /dev/md1 Software Raid [No checkmark] 4031 /dev/sda3 /dev/md2 Software RAID [No checkmark] 148452 /dev/sdb /dev/sdb1 /dev/md0 Software Raid [No checkmark] 101 /dev/sdb2 /dev/md1 Software Raid [No checkmark] 4031 /dev/sdb3 /dev/md2 Software RAID [No checkmark] 148452 12. Click next to go to the GRUB Boot Loader that will default as shown below [ * ] The GRUB boot loader will be installed on /dev/md0 (do not change): Default Label Device * CentOS /dev/md2 Use a boot loader configuration password: (no entry) Configure advanced boot loader options: (no entry) Next 13. Configure Network Interface Network Devices Click Edit [ * ] Enable IPv4 Support [ ] Dynamic IP configuration (DHCP) (Uncheck this box) [ * ] Manual address configuration (Check this box) IP address: 192.168.1.2 (our Standard) Netmask: 255.255.255.0 [ ] Enable Ipv6 Support (Remove * from box.) OK Hostname: [ * ] Manually - change localhost.localdomain to Prompt Miscellaneous Settings Gateway: 192.168.1.1 (our Standard) Primary DSN: (leave blank but you will get a warning) Secondary DSN: (leave blank but you will get a warning) Click Next and click continue at the warning 14. [ * ]System Clock uses UTC America/New_York Next Root password mysecret You define password Next 15. Package Installation-Choose Server and Server GUI then check “Customize Now” - Next Customize software selection (Choose Applications, Development, Servers and Base selections as shown on the next page) 2 APPLICATIONS Editors Graphic Internet Graphics Sound and Video Text based Internet DEVELOPMENT Development Tools Legacy Software Development X Software Development SERVERS FTP Servers Legacy network server Mail Server Network Servers Printing Support Server configuration tools Web Server Windows File Server BASE Administrative Tools Base Dial up network support Legacy software development System Tools X Windows System Click Next 16. A complete log of your installation will be in /root/install.log Next 17. The software you have selected to install will require the following CD’s CentOS 5.3 CD #1 CentOS 5.3 CD #2 CentOS 5.3 CD #3 CentOS 5.3 CD #4 CentOS 5.3 CD #6 Click Continue 18. The installation will now format the file system and the second CD will be requested after a few minutes, then each CD will be requested when ready. 19. Congratulations – Your CentOS installation is complete Remove any media used during this installation process and click reboot to reboot your system and you will come up in GUI 20. Setup Agent – post install modifications – do as shown then click forward) Authentications – do nothing Firewall Configuration – Disable the firewall SELinux – Change to permissive Kdump – Enable and give 256 K Keyboard Configuration – do nothing Network Configuration – do nothing System Service Configuration- do nothing Time Zone Configuration – modify if needed User account - Do not set up a user account 3 21. You will get a login requesting user account: root the password will be what you entered in 14 as the root password. Click Applications then choose Accessories then Terminal for a command prompt (#) 22. This next step will assure that the grub boot loader is installed on both physical drives and that the system will be bootable even if one of the drives fails. You must repeat this procedure (a - b) after a disk failure replacement and also do step B 3 below when replacing a failed disk. You must be at root and su a) Type very carefully the commands shown in bold: /sbin/grub grub> device (hd0) /dev/sda grub> device (hd1) /dev/sdb grub> root (hd0,0) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd0) Checking if “boot/grub/stage1” exists …no Checking if “/grub/stage1” exists …yes Checking if “/grub/stage2” exists …yes Checking if “/grub/e2fs_stage1-5” exists …yes Running “embed /grub/e2fs_stage1-5 (hd0)”….15 sectors are embedded Succeeded Running “install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/grub/stage2 /grub/grub.conf” succeeded Done b) grub> root (hd1,0) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd1) Checking if “boot/grub/stage1” exists …no Checking if “/grub/stage1” exists …yes Checking if “/grub/stage2” exists …yes Checking if “/grub/e2ts_stage1-5” exists …yes Running “embed /grub/e2fs_stage1-5 (hd1)”….15 sectors are embedded Succeeded Running “install /grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/grub/stage2 /grub/grub.conf” succeeded Done grub> quit You will return to # and type exit that will also return a # 23. The system is coming up at run level 5 because of GUI install and you must change it to come up at run level 3, by doing the following: Go to /etc/ Type: vi inittab Find this line: Id:5:initdefault: Change the 5 to a 3. 4 When you return to the command prompt # check the RAID to see if it is finished updating (see B4 below to know what updating looks like) and when it is finished updating - Type reboot to reboot the system B. Review Raid - After the reboot this is what the RAID is supposed to look like. 1. You must be at root 2. Type this command to see the RAID setup # cat /proc/mdstat This is how the file looks if both drives are working okay and updated Personalities: [raid1] md0: active raid1 sdb1[ 1 ] sda1[ 0 ] 104320 blocks [2/2] [UU] md1: active raid1 sdb2[ 1 ] sda2[ 0 ] 4128640 blocks [2/2] [UU] md2: active raid1 sdb3[ 1 ] sda3[ 0 ] 152014976 blocks [2/2] [UU] unused devices: <none> This is how it looks if drive 0 has failed This is how it looks if Drive 1 has failed Personalities: [raid1] md0: active raid1 sda1[ 1 ] 104320 blocks [2/1] [_U] Personalities: [raid1] md0: active raid1 sda1[ 0 ] 104320 blocks [2/1] [U_] md1: active raid1 sda2[ 1 ] 4128640 blocks [2/1] [_U] md1: active raid1 sda2[ 0 ] 4128640 blocks [2/1] [U_] md2: active raid1 sda3[ ! ] 152014976 blocks [2/1] [_U] md2: active raid1 sda3[ 0 ] 152014976 blocks [2/1] [U_] unused devices: <none> 3. After replacing a failed drive add it back using these commands and it will automatically rebuild the replaced drive from the good drive. # mdadm /dev/md0 --add /dev/sda1 (or /dev/sdb1 if replaced) # mdadm /dev/md2 --add /dev/sda3 (or /dev/sdb3 if replaced) 4. This is an example of what you see when a replaced disk is updating when you use this command: # cat /proc/mdstat [>…………] recovery = 7.0% (10777408/1520148976) finish=22.4 min speed=100656ksec 5 The md0: and md2: blocks remains like shown above under “how a failed drive looks” until the failed drive has been rebuild to match the good drive, then returns to the view shown in “how drive looks if working” when fully rebuilt. C. Modify Operating system to support PROMPT ** After the Operating System is installed and RAID determined to be okay, then make these Modifications 1. Log in as follows: localhost login: root (press enter) password: mysecret (your password) (press enter) 2. Create a user account, set the Group ID and ownership and set up a password. – Call for help if not familiar with vi editor cd /etc groupadd -g 300 group useradd -g group –u 300 edx # passwd edx Changing password for user edx New password: prompt BAD PASSWORD: it is based on a dictionary word Retype password: prompt Passwd: all authenications tokens updated successfully vi passwd the last entry in the file must be edx:x:300:300:Prompt:/home/edx:/bin/bash Edit “Prompt” into this line to make Prompt the default system. 3. Modify the VGA display by going to /etc/sysconfig vi i18n change: SYSFONT=’latarcyrheb-sun16” to be: SYSFONT=”lat0-16” (the number after t is zero) change: LANG=”en_US.UFT-8” Then add: LANG=”C” 4. Create edx directory and set up link cd / mkdir /usr/edx chown edx /usr/edx chgrp group /usr/edx ln –s /usr/edx /edx ( the first letter on this line is a lower case L) 5. Define ownership and permissions if you will use a direct attach parallel 6 . printer port. (Rarely used but retained for older computers) Use the same approach for direct attached serial printers, for example /dev/ttyS3, and add chmod a+x cd /dev chmod a+rw /dev/lp0 chown edx /dev/lp0 chgrp group /dev/lp0 6. Define, then enter, the start up script cd /etc/init.d vi edx cd /edx ./edxsport sleep 3 su edx -c /edx/bin/ipledx 7. After saving the file set the ownership and permissions chmod a+rw edx chmod a+x edx 8. Create links to start up and shutdown ln –s ../init.d/edx /etc/rc.d/rc0.d/K98edx ln –s ../init.d/edx /etc/rc.d/rc1.d/K98edx ln –s ../init.d/edx /etc/rc.d/rc2.d/S98edx ln –s ../init.d/edx /etc/rc.d/rc3.d/S98edx ln –s ../init.d/edx /etc/rc.d/rc5.d/S98edx (do this if using GUI) 9. Set #SYSLOG to auto start and set VGA colors cd /etc vi inittab Change line 1 under “Run gettys in standard run level” to read as follows: 1:2345:respawn:/sbin/mygetty1 tty1 Also, comment out line 2 by placing an # at the beginning as shown: #2:2345:respawn:/sbin/mingetty tty2 To complete this auto start for tty2 go to /etc and enter this command into the file just before touch: vi rc.local chown edx /dev/tty2 chgrp tty /dev/tty2 10. Next, go to /sbin and enter this file: 7 vi mygetty1 #!/bin/sh setterm -background red –store > /dev/tty1 setterm -background blue –store > /dev/tty2 exec /sbin/mingetty tty1 11. After saving the file set the ownership and permissions chmod a+x mygetty1 12. Setup Auto tape backup, if used cd /usr/bin vi prbackup tar cf /dev/st0 /usr/edx* After saving the file set the ownership and permissions chmod a+rw prbackup chmod a+x prbackup chown edx prbackup chgrp group prbackup 13. Tell crontab about the auto backup, if used cd /etc vi crontab Change MAIL TO=root to MAIL TO=edx Add a new line before 02 4 * * * root run-parts /etc/cron.daily 02 0 * * * root prbackup /etc/cron.daily 14. Edit the path in .bash_profile (/home/edx) by adding as below: PATH=$PATH:$HOME/bin:.:/edx/bin Then make the following as the last line in this file to start edx: edx -s –l rollon –p 10 ( after the –s is – lower case L) D. Set up printers ** (only step 1 required now, 2-21 can wait) 1. Prepare for the use of the Cups Admin printer web tool with these modifications to CentOS 5. cd /etc/cups vi cupsd.conf After the line “# Only listen for connections from the local machine.” You will see “Listen localhost:631” you need to add the following line Listen 192.168.1.2:631 (the IP of the server-port 631) After the line “# Restrict access to the server …” You will see “<Location /> 8 Order allow,deny” allow @LOCAL - you need to add the following line After the line “# Restrict access to the admin pages …” You will see “<Location /admin> Encryption Required Order allow, deny” - you need to add the following line allow @LOCAL After the line “# Restrict access to configuration files …” You will see “<Location /admin/conf> AuthType Default Require user @SYSTEM Order allow,deny” - you need to add the following line allow @LOCAL 2. This document assumes you are familiar with setting up printers using PROMPT. For more information see www.prompt-usa.com support Technical Support Documentation – Defining workstations and printers. We will use three examples beginning with the following that are assumed to be already setup in termxref.sys: $SYSPRTR | lpr –Psys: PRINTER2 | lpr -Ppr2: PRINTER3 | lpr -Ppr3: (example of the system printer) (example of laser printer Canon Pixma) (example of laser printer HP office Jet) 3. First, the $SYSPRTR set up example: Go to a Windows® Desktop PC in the same local area network as the PROMPT/Linux server you are installing and type the following IP address: https://192.168.1.2:631/admin (to access the server’s Cups Admin printer setup) It is slow to come up the first time and you will likely get a warning that the security certificate is not current – just click continue. 4. Click the Home tab then click Add Printer Enter Name: sys (example $SYSPRTR - must use sys per step 2 above) Enter Location: Copy Room (where the printer is located) Enter Description: Okidata 320 (The printer make and model) Click Continue 5. Enter the device from the dropdown as: LPD/LPR host or printer For Okidata direct attach to parallel port or with print server. Click Continue 6. Enter the Device URL: lpd://192.168.1.10 (example of Okidata with printer server attached. Click Continue 7. Enter the Make from a dropdown: Raw (ALWAYS use raw!) Click Continue 8. Enter Model: Raw Queue (en) will appear and you need to highlight it by 9 clicking on it (do not change this selection) Click Add Printer (This may require that you log in as Root with the root password then OK the printer to be added. 9. You will go to banners that is set to “none” and set Policies to Error= retryjob and Operation policy=default Click Set printer option 10. You should see a Successful setup message and will go to the Printers tab on the Admin page. DO NOT USE the TEST PRINT button, instead test the print from PROMPT! 11. Next, the PRINTER2 set up example using the admin printer setup page. 12. Click the Home tab then click Add Printer Enter Name: pr2 (example PRINTER2 - must use can per step 2 above) Enter Location: Desk 2 (where the printer is located) Enter Description: Canon Pixma IP 1600 (The printer make and model) Click Continue 13. Enter the device from the dropdown as: LPD/LPR host or printer For Okidata direct attach to parallel port or with print server. Click Continue 14. Enter the Device URL and LPD queue: lpd://192.168.1.15/can (example of Canon with printer Alphacom LPD and printer name can on PC with static IP address 192.168.1.15 Click Continue 15. The remaining steps are the same as 7-10 above. 16. Last the PRINTER3 setup example using the admin printer setup page 17. Click the Home tab then click Add Printer Enter Name: pr3 (example PRINTER3 - must use jet from step 2 above) Enter Location: Office (where the printer is located) Enter Description: Photosmart C 5140 (The printer make and model) Click Continue 18. Enter the device from the dropdown as: APPSOCKET/HP Jet Direct For a Jet direct HP or similar network printer (no print server involved) Click Continue 19. Enter the Device URL: socket://192.168.1.100:9100 (example of network printer jet direct. Click Continue 20. The remaining steps are the same as 7-10 above. 21. Remember you might later have to go to PROMPT option PD then PC to enter PCL codes for laser printers. See www.prompt-usa.com support Administrative Support How to determine where and how PROMPT prints E. Install MIME-Lite and Send Mail to support PROMPT Automatic email (can wait until PROMPT is loaded) 1. Copy the MIME-Lite installation file shown below into /root MIME-Lite-2.117.tgz 10 2. Execute this command to extract the appropriate files for installation and create the MIME-Lite2.117 directory tar zxvf MIME-Lite-2.117.tgz 3. To install execute these instructions: cd MIME-Lite-2.117 perl Makefile.PL make test make install 4. Change sendmail to send email using smart host and masquerade the domain name of your installation’s email. cd /etc/mail vi sendmail.mc You will find the following on the first page of this file: dnl define(‘SMART_HOST’,`smtp.your.provider’) If you wish to send emails by your ISP smtp server eliminate the “dnl” and change “your.provider” to be the server name given to you by your ISP, for example “[email protected]”. Next, find the following lines (appx 5 pages down) and change as shown LOCAL_DOMAIN(`localhost.localdomain’)dnl Change to: `edx.localhost.localdomain’ this is the user mail box and host name used by the PROMPT System. dnl MASQUERADE_AS (‘your_domain.com’)dnl change to ‘bellsouth.net’ substuting the domain name of your email service for bellsouth.net and remove the text “dnl “ before“MASQUARADE” dnl (FEATURE(masquarade_envelope)dnl Remove the text “dnl “ before “FEATURE” Also remove “dnl” before Feature(masquerade_entire_domain)dnl Next you need to add two new features as follows: FEATURE(`genericstable')dnl This feature is needed to substitute edx.localhost.localdomain for the mail box and domain of the account you are installing. Setting up genericstable is explained below. GENERICS_DOMAIN(`localhost.localdomain')dnl This feature is needed to tell masquerade what domain is to be substituted with data from the genericstable. It tells what domain triggers the table lookup. FEATURE(allmasquerade)dnl This is a group of final items to use for Masquerade as explained below: 11 MASQUERADE_DOMAIN(localhost)dnl Identifies the domain to masquerade ** MASQUERADE_DOMAIN(localhost.localdomain)dnl Identifies the host and domain ** MASQUERADE_DOMAIN(bellsouth.net)dnl Identifies the replacement domain. Substitute bellsout.net with your domain name ** dnl MASQUERADE_DOMAIN(edx.lan)dnl NOT USED “dnl” means not used After the above changes, sendmail.mc is then compiled into sendmail.cf using the following command: # m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf 5. ** The challenge once all masquerade is defined is how to include the user mail box name in the masquerade. It is accomplished by adding the two new features to sendmail.mc (genericstable and Generics domain) referred to above. genericstable explained A new file referenced in sendmail.mc is /etc/mail/genericstable that was referenced above when explaining additions to sendmail.mc. You must create this file. The table entries are simply: edx [email protected] This is what these entries mean. edx is the mailbox name that originates all automatic emails that PROMPT sends. Actually the return address of the raw email generated by PROMPT would be [email protected].. This is not a registered email address thus will be seen as invalid by the ISP. Thus it has to be replaced during the email generation with a valid return address which is [email protected] (in our example, meaning a valid email address of the account being installed to use for PROMPT emails). Every email being sent carries the mail box (or user name) of “edx” thus the table looks up the replacement name of “[email protected] and stuffs this name in place of [email protected]. The generics file requires a conversion process explained below and if you later edit the genericstable you must then run this procedure again to repopulate genericstable.db # makemap hash /etc/mail/genericstable< /etc/mail/genericstables 12 6. More changes required outside of sendmail.mc Usually the smart host requires authentication prior to relaying the automatic emails sent by PROMPT. To negotiate and authentication with the smart server a log in is required using login information that must be entered into /etc/mail/access as follows shown in bold: localhost.localdomain localhost 127.0.0.1 RELAY RELAY RELAY “Already in the file” “Already in the file” “Already in the file” AuthInfo:outbound.att.net "U:[email protected]" "I:[email protected]" "P:hughes66" "M:LOGIN PLAIN" This entire string is the new entry required in this file substituting “outbound.att.net” with the smart host smtp server entered in sendmail.mc above, and substituting [email protected] with the email name at your account to be used for PROMPT automatic emails. NOTE: After you enter the string above and also if the account changes their email password run the following procedure: 1. Edit the text file /etc/mail/access entering the string or changing the password, should that occurs 2. Run this process: # makemap hash /etc/mail/access < /etc/mail/access 3. The above converts the data in the file access to access.db 4. Stop sendmail with this command: # /etc/rc.d/init.d/sendmail stop 5. Then start sendmail with this command: # /etc/rc.d/init.d/sendmail start 7. Also, be sure that /etc/resolv.conf has the DNS address of the ISP that provides the email service, (for example - nameserver 216.24.27.3) and in /etc/mail edit the file local-host-names to include [email protected] substuting bellsouth.net with the domain name of your email service then, Sendmail must be restarted. 8. Remember to edit /edx/edxdocpb.sys to change the response phone number and the sending email address. 13 F. Install HylaFAX – To support PROMPT automatic fax(can wait until PROMPT is loaded) 1. Copy the HylaFAX installation files shown below into the specified directory ghostscript-fonts-std-8.11.tar.gz to /usr/share/ghostscript hylafax-client-6.0.5-1rhel5.i386.rpm to /root hylafax-server-6.0.5-1rhel5.i386.rpm to /root public_key.asc to /root sharutils-4.2.1-14.i386.rpm to /root 2. Extract ghostscript-fonts and the directory “fonts” will be created: cd /usr/share/ghostscript tar xzvf ghostscript-fonts-std-8.11.tar.gz 3. Install sharutils: cd /root rpm -Uvh sharutils-4.2.1-14.i386.rpm 4. Install Hylafax Client rpm -Uvh hylafax-client-6.0.5-1rhel5.i386.rpm 5. Install Hylafax Server rpm -Uvh hylafax-server-6.0.5-1rhel5.i386.rpm 6. We use the Actiontec External 56K/V92 Modem (a class 1 external modem) and install it on Serial port 1 that is ttyS0 to Linux. Have the modem connected at this time because it is needed for the setup we are about to do. 7. Next, run /usr/sbin/faxsetup and when it completes it will automatically go into /usr/sbinfaxaddmodem however, each can be run independently later if needed. A long number of questions will be ask and the correct answers are automatically tendered. But you will have to specify the serial port as: ttyS0 (assuming you use serial port 1) and to prevent the fax from answering the phone set the number of rings to 0. Also, you will have to enter the fax phone number as the “phone number of the fax modem” and also as the “local identification string” that is the company name. 8. After set up configuration you have to edit the configuration file for hardware flow control in /var/spool/hylafax/etc as follows: vi config.ttyS0 (or the serial port you used if not ttyS0) Page down until you find Class1Cmd: Just after this line you will create a new line to read: Class1HFLOCmd: FLOW_RTSCTS # command to set hardware flow control 14 9. Go to /etc and edit inittab to include this line just after si in # System initialization mo:2345:respawn:/usr/sbin/faxgetty ttyS0 (if you used S0) 10. Go to /etc/rc.local insert this line. stty –F /dev/ttyS0 crtscts 11. Run ntsysv and make sure the HylaFax service is being started. 12. FYI the cover page is at /var/spool/hylafax/etc/cover.temp and the edxdocpb controls are at /usr/edx/edxdocpb.sys. G. Load the PROMPT Business System Startup system ** 1. The file promptrelease-tgz can be downloaded from prompt-usa.com by submitting the download request form found on the web site at www.prompt-usa.com on the Support page. 2. Place the downloaded file in the directory /edx. 3. To extract the programs and files from prompt.tgz, type this command: at # /edx: tar xzvf promptrelease.tgz The files will be extracted and placed in the /edx directory 4. Change owner and group of /edx off / directory and /edx off /home chown edx edx chgrp group edx 5. Remove the load file – prompt.tgz # rm promptrelease.tgz remove regular file ‘prompt.tgz’? y a. From /edx using a root level login (#) copy these files to fix backtab on the server: cp backtab.map /lib/kbd/keymaps/include cp keyboard /etc/sysconfig Overwrite = y 7. Go to www.prompt-usa.com and print the Getting Started instructions found under Support. 8. An excellent way to train is to use the Demo found on www.promptusa.com 9. Reboot the server to start The PROMPT System. 15