19
https://www.slac.stanford.edu/comp/unix/ linux/install_RHEL6.html Installation of Red Hat Enterprise Linux 6 SLAC Computi ng UNIX at SLAC Linux at SLAC Updated: 09 Nov 2011 There are several steps to setting up a fully-integrated Red Hat Enterprise Linux 6 (RHEL6) system at SLAC National Accelerator Laboratory: 1. Before you Begin o Minimum System Requirements o Preparing to Install 2. Install Red Hat Enterprise Linux 6 o Create an Installation CDROM o Boot the Installation Program o NFS Install Method o Introductory Screen o Disk Partitions o Selecting Installation 3. Post Install o Red Hat Welcome 4. SLAC Configuration o Running Taylor o Access to SLAC's MAIL Spool and other NFS servers o Superuser Privileges 5. Rescue from your CD iso image 6. Known Issues Please note: These are not complete Red Hat Enterprise Linux install instructions; go to the Red Hat Web site for more complete information.

Installation of Red Hat Enterprise Linux 6_Partition_Criteria

Embed Size (px)

DESCRIPTION

Installation of Red Hat Enterprise Linux 6_Partition_CriteriaInstallation of Red Hat Enterprise Linux 6_Partition_CriteriaInstallation of Red Hat Enterprise Linux 6_Partition_CriteriaInstallation of Red Hat Enterprise Linux 6_Partition_CriteriaInstallation of Red Hat Enterprise Linux 6_Partition_CriteriaInstallation of Red Hat Enterprise Linux 6_Partition_Criteria

Citation preview

Installation of Red Hat Enterprise Linux 6

https://www.slac.stanford.edu/comp/unix/linux/install_RHEL6.html

Installation of Red Hat Enterprise Linux 6 SLACComputingUNIX at SLACLinux at SLAC

Updated: 09 Nov 2011

There are several steps to setting up a fully-integrated Red Hat Enterprise Linux 6 (RHEL6) system at SLAC National Accelerator Laboratory:

1. Before you Begin

Minimum System Requirements Preparing to Install2. Install Red Hat Enterprise Linux 6

Create an Installation CDROM Boot the Installation Program NFS Install Method Introductory Screen Disk Partitions Selecting Installation

3. Post Install

Red Hat Welcome4. SLAC Configuration

Running Taylor Access to SLAC's MAIL Spool and other NFS servers Superuser Privileges5. Rescue from your CD iso image6. Known IssuesPlease note: These are not complete Red Hat Enterprise Linux install instructions; go to the Red Hat Web site for more complete information.

Before you Begin

System Requirements

Architecture

These instructions are for installing Red Hat Enterprise Linux 6 (RHEL6) on an IA-32 system (i.e., a 32-bit Intel- or AMD-based system) and Opteron 64-bit systems (x86_64).

Minimum Memory

Red Hat recommends for 32 bit a minimum of 1GB memory/logical CPU, and for 64 bit a minimum of 1GB of memory, 1GB/logical CPU. At SLAC, RHEL6 has been successfully installed on systems with 512 MB, but such systems have a tendency to bog down badly due to excessive swapping when too many applications are open at once.

Minimum Disk Space

OCIO recommends a minimum disk size of above 12 GB, and a minimum root partition ("/") size of about 9 GB.

CDROM Drive

Red Hat does not include a floppy version of the boot images for RHEL6. Your system will need a boot-capable CDROM drive, or a BIOS which knows how to PXE boot (ask unix-admin about that if you have questions).

Preparing to Install

1. Consider submitting a request to have OCIO do the installation for you.

2. Have previous experience installing Red Hat Linux, or else read the Red Hat Install document.

3. Have an IP address and node name for your system. If necessary, request an IP Address and Node Name from your Desktop admin.

4. Have available the network and host information required by a Red Hat Linux install, which includes (but may not be limited to): IP address, gateway, netmask and DNS server (provided by your Desktop admin when you obtain your IP address); video card/monitor specs (including size of video RAM); disk drive size; etc.

5. If you are an experienced Linux user and intend to retain some responsibility for administering your system, you may want to familiarize yourself with Taylor before beginning. This is the tool OCIO uses to adapt systems to the SLAC environment and we strongly encourage you to use it.

6. If you are installing on a machine that was previously taylored, you should print a copy of the file /etc/taylor.opts before beginning.

This procedure does a "clean install", not an upgrade. If you follow OCIO recommendations against storing permanent data on a workstation's system disk, this should not be a problem. If you do have some data you want to preserve on this disk, but it is all stored in a non-system partition, e.g., /u1, you might be OK, providing your system partitions are large enough to accommodate RHEL6 with sufficient room for future updates (see Disk Partitions, below). Otherwise, it is your responsibility to backup your data before beginning the installation. If you must restore it to a local filesystem after the installation, we strongly urge you to buy a second disk and keep permanent data off the system disk.

