How to install RHEL5
Editor to share with you how to install RHEL5, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!
1. Set up the Yum source:
For more information, please see http://iminmin.blog.51cto.com/689308/162666 (using the second method, CD-ROM image to build YUM)
Second, install Vsftp service:
-
[root@rhce ~] # yum install vsftpd*-y
[root@rhce ~] # chkconfig vsftpd on
[root@rhce ~] # service vsftpd restart
Close vsftpd: [failed]
Start vsftpd for vsftpd: [OK]
3. Copy the documents needed when PXE starts:
1. Copy the necessary files:
-
[root@rhce ~] # cp / usr/lib/syslinux/pxelinux.0 / tftpboot/
[root@rhce ~] # mkdir / tftpboot/pxelinux.cfg
[root@rhce ~] # cp / cdrom/isolinux/isolinux.cfg / tftpboot/pxelinux.cfg/default
[root@rhce ~] # cp / cdrom/images/pxeboot/initrd.img / tftpboot/
[root@rhce ~] # cp / cdrom/images/pxeboot/vmlinuz / tftpboot/
-
2. Modify / tftpboot/pxelinux.cfg/default file
-
[root@rhce ~] # chmod Ubunw / tftpboot/pxelinux.cfg/default / / File is read-only by default
[root@rhce ~] # vim / tftpboot/pxelinux.cfg/default
Default linux
Prompt 1
Timeout 6 / / timeout. Default is 600, which can not be changed.
Display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
Label linux
Kernel vmlinuz
Append initrd=initrd.img ks= ftp://192.168.1.8/ks.cfg / / ks.cfg is the kickstart installation configuration file, and the system is installed according to ks.cfg. We will configure him later.
. omit below
4. Install and configure DHCP service:
1. Install the DHCP service:
[root@rhce ~] # yum list dhcp*
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Installed Packages
Dhcpv6-client.i386 1.0.10-16.el5 installed
Available Packages
Dhcp.i386 12purl 3.0.5-18.el5 cdrom
Dhcp-devel.i386 12purl 3.0.5-18.el5 cdrom
Dhcpv6.i386 1.0.10-16.el5 cdrom
[root@rhce ~] # yum install dhcp.i386 dhcp-devel.i386-y
2. Generate the main configuration file dhcpd.conf:
[root@rhce ~] # rpm-ql dhcp | more
. preceding omission
/ usr/share/doc/dhcp-3.0.5/api+protocol
/ usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample
. after omitting
[root@rhce ~] # cp / usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample / etc/dhcpd.conf
Cp: overwrite "/ etc/dhcpd.conf"? Y
3. Modify the main configuration file dhcpd.conf
[root@rhce ~] # vim / etc/dhcpd.conf
Ddns-update-style interim
Ignore client-updates
Subnet 192.168.1.0 netmask 255.255.255.0 {/ / Network segment and mask.
#-default gateway
Option routers 192.168.1.8; / / Router IP, you can write gateway IP
Option subnet-mask 255.255.255.0
Filename "pxelinux.0"; / / PXE gets the boot file after IP
Next-server 192.168.1.8; / Server IP address.
# option nis-domain "domain.org"; / / Log out
# option domain-name "domain.org"; / / Log out
Option domain-name-servers 192.168.1.8; / / DNS server IP
Option time-offset-18000; # Eastern Standard Time
# option netbios-node-type 2
Range dynamic-bootp 192.168.1.100 192.168.1.200; / / IP address pool range.
Default-lease-time 21600
. when you omit / / write the configuration file, be careful not to lose the semicolon (;) after each sentence.
4. Start the DHCP service: if you start error checking / var/log/message
[root@rhce ~] # service dhcpd restart
Start dhcpd: [OK]
Fifth, the generation of kickstart configuration file:
1. Install the kickstart package:
[root@rhce ~] # yum list * kic*
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Available Packages
Pykickstart.noarch 0.43.3-1.el5 cdrom
System-config-kickstart.noarch 2.6.19.8-2.el5 cdrom
[root@rhce ~] # yum install system-config-kickstart.noarch
2. Generate the ks.cfg installation configuration file:
1) graphical interface configuration: (run the system-config-kickstart command in the terminal)
Figure 1: items to be modified in the basic configuration
Figure 2: items to be modified in the installation method
Figure 3: partition information, create the partition table of the target workstation
Figure 4: network configuration, click "add Network device"-- "OK"
Figure 5: click "File-Save File" and click "Save"
2) modify the newly generated ks.cfg file: we did not configure the installed package because the system does not have this part of the service.
[root@rhce ~] # cat / root/anaconda-ks.cfg / / installation information automatically recorded when the system is installed
. preceding omission
% packages
@ office
@ editors
@ text-internet
@ gnome-desktop
@ dialup
. the part after omitting / /% pachages records the installation of the software package when the system is installed, and copies it all to the back of the ks.cfg file.
[root@rhce ~] # vim ks.cfg
. preceding omission
# Partition clearing information
Clearpart-none
Key-- skip / / skip entering serial number
. middle ellipsis
% packages / / the contents here and later are copied from / root/anaconda-ks.cfg
@ office
@ editors
@ text-internet
@ gnome-desktop
@ dialup
. omit below
3. Copy the configuration file to the specified location:
We set up ks= ftp://192.168.1.8/ks.cfg in the / tftpboot/pxelinux.cfg/default file
Copy the file to this location:
The [root@rhce ~] # cp ks.cfg / var/ftp/ var/ftp directory is the root directory of the VSFTP service
6. Copy the Linux system installation files:
When configuring the ks.cfg file, we set the path to / pub, as shown in the figure:
[root@rhce ~] # umount / dev/hdc
[root@rhce ~] # mount / dev/hdc / var/ftp/pub/
Mount: block device / dev/hdc is write-protected, mounting read-only
7. Determine the status of the relevant services:
[root@rhce ~] # service iptables stop
Clear firewall rules: [OK]
Set chains to ACCEPT policy: filter [OK]
Uninstalling Iiptables module: [OK]
[root@rhce ~] # setenforce 0 / / close selinux
[root@rhce ~] # chkconfig tftp on / / TFTP service enable command
[root@rhce ~] # chkconfig dhcpd on
[root@rhce ~] # chkconfig vsftpd on
[root@rhce] # service xinetd restart / / TFTP service belongs to his sub-service
Stop xinetd: [OK]
Start xinetd: [OK]
[root@rhce ~] # service dhcpd restart
Close dhcpd: [OK]
Start dhcpd: [OK]
[root@rhce ~] # service vsftpd restart
Close vsftpd: [OK]
Start vsftpd for vsftpd: [OK]
8. Test workstation:
Skip DHCP and start the computer via TFTP
Just let him start on his own! Go out for a spin and come back to OK!
These are all the contents of the article "how to install RHEL5". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!