Speech:RedHat


 * Home
 * Semesters - Project Work by Semester
 * Information
 * [System Description]
 * Experiments - List of speech experiments

System Description

 * Hardware Setup
 * System Software
 * [RedHat installation]
 * previous OS installation
 * Backups
 * Network Bridge
 * Utilities
 * Software Base

System Software Installation


Red Hat Installation

Steps for installing RedHat.

Getting to the installation screen
 * 1) Obtain an installation DVD with RedHat 6.6 x86 (32-bit) on it. RedHat x64 and other 64-bit operating systems are not compatible with some of the server hardware.
 * 2) Identify the disc drive above the hard drive of the server RedHat is being installed on. Make sure that the disc drive says “DVD” on it and not “CD-ROM.” The RedHat installation DVD will not work in a CD-ROM drive.
 * 3) Put the installation DVD in the disc drive.
 * 4) Turn on or restart the server.
 * 5) Ideally, the server should boot to an installation screen. If the server boots to the existing OS installation, reboot the system and as it starts up hit the F12 key to open the configuration menu.
 * 6) Use the arrow keys to navigate to “Boot Order” and hit enter to change the configurations. Use the arrow and + and - keys to change the order of the boot devices so that the boot order of the DVD is set to “1.”

Pre-Installation
 * 1) Select "Install or Upgrade an Existing System" as the installation type.
 * 2) Select “English” as the system language.
 * 3) Select “U.S. English” as the keyboard language.
 * 4) Select “Eastern Time - New York” as the Time Zone.
 * 5) Select “Basic Storage Device” as the storage type.
 * 6) Select “Fresh Install” as the installation type.
 * 7) Enter the server name and root password.
 * 8) Select “Create Customer Layout” for the disk usage type.
 * 9) Verify that the / (root) partition has close to 3TB of space. If it does not, make the necessary changes to give / the majority of disk space.
 * 10) If the / partition has enough disk space, click cancel and choose "Use All Space" as the disk usage type.
 * 11) Select “Write changes to disk” as the installation type.
 * 12) Select "Desktop" as the interface type.
 * 13) Select the "customize now" radio button on the same interface screen.
 * 14) Do not uncheck anything. On the customize installation screen. Select "base system" on the Customize Installation screen, and then check the following options:
 * 15) "compatibility libraries", "Legacy UNIX compatibility", and "Network Tools". Optional. if this server will host NFS, perform the following. Next, In the left drown down menu, select "server". Check "NFS file Server. Click next.
 * 16) "Legacy UNIX compatibility"
 * 17) "Network Tools"
 * 18) Optionally, select "Server" from the left drop down menu if the server will do NFS hosting, as is the case with the main server Caesar.

Installation
 * The RedHat installation should begin after completing the previous step. This should take at most 40 minutes.

Post-Installation
 * 1) When the installation is complete, agree to the end user license agreement.
 * 2) Select “No, I would like to register at a later time” when asked to register.
 * 3) Leave all fields blank when asked to create a new user. Click "Yes" after hitting the Next button when asked if you are sure you would like to continue without creating a default user.
 * 4) Enter the current Date and Time
 * 5) Select “No” when prompted to enable Kdump.

Volume Group
use the vgs command to view volume groups and free space available within each volume group

use the lvs command to view the logical volumes within the volume group

lvcreate -L 3.52T -n lv_main vg_brutus (creates a 3.52 TB logical volume named lv_main in volume group brutus)

Mount Point
Edit fstab - add mount point /mnt/main (fstab is config file that allows you to create mount points)

cd /etc/fstab

/dev/mapper/vg_brutus-lv_main /mnt/main ext4 defaults 1 2 (this is the line added to fstab so /mnt/main boots up with server and is configured)
 * Mounts the logical volume lv_main within volume group vg_brutus at /mnt/main

File System
mkfs.ext4 /dev/mapper/vg_brutus-lv_main (creates file system, ext4 is commonly used)

mount -a (mounts /mnt/main)

Enable Sphinx

 * As root, move /usr/local to /usr/local-OFF and link /mnt/main/local to /usr/local
 * i.e.
 * cd /usr
 * mv -i local local-OFF
 * ln -s /mnt/main/local local
 * this ties caesar's /usr/local/bin and /usr/local/lib to the new machine so we have all executables to run when we type them on the command line (or use in scripts)
 * As root, add string "/usr/local/lib" to file /etc/ld.so.conf
 * after which type command:
 * /sbin/ldconfig
 * then log out as root and once you log back in it works
 * this adds a path to /usr/local/lib libraries that Sphinx uses to run properly