You may want to work next to a machine with a web browser and access the Red Hat installation manual from the documentation area of the Red Hat web site.

Install Red Hat Enterprise Linux 6

The installation program is mostly self-explanatory if you have installed UNIX or Linux before. We will only mention either complex or SLAC-specific issues below.

Create an Installation CDROM

To make a bootable CDROM for installing RHEL6, you will need to burn an ISO 9660 image file onto CD-R (or CD-RW) media. On Linux, you can use an application like Xcdroast (requires X Windows) or cdrecord (a command-line tool). On a RHEL5 desktop system, double clicking on a file ending in ".iso" will bring up a "Write to Disk" dialog box which can be used to burn a copy of the file to a CD-R disk. Mac OSX can successfully create bootable CDROMs using the CDROM burning utility.

To create an installation boot CDROM under Linux, using the cdrecord utility:

1. Find the ISO 9660 disc image for an installation boot CDROM for your architecture and the current RHEL6 Update level:

for 64-bit

cd /nfs/slac/g/scs/redhat/RedHat/RHEL6/6u1/workstation/x86_64/bootiso/

ls rhel-workstation-6.1-x86_64-boot.iso

for 32-bit

cd /nfs/slac/g/scs/redhat/RedHat/RHEL6/6u1/workstation/i386/bootiso/

ls rhel-workstation-6.1-i386-boot.iso

2. Put a blank CD-R (or CD-RW) disc into the CDROM drive.

3. To get information about your CDROM drive, run the command:

4. cdrecord -scanbus dev=/dev/hdc

You'll get a line that includes some text identifying your specific CDROM device, along with the device address; for example:

1,0,0 100) '_NEC ' 'CD-RW NR-9300A ' '105B' Removable CD-ROM

The first field in this example, "1,0,0", is your CDROM device address. This is the information you'll need.

5. Run a command like the following:

6. cdrecord -v -speed=2 dev=1,0,0 -eject -data boot.iso

On some systems you may need to prefix the device address with a transport layer indicator, such as 'ATA:' or 'ATAPI:', or you may need additional options on the cdrecord command line. See the man page for cdrecord for details.

If you haven't burned any CDROMs before, it's a good idea to run some tests first by adding the '-dummy' option to the cdrecord command line.

The ISO image for RHEL6.1 includes a 'Rescue' option.

See below For Rescue Method instructions.

Boot the Installation Program

Stick the CDROM in the drive and reboot your machine.

If your machine ignores the CDROM at boot time, and simply reboots the existing system on the hard disk, there is most likely a problem with the boot order in the BIOS. You can usually get into the BIOS by pressing a function key (usually F2) early in the boot process. The various BIOS screens vary quite a bit, even within a single vendor's products. However, there is usually a place where you can specify the order in which the BIOS should look for a bootable device. You should make sure it looks at the CDROM drive before the hard disk.

At the introductory, 'Welcome to Red Hat Enterprise Linux 6.1!' menu, choose 'Install or upgrade an existing system'. Other possible choices include 'Install system with basic video driver', 'Rescue installed system', 'Boot from local drive' , or a 'Memory test.'N.B. If your initial installation attempt fails with a wonky video display, retry with the 'basic video driver'.

N.B. There may be some variations in the order of the screens in the installation program depending on your exact hardware configuration and/or the choices you make, so it's probably a good idea to read through the rest of this section before proceeding.

It will take a minute or two to load. Choose 'Skip' to skip the media test.

Next, after questions regarding 'Language' and 'Keyboard' choice, the installation proceeds to "Installation Method."

NFS Install Method

In the "Installation Method" screen, choose NFS directory to insure that the latest SLAC-recommended kernel and RPMs are installed. If you install from a CDROM, you may need to upgrade the kernel after installation in order to comply with SLAC security requirements.

Next, you will be asked to configure TCP/IP.

Under Enable IPv4 support Uncheck Use dynamic IP configuration by checking the Manual Configuration. Uncheck Enable IPv6 support. (Movement and select directions are at the bottom of the screen).

On the next screen "Manual TCP/IP Configuration" enter the IP Address, Netmask, Default gateway and Primary nameserver information given to you by your Desktop admin when you requested your node name and IP address. The primary nameserver is 134.79.18.40.

WARNING:

Please be careful to enter this information accurately, because errors can disrupt the network.

Next you will enter NFS setup information. The NFS server name is lnxinstall and the Red Hat directories are:

For Opteron and EMT64 systems: /vol/vol1/g.scs.redhat/RedHat/RHEL6/6u1/x86_64.

For all other systems(Pentium, Athlon, etc.): /vol/vol1/g.scs.redhat/RedHat/RHEL6/6u1/i386.

If the directory can't be mounted try using lnxinstall's IP address, 172.23.16.97, instead of its name.

Introductory screens

Note: If you want to capture a particular screen display in the installation, to refer to later, you can press 'Print'+'Shift'. The screen copy will be stored in /root/anaconda-screenshots/ for you.

After the splash RHEL6 screen, the next questions are:

What type of devices will your installation involve. Choose 'Basic Storage Devices'

If an existing installation is discovered on the system, you'll be asked if you want a 'Fresh Installation' or 'Upgrade an Existing Installation'. Either way, assuming you have backed up any important files, choose 'Fresh Installation'

The 'Please name this computer' should be auto-filled in. You should not need to 'Configure Network'

Please select the nearest City in your time zone The root password screen. Choose a good root password and DON'T FORGET IT! SLAC's post-installation tool taylor will override this password.

'Which type of installation would you like?' Choose 'Create Custom Layout'

The default partitioning scheme used by the the other options is not suitable for use in the SLAC environment.

Disk Partitions

The table below shows suggested partitioning schemes for two different size disks, representing typical sizes of disks available on older hardware still in service here at SLAC. Newer systems usually have substantially larger system disks.

Make sure to give Linux at least a 9 GB root partition. If your root partition is less than about 9 GB, you should omit installing some of the software package groups recommended below, in order to allow room for future upgrades and security patches. Similarly, if you install more package groups than suggested below, you will probably need a larger root partition -- perhaps 10-12 GB if you install nearly everything. Small root partitions can make it difficult or impossible to install required security patches later on. Systems that cannot apply required security patches in a timely fashion may be denied access to the SLAC network. If possible the root partion should be at least 20 GB for modern machines with 100 GB and larger disks.

You should also create a swap partition at least as large as the memory (twice the main memory is a good rule of thumb for the size of the swap partition).

If there is sufficient space, we recommend that you allocate an /scswork partition of 1 GB, to be reserved for the exclusive use of OCIO. Use the rest for scratch space; for example, you might want to create a larger /tmp or add a separate /scratch directory. Note that older files in /tmp are periodically removed but files in /scratch will remain until removed by you unless the system is re-installed.

Always choose to format your Linux partitions. Use the new, ext4 filesystem type on all partitions except swap and /usr/vice/cache/cache.. (In earlier versions of AFS, /usr/vice/cache needed the ext2 filesystem, but ext4 is now compatible with the AFS cache). ext4 is a journaling filesystem and will permit much faster recovery following crashes.

WARNING! You should not allocate any partitions on the system disk for permanent data. Because of the large sizes of currently available disks, you may be strongly tempted to ignore this warning. However, it is very risky to do so, because:

we do not backup the data on local disks attached to workstations;

the disks installed in workstation-class machines are much less reliable than those we buy for our fileservers; and,

our support model assumes that it's OK to repartition and re-install the system disk on short notice.

The best way to make use of extra space on your system disk is to allocate a large /tmp or /scratch partition. If you need additional permanent space, please contact [email protected]; we will do our best to help you acquire reliable, backed-up storage at a reasonable cost. If you ignore this warning, it will be your responsibility to save and restore your data the next time your system needs to be re-installed.Note that partition names and numbers, and the order of the partitions, are assigned automatically. Also, the actual sizes of allocated partitions may vary a little bit from what you request in the GUI interface. This may make it difficult to allocate every last block on the disk. The OCIO recommendation is to use LVMs and to leave extra room which can be used later.

Suggested partition schemes for typical hard disks:

PartitionMount PointPartitionTypePartition Size

12 GB disk+18 GB or larger disk

/ext49 GB12 GB

swapswap1 x memory orat least 512 MB2 x memory orat least 1 GB

/varext4512 MB4 GB

/usr/vice/cacheext4512 MB2 GB

/tmpext4512 MB4 GB

/scsworkext4omit1 GB

/scratch (or extra /tmp space)ext4omitremainder

When you begin, you'll have a screen that appears this way:

When you are done, You'll have a configuration something like this:

There will be two dialog boxes confirming you want to reformat the disk.

Boot Loader Configuration

Accept the defaults for the other options on this screen.

Selecting Installation

As stated by the installer, 'The default installation of Red Hat Enterprise Linux is a desktop install.' Other choices include, 'Minimal Desktop', 'Web Devlopment Workstation', 'Software Devlopment Workstation', and 'Minimal' Please do not install the 'Web Development Workstation' unless you really know what you are doing and okay it with OCIO first.

