four methods to start the RHEL Desktop or Server installation process:
1: Boot from a copy of the Red Hat Enterprise Linux installation CDs or DVD
2: Boot from the first RHEL installation CD or DVD
3: Boot from a special RHEL boot CD or USB key
4: Boot from a kickstart server using a PXE network boot card
The last three options generally assume that you're going to install RHEL over a network.
The Installation Log File
/root/install.log
The commands used by Anaconda to install Linux
/root/anaconda-ks.cfg file
This can serve as a template for the kickstart process
The Console Installation Output Screens
Six consoles are available during the installation process, and each tells a different story.
CTRL-ALT-F1
Text installation display; if you're running in graphical mode, it includes the basic commands to start graphics drivers
CTRL-ALT-F2
Accesses a bash shell prompt; available after the first few installation steps
The installation files from the CD or network source will be mounted on the /mnt/source directory. You can also find a number of interesting files in the /tmp directory.
anaconda.log:from third console
ks.cfg:in kickstart case
modprobe.conf:Includes detected hardware that requires a driver module
netinfo:Contains IP address information for configured network cards
syslog:from fouth console
Xconfig.test:a temporary X Window configuration file
CTRL-ALT-F3
Lists the log of installation messages; if network problems occur, you may see related messages here
CTRL-ALT-F4
Displays all kernel messages, including detected hardware and drivers
CTRL-ALT-F5
Installation displays partition formatting; nothing is shown here until Anaconda formats the actual partitions(output of the mke2fs command)
CTRL-ALT-F6
Graphical installation display; active only if you're running the installation program in graphical mode (was formerly available from CTRL-ALT-F7). Naturally, if you're installing in text mode, nothing is shown in this console
星期四, 二月 19, 2009
星期三, 一月 21, 2009
Hardware and Installation-0122
Configuring a Network Installation
1: copy the installation files from each CD to a common directory
2: configure sharing on the directory
3: activate the NFS, FTP, or HTTP network
Creating an NFS Installation Server
NFS is the most efficient way to share files between Linux and Unix computers.
1. Create a directory for your installation files.
# mkdir /inst
2. Insert the first Red Hat Enterprise Linux installation CD/DVD into its drive.
# mount /dev/cdrom /media
# mount -ro loop /tmp/firstcd.iso /media( if all you have are the ISO files in the /tmp directory)
3. Copy the required files from the first Red Hat Enterprise Linux installation CD. Use the cp -ar /source/. /inst command, where source is the mount directory (such as /media/RHEL 5 i386 Disc 1).Don't forget the dot (.); it copies hidden files, including the .discinfo file from the first Red Hat Enterprise Linux installation CD.
4. Unmount the first Red Hat Enterprise Linux installation CD. If it's an installation DVD, skip to step 6. Use the umount /source command.
5. Repeat steps 2, 3, and 4 with the remaining Red Hat Enterprise Linux installation CDs.
6. Set up an NFS share. Add the following line to /etc/exports. You can do it with a text editor such as vi or the system-config-nfs utility.
/inst *(ro,sync)
7. Export the shared directory
# exportfs -a
8. Make sure there's nothing blocking access to NFS. The default Red Hat Enterprise Linux firewall blocks access to an NFS server. While inelegant, the following command "flushes," or turns off, the standard Linux firewall from the local computer. If you've enabled SELinux, you'll also have to use the SELinux Management Tool to change the associated NFS boolean variable to "Allow the reading on any NFS file system". Don't forget to restart NFS to activate all of your changes.
# iptables -F
9. Now you can activate the NFS service. The following commands assume that it's already running (which you can check using the service nfs status command)
# service nfs stop
# service nfs start
10. Finally, you can check the status of your share. If it's working, you should see the contents of the /etc/exports directory when you run the following command.
# showmount -e
1: copy the installation files from each CD to a common directory
2: configure sharing on the directory
3: activate the NFS, FTP, or HTTP network
Creating an NFS Installation Server
NFS is the most efficient way to share files between Linux and Unix computers.
1. Create a directory for your installation files.
# mkdir /inst
2. Insert the first Red Hat Enterprise Linux installation CD/DVD into its drive.
# mount /dev/cdrom /media
# mount -ro loop /tmp/firstcd.iso /media( if all you have are the ISO files in the /tmp directory)
3. Copy the required files from the first Red Hat Enterprise Linux installation CD. Use the cp -ar /source/. /inst command, where source is the mount directory (such as /media/RHEL 5 i386 Disc 1).Don't forget the dot (.); it copies hidden files, including the .discinfo file from the first Red Hat Enterprise Linux installation CD.
4. Unmount the first Red Hat Enterprise Linux installation CD. If it's an installation DVD, skip to step 6. Use the umount /source command.
5. Repeat steps 2, 3, and 4 with the remaining Red Hat Enterprise Linux installation CDs.
6. Set up an NFS share. Add the following line to /etc/exports. You can do it with a text editor such as vi or the system-config-nfs utility.
/inst *(ro,sync)
7. Export the shared directory
# exportfs -a
8. Make sure there's nothing blocking access to NFS. The default Red Hat Enterprise Linux firewall blocks access to an NFS server. While inelegant, the following command "flushes," or turns off, the standard Linux firewall from the local computer. If you've enabled SELinux, you'll also have to use the SELinux Management Tool to change the associated NFS boolean variable to "Allow the reading on any NFS file system". Don't forget to restart NFS to activate all of your changes.
# iptables -F
9. Now you can activate the NFS service. The following commands assume that it's already running (which you can check using the service nfs status command)
# service nfs stop
# service nfs start
10. Finally, you can check the status of your share. If it's working, you should see the contents of the /etc/exports directory when you run the following command.
# showmount -e
RHCE Prerequisites-0121
cron
crontab -e
crontab -u username -e
Five schedule fields appear on the left side of each crontab entry:
minute, hour, day of month, month, and day of week.
0 17 * * *
0 17 * * 1
0,10 17 * * 0,2,3
0-10 17 1 * *
2 8-20/3 * * *
Backup and Restore
Tape Backups
Using magnetic tape in Linux depends on the ftape system using tarballs to group directories into single compressed backup files.
DVD/CD Backups
mkisofs -J -r -T -o /tmp/backhome.iso /home
cdrecord -v /tmp/backhome.iso
Hard Drive(RAID) Backups
gzip and bzip2
gzip big.jpg
bzip2 big.jpg
gzip -d big.jpg.gz
bzip2 -d big.jpg.bz2
tar
The tar command was originally developed for archiving data to tape drives. However, it's commonly used today for collecting a series of files, especially from a directory.
tar czvf home.tar.gz /home
tar xzvf home.tar.gz /home
System Log File Management
Log files are controlled by the syslogd daemon and organized in the /etc/syslog.conf file.
Basic TCP/IP Networking
ping
The ping command allows you to test connectivity-locally, within your network, and on the Internet.
assume your IP address is 192.168.122.43 and
the gateway address on your network is 192.168.122.99.
1:First test the integrity of TCP/IP on your computer.
# ping 127.0.0.1
2:see if you're properly connected to your LAN
# ping 192.168.122.43
3:ping the address of another computer on your network
# ping 192.168.122.78
4:ping the address for your gateway
# ping 192.168.122.99
5:If possible, ping the address of your network's connection to the Internet
6:finally, ping the address of a computer that you know is active on the Internet.
ipconfig
The ipconfig command can help you check and configure network adapters.
netstat
The netstat command is versatile; it can help you see the channels available for network connections, interface statistics, and more. One important version of this command, netstat -r, displays routing tables that can tell you if your computer knows where to send a message.
Configuring Name Resolution
Using four configuration files, Linux can help you translate computer host names to IP addresses.
/etc/sysconfig/network
to specify information about the desired network configuration.
/etc/hosts
to contains IP addresses and their corresponding hostnames.
When your system tries to resolve a hostname to an IP address or tries to determine the hostname for an IP address, it refers to the
/etc/resolv.conf
the IP address of each DNS server is listed with a simple line similar to this:
nameserver 192.168.0.1
/etc/host.conf
When your computer looks for an IP address, this file determines whether it searches through /etc/hosts or DNS first. This is usually a one-line file: order hosts,bind
But in most cases, this file has been superseded by /etc/nsswitch.conf
/etc/nsswitch.conf
The key directive in this file, with respect to name resolution, is
hosts: files dns
This is a more straightforward expression of where Linux looks for an IP address when it sees a host name. First, it looks at the file, /etc/hosts, and then it looks at the available DNS server, as defined in /etc/resolv.conf
crontab -e
crontab -u username -e
Five schedule fields appear on the left side of each crontab entry:
minute, hour, day of month, month, and day of week.
0 17 * * *
0 17 * * 1
0,10 17 * * 0,2,3
0-10 17 1 * *
2 8-20/3 * * *
Backup and Restore
Tape Backups
Using magnetic tape in Linux depends on the ftape system using tarballs to group directories into single compressed backup files.
DVD/CD Backups
mkisofs -J -r -T -o /tmp/backhome.iso /home
cdrecord -v /tmp/backhome.iso
Hard Drive(RAID) Backups
gzip and bzip2
gzip big.jpg
bzip2 big.jpg
gzip -d big.jpg.gz
bzip2 -d big.jpg.bz2
tar
The tar command was originally developed for archiving data to tape drives. However, it's commonly used today for collecting a series of files, especially from a directory.
tar czvf home.tar.gz /home
tar xzvf home.tar.gz /home
System Log File Management
Log files are controlled by the syslogd daemon and organized in the /etc/syslog.conf file.
Basic TCP/IP Networking
ping
The ping command allows you to test connectivity-locally, within your network, and on the Internet.
assume your IP address is 192.168.122.43 and
the gateway address on your network is 192.168.122.99.
1:First test the integrity of TCP/IP on your computer.
# ping 127.0.0.1
2:see if you're properly connected to your LAN
# ping 192.168.122.43
3:ping the address of another computer on your network
# ping 192.168.122.78
4:ping the address for your gateway
# ping 192.168.122.99
5:If possible, ping the address of your network's connection to the Internet
6:finally, ping the address of a computer that you know is active on the Internet.
ipconfig
The ipconfig command can help you check and configure network adapters.
netstat
The netstat command is versatile; it can help you see the channels available for network connections, interface statistics, and more. One important version of this command, netstat -r, displays routing tables that can tell you if your computer knows where to send a message.
Configuring Name Resolution
Using four configuration files, Linux can help you translate computer host names to IP addresses.
/etc/sysconfig/network
to specify information about the desired network configuration.
/etc/hosts
to contains IP addresses and their corresponding hostnames.
When your system tries to resolve a hostname to an IP address or tries to determine the hostname for an IP address, it refers to the
/etc/hosts file before using the name servers (if you are using the default Red Hat Enterprise Linux configuration). If the IP address is listed in the /etc/hosts file, the name servers are not used. If your network contains computers whose IP addresses are not listed in DNS, it is recommended that you add them to the /etc/hosts file. /etc/resolv.conf
the IP address of each DNS server is listed with a simple line similar to this:
nameserver 192.168.0.1
/etc/host.conf
When your computer looks for an IP address, this file determines whether it searches through /etc/hosts or DNS first. This is usually a one-line file: order hosts,bind
But in most cases, this file has been superseded by /etc/nsswitch.conf
/etc/nsswitch.conf
The key directive in this file, with respect to name resolution, is
hosts: files dns
This is a more straightforward expression of where Linux looks for an IP address when it sees a host name. First, it looks at the file, /etc/hosts, and then it looks at the available DNS server, as defined in /etc/resolv.conf