Create Banners

 * Banners were created for each of the drone servers, getting the ascii art from here.
 * edit the file /etc/motd using either Vi or Gedit: vi /etc/motd or gedit /etc/motd
 * paste the banner
 * write changes

Red Hat Network Configuration

Each server has two network interface cards. Caesar (the main server) uses one to connect to the Internet and once for its local network. The drones are currently only using a network interface card to connect to the local network.

Host File Configuration

Configuring the host file will allow hosts on the local network to refer to each other by name.

To configure the host file, add the following to the file /etc/hosts:

192.168.10.1   caesar caesar 192.168.10.2   asterix asterix 192.168.10.3   obelix obelix 192.168.10.4   miraculix miraculix 192.168.10.5   traubadix traubadix 192.168.10.6   majestix majestix 192.168.10.7   idefix idefix 192.168.10.8   automatix automatix 192.168.10.9   methusalix methusalix 192.168.10.10  verleihnix verleihnix 192.168.10.11  rome rome 192.168.10.12  brutus brutus

For more information on configuring hosts, check out this link

Network Interface Card Setup
1. To view information about all the network cards on the system, enter the following command: ifconfig -a

2. Copy the MAC address of the network interface card you wish to use. e.g. 00:21:70:XX:XX:XX. You will need this to configure the ethernet adapter.

3. Navigate to /etc/sysconfig/network-scripts/. In here you should find a file named ifconfig-ethX where X represent the Ethernet number relative to the OS.

Note If you installed RedHat on a one server (the one with DVD drive) and moved the hard drive to a different server, the X value will increase to 3 and 4 (e.g. eth3 and eth4) the OS will not create a new config flle. Solution Rename the file to the appropriate Ethernet X value. e.g ifconfig-eth3

4. Configure the network card. Example is for setting up Ethernet adapter 4 for obelix.

DEVICE=eth4 IPADDR=192.168.10.3 NETMASK=255.255.255.0 NETWORK=192.168.10.1 BROADCAST=192.168.10.255 HWADDR=00:0F:1F:03:E6:84 TYPE=Ethernet UUID=50e385fd-3457-4668-9eb5-6befce9b54ee ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=static

It is important that you set NM_CONTROLLED=no. This lets the network manager know that it will not configure the ethernet adapter.

For the static IPs, please refer to the host file above.

For more information about configuring NICs, check out this link

5. Configure the kernel IP routing table. You can view a list of IP routes by entering the following command as root. Please note that this will not work as a normal user: ip route show Example results of a correctly configured IP routing table on Verleihnix: 192.168.10.0/24 dev eth0 proto kernel  scope link  src 192.168.10.10 The above configurations can be added to the routing table with the following command: ip route add 192.168.10.0/24 via 192.168.10.10 dev eth0

Configure DNS Server on Drone
To configure Caesar as a drone's DNS server, add the following to /etc/resolv.conf: search=caesar nameserver 132.177.128.99 nameserver 132.177.128.56 nameserver 132.177.102.30

When completed, restart the network service: service network restart

older documentation, should it be needed, had us use the following, though this has been deprecated:

nameserver 132.177.189.40 nameserver 132.177.189.41 nameserver 132.177.205.44

Configuring Static IP Address
For assigning a static IP address for the server, firstly configure the NIC card as described in the Network Configuration section. After that add the router as the default gateway. This should only be done on the main server (Caesar) while it is plugged in via ethernet to the UNH network. route add -net 0.0.0.0 netmask 255.255.252.0 gw 192.168.10.1 dev eth0