Don't worry too much about getting every package you might ever want -- you can always add additional packages later.

After this, the installation will begin. It may take 15 minutes to over an hour to install the packages depending on the speed of your machine and network.

Once complete, you'll be presented with a 'Congratulations' screen. NOTE you'll want to eject your boot CDROM prior to rebooting so you don't boot back to the boot iso image.

The final installation screen has a 'reboot' bottom on the right corner. Again, make sure to remove any CDROM left in the drive from the initial boot of the installation program.

Post Install

Red Hat Welcome

The first time you boot your newly-installed system in the graphical run level (run level 5) the Red Hat Welcome screens may automatically run.

If you are planning to taylor your system you can skip most or all of these steps -- they are either unneeded or will be handled by taylor.

The welcome screens are intended for stand-alone systems and guides you through a number of first time system administration tasks such as:

License Information

You'll need to agree to the License agreement.

Set Up Software Updates

If running Taylor, then choose 'no'. (You'll need to confirm 'No Thanks'.)

Create User, (a non-admin local account)

In particular, avoid creating a local account with the same username as your SLAC UNIX account or registering personally with RHN. If you plan to taylor the system, you do not need to create a local account. Please do not. For the Create User screen 'Forward' button with no additions or adjustments. You'll need to confirm you want to continue without a user account.

Date and Time

Accept the defaults.

Kdump

Accept the defaults. Do not choose to reboot to enable kdumps.

On the next screen, you'll click on 'Other..' enter 'root' as the user and password you picked earlier. You'll see messages related to being logged in as root, and how it's not ideal, but this okay for this one time. You'll also see missing entitlements message

The Linux Logical Volume Manager (LVM)

by Heinz Mauelshagen and Matthew O'Keefe

Introduction Basic LVM commands Differences between LVM1 and LVM2 Summary About the authors Storage technology plays a critical role in increasing the performance, availability, and manageability of Linux servers. One of the most important new developments in the Linux 2.6 kernelon which the Red Hat Enterprise Linux 4 kernel is basedis the Linux Logical Volume Manager, version 2 (or LVM 2). It combines a more consistent and robust internal design with important new features including volume mirroring and clustering, yet it is upwardly compatible with the original Logical Volume Manager 1 (LVM 1) commands and metadata. This article summarizes the basic principles behind the LVM and provide examples of basic operations to be performed with it.

Introduction

Logical volume management is a widely-used technique for deploying logical rather than physical storage. With LVM, "logical" partitions can span across physical hard drives and can be resized (unlike traditional ext3 "raw" partitions). A physical disk is divided into one or more physical volumes (Pvs), and logical volume groups (VGs) are created by combining PVs as shown in Figure 1. LVM internal organization. Notice the VGs can be an aggregate of PVs from multiple physical disks.

Figure 1. LVM internal organization

Figure 2. Mapping logical extents to physical extents shows how the logical volumes are mapped onto physical volumes. Each PV consists of a number of fixed-size physical extents (PEs); similarly, each LV consists of a number of fixed-size logical extents (LEs). (LEs and PEs are always the same size, the default in LVM 2 is 4 MB.) An LV is created by mapping logical extents to physical extents, so that references to logical block numbers are resolved to physical block numbers. These mappings can be constructed to achieve particular performance, scalability, or availability goals.

Figure 2. Mapping logical extents to physical extents

For example, multiple PVs can be connected together to create a single large logical volume as shown in Figure 3. LVM linear mapping. This approach, known as a linear mapping, allows a file system or database larger than a single volume to be created using two physical disks. An alternative approach is a striped mapping, in which stripes (groups of contiguous physical extents) from alternate PVs are mapped to a single LV, as shown in Figure 4. LVM striped mapping. The striped mapping allows a single logical volume to nearly achieve the combined performance of two PVs and is used quite often to achieve high-bandwidth disk transfers.

Figure 3. LVM linear mapping

Figure 4. LVM striped mapping (4 physical extents per stripe)

Through these different types of logical-to-physical mappings, LVM can achieve four important advantages over raw physical partitions:

1. Logical volumes can be resized while they are mounted and accessible by the database or file system, removing the downtime associated with adding or deleting storage from a Linux server

2. Data from one (potentially faulty or damaged) physical device may be relocated to another device that is newer, faster or more resilient, while the original volume remains online and accessible

3. Logical volumes can be constructed by aggregating physical devices to increase performance (via disk striping) or redundancy (via disk mirroring and I/O multipathing)

4. Logical volume snapshots can be created to represent the exact state of the volume at a certain point-in-time, allowing accurate backups to proceed simultaneously with regular system operation