Documente Academic
Documente Profesional
Documente Cultură
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
HIMATEK TRAINING:
Green Your Redhat Enterprise Server, Make Powerful Server in Easy Ways
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
INTRODUCTION
The Red Hat Enterprise Linux System Administration Guide contains information on
how to customize your Red Hat Enterprise Linux system to it your needs. If you are
looking for a step-by-step, task oriented guide for configuring and customizing your
system, this is the manual for you. This manual discusses many intermediate topics
such as the following:
4. Linux Directories
7. Uderstanding kernel
This guide assumes you have a basic understanding of your Red Hat Enterprise
Linux system. If you need help installing Red Hat Enterprise Linux, refer to the Red
Hat Enterprise Linux Installation Guide. For more general information about system
administration, refer to the Red Hat Enterprise Linux Introduction to System
Administration. If you need more advanced documentation such as overview of file
systems, refer to the Red Hat Enterprise Linux Reference Guide. If you need security
information, refer to the Red Hat Enterprise Linux Security Guide.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
Press the “Start this virtual machine” to start the installation and wait the
loading. And type “Linux text” to enter the text mode installation, and press
Enter. Or Press ENTER to set up graphically.
Choose the language section to install and choose the keyboard that is used,
about “US”. And click Ok.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
Crate the “swap” partition as virtual memory on the Hard disk about
512 MB
Create mount partition as: /. And choose the “fill all available space” press
Ok
Here is the configuration was made before, read it carefully and click OK.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
In the network configuration for eth0 select all “Configure using DHCP” and
“activate on boot”. And click OK
Select the language that is used in Linux, for instance English UK and click
OK.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
Set the root password as you can and easy to be remembered by yourself.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
The ext3 file system is essentially an enhanced version of the ext2 file
system. These improvements provide the following advantages:
Availability
Data Integrity
The ext3 file system provides stronger data integrity in the event that an
unclean system shutdown occurs. The ext3 file system allows you to choose
the type and level of protection that your data receives. By default, the ext3
volumes are configured to keep a high level of data consistency with regard
to the state of the file system.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
Speed
Despite writing some data more than once, ext3 has a higher throughput in
most cases than ext2 because ext3's journaling optimizes hard drive head
motion. You can choose from three journaling modes to optimize speed, but
doing so means trade-offs in regards to data integrity.
Easy Transition
It is easy to migrate from ext2 to ext3 and gain the benefits of a robust
journaling file system without reformatting.
LVM is a method of allocating hard drive space into logical volumes that can
be easily resized instead of partitions. With LVM, a hard drive or set of hard
drives is allocated to one or more physical volumes. A physical volume
cannot span over more than one drive.
The physical volumes are combined into logical volume groups, with the
exception of the /boot/partition. The /boot/ partition cannot be on a logical
volume group because the boot loader cannot read it. If the root (/) partition
is on a logical volume, create a separate /boot/ partition which is not a part
of a volume group. Since a physical volume cannot span over multiple drives,
to span over more than one drive, create one or more physical volumes per
drive.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
The basic idea behind RAID is to combine multiple small, inexpensive disk
drives into an array to accomplish performance or redundancy goals not
attainable with one large and expensive drive. This array of drives appears to
the computer as a single logical storage unit or drive.
A. Level 0
B. Level 1
RAID level 1, or "mirroring," has been used longer than any other form of
RAID. Level 1 provides redundancy by writing identical data to each
member disk of the array, leaving a "mirrored" copy on each disk.
Mirroring that remains popular due to its simplicity and high level of data
availability. The storage capacity of the level 1 array is equal to the
capacity of one of the mirrored hard disks in a Hardware RAID or one of
the mirrored partitions in a Software RAID.
C. Level 4
D. Level 5
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
E. Linear RAID
Swap Space
Swap space in Linux is used when the amount of physical memory (RAM) is
full. If the system needs more memory resources and the RAM is full, inactive
pages in memory are moved to the swap space. While swap space can help
machines with a small amount of RAM, it should not be considered a
replacement for more RAM. Swap space is located on hard drives, which have
a slower access time than physical memory.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
- cd
- ls
- mkdir
- rmdir
- adduser
- addgroup
- passwd
- ping
- ifconfig
- /etc/sysconfig/network-scripts/ifcfg-eth0
- /etc/rc.d/rc.local
- nslookup 192.168.0.2
- mount /media/cdrom/
- /dev/sda
- /dev/sdb
- /usr/share/doc/redhat-release-4
- /etc/fstab
- /usr/share/doc/
- /proc/swaps
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
4. LINUX DIRECTORIES
Note: Files are grouped according to purpose. Ex: commands, data files,
documentation.
Parts of a UNIX directory tree. See the FSSTND standard (File system standard)
/ Root
|---root The home directory for the root user
|---home Contains the user's home directories
| |----ftp Users include many services as listed here
| |----httpd
| |----samba
| |----user1
| |----user2
|---bin Commands needed during bootup that might be
needed by normal users
|---sbin Like bin but commands are not intended for
normal users. Commands run by LINUX.
|---proc This filesystem is not on a disk. Exists in the
kernels imagination (virtual). This directory
| | Holds information about kernel parameters and
system configuration.
| |----1 A directory with info about process number 1.
Each process
| has a directory below proc.
|---usr Contains all commands, libraries, man pages,
games and static files for normal
| | operation.
| |----bin Almost all user commands. some commands are in
/bin or /usr/local/bin.
| |----sbin System admin commands not needed on the root
filesystem. e.g., most server
| | programs.
| |----include Header files for the C programming language.
Should be below /user/lib for
| | consistency.
| |----lib Unchanging data files for programs and
subsystems
| |----local The place for locally installed software and
other files.
| |----man Manual pages
| |----info Info documents
| |----doc Documentation for various packages
| |----tmp
| |----X11R6 The X windows system files. There is a
directory similar to usr below this
| | directory.
| |----X386 Like X11R6 but for X11 release 5
|---boot Files used by the bootstrap loader, LILO.
Kernel images are often kept here.
|---lib Shared libraries needed by the programs on the
root filesystem
| |----modules Loadable kernel modules, especially those needed
to boot the system after disasters.
|---dev Device files for devices such as disk drives,
serial ports, etc.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
The RPM Package Manager (RPM) is an open packaging system, available for
anyone to use, which runs on Red Hat Enterprise Linux as well as other Linux
and UNIX systems. Red Hat, Inc. encourages other vendors to use RPM for
their own products. RPM is distributable under the terms of the GPL. For the
end user, RPM makes system updates easy. Installing, uninstalling, and
upgrading RPM packages can be accomplished with short commands. RPM
maintains a database of installed packages and their files, so you can invoke
powerful queries and verifications on your system. If you prefer a graphical
interface, you can use the Package Management Tool to perform many RPM
commands.
- Upgradability
Using RPM, you can upgrade individual components of your system without
completely reinstalling. When you get a new release of an operating system
based on RPM (such as Red Hat Enterprise Linux), you do not need to
reinstall on your machine (as you do with operating systems based on other
packaging systems). There is no special upgrade files needed to upgrade a
package because the same RPM file is used to install and upgrade the
package on your system.
- Powerful Querying
- System Verification
Another powerful feature is the ability to verify packages. If you are worried
that you deleted an important file for some package, verify the package. You
are notified of any anomalies. At that point, you can reinstall the package if
necessary. Any configuration files that you modified are preserved during
reinstallation.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
- Pristine Sources
A crucial design goal was to allow the use of "pristine" software sources, as
distributed by the original authors of the software. With RPM, you have the
pristine sources along with any patches that were used, plus complete build
instructions. This is an important advantage for several reasons. For
instance, if a new version of a program comes out, you do not necessarily
have to start from scratch to get it to compile. You can look at the patch to
see what you might need to do.
Using RPM
Installing Packages
Unresolved Dependency
RPM packages can, essentially, depend on other packages, which mean that
they require other packages to be installed to run properly. If you try to
install a package which has an unresolved dependency, output similar to the
following is displayed
We must install the step as given to the command, from first command or to
force the installation anyway (which is not recommended since the package
may not run correctly), use the --nodeps option.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
Removing Packages
rpm -e foo
Upgrading
Freshening
RPM's freshen option checks the versions of the packages specified on the
command line against the versions of packages that have already been
installed on your system. When a newer version of an already-installed
package is processed by RPM's freshen option, it is upgraded to the newer
version.
Querying
Use the rpm -q command to query the database of installed packages. The
rpm -q foo command displays the package name, version, and release
number of the installed package foo:
foo-2.0-1
Note
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
Verifying
The command rpm -V verifies a package. You can use any of the Package
Verify Options listed for querying to specify the packages you wish to verify.
A simple use of verifying is rpm -V foo, which verifies that all the files in the
foo package are as they were when they were originally installed. For
example:
rpm -Va
This command can be useful if you suspect that your RPM databases are
corrupt.
7. UDERSTANDING KERNEL
Operating system tasks are done differently by different kernels, depending on their
design and implementation. While monolithic kernels will try to achieve these goals
by executing all the operating system code in the same address space to increase
the performance of the system, microkernels run most of the operating system
services in user space as servers, aiming to improve maintainability and modularity
of the operating system. A range of possibilities exists between these two extremes.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
Red Hat Enterprise Linux contains the following kernel packages (some may not
apply to your architecture):
1. kernel. Contains the kernel and the following key features:
2. Uniprocessor support for x86 and Athlon systems (can be run on a multi-
processor system, but only one processor is utilized)
3. Multi-processor support for all other architectures
4. For x86 systems, only the first 4 GB of RAM is used; use the kernel-
hugemem package for x86 systems with over 4 GB of RAM
5. kernel-devel . Contains the kernel headers and make files sufficient to
build modules against the kernel package.
6. kernel-hugemem . (only for i686 systems) In addition to the options
enabled for the kernel package, the key conFIguration options
7. kernel-smp . Contains the kernel for multi-processor systems.
8. kernel-smp-devel . Contains the kernel headers and make files sufficient
to build modules against the kernel-smp package.
9. kernel-utils. Contains utilities that can be used to control the kernel or
system hardware.
10. kernel-doc.Contains documentation files from the kernel source. Various
portions of the Linux kernel and the device drivers shipped with it are
documented in these FIles. Installation of this package provides a
reference to the options that can be passed to Linux kernel modules at
load time.
/usr/share/doc/kernel-doc-<version>/ directory.
On the Red Hat Enterprise Linux architectures other than IBM eServer iSeries, the
initial RAM disk can be created with the mkinitrd command. However, this step is
performed automatically if the kernel and its associated packages are installed or
upgraded from the RPM packages distributed by Red Hat, Inc.; thus, it does not
need to be executed manually. To verify that it was created, use the should match
the version of the kernel just installed).
On iSeries systems, the initial RAM disk FIle and vmlinux FIle are combined into one
file, which is created with the addRamDisk command. To verify that it was created,
use the command ls -l /boot to make sure the /boot/vmlinitrd-<kernel-
version> file was created (the version should match the version of the kernel just
installed). The next step is to verify that the boot loader has been configured to boot
the new kernel.
Telkom Polytechnic
TRAINING REDHAT ENTERPRISE SERVER
GREEN YOUR REDHAT ENTERPRISE SERVER, MAKE POWERFUL SERVER IN EASY WAYS
GRUB
Con_rm that the file /boot/grub/grub.conf contains a title section with the same
version as
the kernel package just installed (if the kernel-smp or kernel-hugemem package was
installed,
a section exists for it as well):
# Note that you do not have to rerun grub after making changes to this
file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux (2.6.9-5.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-5.EL ro root=LABEL=/
initrd /initrd-2.6.9-5.EL.img
title Red Hat Enterprise Linux (2.6.9-1.906_EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-1.906_EL ro root=LABEL=/
initrd /initrd-2.6.9-1.906_EL.img
If a separate /boot/ partition was created, the paths to the kernel and initrd image
are relative to /boot/.
Telkom Polytechnic