This will add 192.168.10.1 (the router's IP) to the kernel IP table and set it as the default gateway via the eth0 interface.

Note: If you get the "network unreachable" error or any other errors, this is probably because the server doesn't recognize the router's IP address. To solve this problem use the system-config-network utility to enable and disable dhcp.

On a terminal system-config-network Click on the eth0 card (Assuming eth0 is your static card) Enable dhcp save the settings and quit ping google.com Go back to the system-config-network Disable the dhcp Set back the static IP address and the default gateway Save and exit

By enabling and disabling dhcp the server will be, somehow, able to recognize the router's IP address.

Mounting Caesar's NFS on the drone
Since we don't want to install sphinx on every drone, Caesar is set up to host /mnt/main to share resources and save disk space.

For this, NFS utilities will be required. If it was not installed during the initial installation, install it with this command: yum install nfs-utils

Next, create a /mnt/main directory on the drone to mount Caesar's on: mkdir /mnt/main

Then, try mounting Caesar using the following command. mount -t nfs caesar:/mnt/main /mnt/main

Since we don't want to have to mount Caesar network drive every time we reboot the system. Add the following command to /etc/fstab: caesar:/mnt/main       /mnt/main               nfs     defaults        0 0 When you're done, save the file.

Next, add a cron job to automatically mount the file-system periodically just in case the connection between the drone and Caesar is lost. Open the terminal as root user and enter the following: crontab -e

Once the editor opens, enter the following: 0 0,6,12,18 * * * mount -a

Wireless Server Router Configuration

Using of USB wireless LAN adapter we are able to route IP traffic from the secondary interfaces of the drones, via Rome's secondary interface, through the wireless LAN adapter and access the internet. This does not make Rome directly accessible like that of Caesar, but it does allow us to install updates and packages that would require internet access. In addition to this, we are able to route the internet traffic coming across the wlan interface out through the secondary ethernet interface so that the rest of the drones can obtain internet access. This is possible through a series of firewall rules.

Installing Wireless Dongle
In the event that the drivers are uninstalled, here is a guide to re-install them.


 * Hardware MAC address: 00:02:72:8E:91:84

First unmount /mnt/main. Next, navigate to the extracted drivers folder (stored on desktop for this tutorial).

# ls rtl8712_8188_8191_8192SU_usb_linux_v2.6.0005.20091112.p4.tar.gz
 * 1) cd Desktop/wirelessdongle/driver

Extract the files with the following command:


 * 1) tar zxvf rtl8712_8188_8191_8192SU_usb_linux_v2.6.0005.20091112.p4.tar.gz

Once extracted, cd into folder and build the drivers (and clean up after you are done). It's safe to ignore errors:


 * 1) cd rtl8712_8188_8191_8192SU_usb_linux_v2.6.0005.20091229
 * 2) make
 * 3) ./clean

Finally enter this command to finish the installation:


 * 1) insmod 8712u.ko

The wireless dongle should be operational. If not, restart network services. Please take note of what kernel is being used, and what kernel the make command is trying to reference. Also, make sure that the following yum packages are up to date:


 * 1) yum install kernel-devel
 * 2) yum install kernel-headers

Configuring Network
The next step is to manually set Rome's default gateway. Navigate to the network config file, and open it up to edit it.

vi /etc/sysconfig/network

Add the following line anywhere in the config file.

GATEWAYDEV=wlan0

This sets Rome's default gateway to whatever IP is leased to the wlan interface. This is a much better option than hardcoding a leased IP which is subject to change. Next open and edit another file to turn on packet forwarding.

vi /etc/sysctl.conf

Change the following value from a zero to a one.

net.ipv4.ip_forward = 1

After IP packet forwarding is enabled, we will want to use iptables to set up our firewall rules for NATting traffic. Enter the following commands consecutively.

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE iptables -D FORWARD -j REJECT --reject-with icmp-host-prohibited iptables -A FORWARD -s 172.16.0.0/24 -j ACCEPT iptables -A FORWARD -d 172.16.0.0/24 -j ACCEPT iptables -A FORWARD -s ! 172.16.0.0/24 -j DROP

We then want to save the old configuration as a backup, and save the current rules so they will apply when Rome is rebooted.

cp /etc/sysconfig/iptables /etc/sysconfig/iptables.bak iptables-save > /etc/sysconfig/iptables

Finally, restart both network services and iptables

/etc/init.d/network restart /etc/init.d/iptables restart

Rome should be successfully configured as a router and now you can move on to configuring the drones.

Configuring Drones as Clients of Rome
Once Rome has been set up as a router, perform the following steps on each of the drones to grant them internet access.

nano /etc/sysconfig/network-scripts/ifcfg-eth1

Add/modify the following into the config file: IPADDR=172.16.0.X NETWORK=172.16.0.0 NETMASK=255.255.255.0 GATEWAY=172.16.0.11 BROADCAST=172.16.0.255 BOOTPROTO=static

Next you will need to edit the host file for the drones:

nano /etc/resolv.conf

And add the following if not already present:

search unh.edu nameserver 132.177.128.99 nameserver 132.177.128.56 nameserver 132.177.102.30