Linux Server Setup with CentOS 5.2

From HEWIKI
Jump to: navigation, search
The information on this page has been deprecated..

It is provided for informational purposes only.




Contents

Go Here Instead

Operating System Installation: CentOS 5.2







For setup instructions under 4.3, see Linux Server Setup with CentOS 4.3.

Prerequisites

This document assumes a very low level of knowledge in setting up and configuring CentOS / Redhat 5 and the Oracle client.

Quick install instructions for advanced users

The latest version of CentOS is at : http://isoredirect.centos.org/centos/5/isos/i386/

I would suggest downloading the DVD instead of the 6 CDs http://centos.mirroring.us/5.2/isos/i386/CentOS-5.2-i386-bin-DVD.iso


The following are minimum partition suggestions:

  1. /boot 100M Boot flag on
  2. / (root) 10Gig
  3. Swap partition -- 50-100% of the RAM installed.

Static IP needs to be set, and you can disable IPv6. You’ll need to know the following network information:

Package Selection:

Firewall and SELinux disabled.

NTP (Netowrk Time Protocol) turned on, and Synchronize system clock before starting service enabled

Initial Operating System Installation

Step by Step Instructions for installation of CentOS 5.2 Boot the system with the CentOS 5.2 32bit DVD.

Description

When you see this screen, hit <ENTER> to start the graphical installer.


On the following screen, you can choose whether to test the installation media or not; by default, we’ll skip this part.

Description


Next you will see the initial CentOS 5 splash screen, click Next to continue.

Description


Select English (English) as the default language and click Next.

Description


Select U.S. English for the keyboard type and click Next.

Description


Disk partitioning will come next. In this scenario we have a single 10Gig hard drive seen as /dev/hda. We will be allowing the OS to make the determinations of how to setup the partitions and reviewing what is suggested. Advanced users may create their own disk partitioning scheme. Select Yes to continue.

Description


In this case we will be removing all existing partitions and creating a default layout. Check the box to review what’s been suggested to make sure it meets our needs. Select Next to continue.

Description


You will be prompted to confirm this choice. If you’re satisfied, click Yes to continue.

Description


The system made the following determinations for our 10.2Gig drive:

We suggest swap be between 50%-100% the amount of RAM installed

Description


If you’re satisfied with the partition layout select Next to continue. Otherwise, modify partition types and sizes as necessary and then click Next.

Description


Make sure the radio button to use the Grub boot loader is selected. If you wish to set a boot loader password you can check the “Use a boot loader password” box to do so. When satisfied,click Next.

Description


Now we’re going to configure the IP Address for the server. Do not use DHCP; instead, assign a static IP by first clicking on the Edit button, then following the instructions below:


You will need the following information:

Description


Check the box to enable IPv4 Support. Select the Manual configuration radio button and enter the IP address and subnet mask for this host. The IPv6 box can be unchecked if IPv6 is not supported by your network. Click OK to continue.

Description


Next enter in the hostname, Gateway address, Primary and Secondary DNS, and select Next to continue.

Description


Select your time zone, for us it’s America/Chicago in this case and leave the checkbox named ‘System clock uses UTC’ marked. When finished, click Next.

Description


Next, set the root password. You’ll need to enter it in twice. When finished, select Next to continue.

Description


Package Selection

Uncheck all boxes except for the one marked “Server – GUI”. Activate the ‘Customize now’ radio button and click Next to continue.

Description


On the next screen, make the following Package Group choices:

Description


Description


Description


Description


Once you’ve made the appropriate Package Group choices, click Next to continue.

Description


Now, CentOS is ready to begin the installation. Click Next to continue.

Description


After formatting the partitions according to the settings selected earlier, the installation will begin.

Description


Once it’s completed you’ll be prompted to Reboot the system. Select the Reboot button, wait for your new CentOS install to come up, and continue with the “Post Installation Steps” section of this document.

Description

Post Operation System Installation

Initial startup screen

Description


There are a few configuration changes we need to make to our new system. Click Forward to continue.

Description


The first configuration change we will make is to disable the firewall. Choose ‘Disabled’ from the drop down box and click Forward to continue.

Description


A Window will pop up and ask you to confirm this choice. Click Yes to continue.

Description


Next, SELinux needs to be disabled. Select Disabled from the drop down box and click Forward to continue.

Description


Again, a window will prompt you to confirm your selection. Click Yes to continue.

Description


Next you can choose to enable or disable Kdump (which is a mechanism to capture system information should there be a crash). By default, we will not enable Kdump. More advanced users may enable it should they choose.

Description


Date and Time

Verify the date and time are correct. If they’re not, update them to the correct time. We also suggest enabling the Network Time Protocol. Select the Network Time Protocol tab to enable NTP.

Description


Check the box to Enable Network Time Protocol; by defaults 3 NTP servers are already included. You may choose to Add additional Time servers if you have a different set of servers you wish to use. Under ‘Show advanced options,’ we suggest checking the box to Synchronize system clock before starting service. Once you’ve made your selections, click Forward to continue.

Description


Next, create an account for yourself. Enter in a Username, the Full Name, Password and Confirm Password. We will be using default authentication settings of shadow passwords and MD5 password hashing. More advanced users may wish to use a central LDAP server or Active Directory for authentication, but that is beyond the scope of this document.

Description


No sound cards are installed in this server and will not be configured. Sound is not needed for a HeroEngine server, so this step may be skipped if a sound card is installed. Click Forward to continue.

Description


No additional CDs will be installed at this time, click Finish to complete the Post OS Installation process.

Description


You may see a window informing you the system may need to reboot. Click OK to continue and reboot the system.

Description

System Preparation for Oracle Installation

First, log in as root. Create a shortcut for xterm on the desktop as follows. Right-click on the desktop and select ‘Create Launcher’.

Description


Enter “xterm” for the Name, Command and Comment section and click OK to continue.

Description


A new icon is created on the desktop. Double click on the icon to open up an Xterm window.

Description
Description


Obtain and run the sys_prep script to prepare the system for the Oracle installation and set up needed user accounts.

NOTE – At this time the best way to get the sys_prep.sh script is to download it from licensee.play.net. Also, the contents of sys_prep.sh script can be found in Appendix A.

The sys_prep.sh script does the following:

  1. Installs some additional programs and libraries needed by the HeroEngine server daemons and the Oracle client.
  2. Creates the user heroengine and set’s up the .bash_profile
  3. Creates the oracle users and set’s up the .bash_profile
  4. Set more permissive permissions to the /opt/oracle directory.

Log out as root.

Oracle 10gR2 Client Installation

Log in as the user oracle and create an XTERM launcher as done earlier.


Open up two xterm windows. In one of the windows become root by typing ‘su – ‘ and hit enter. Enter in the password used to create the root account.


Now, if you have not already done so, you’ll need to locate the source of the Oracle Client installation media. If you need to download the client and patches the link is http://www.oracle.com/technology/software/products/database/index.html

In our installation scenario we will be installing from a NFS mount. mount –t nfs depot.simutronics.com:/opt/10g_r2 /mnt


The location for the installation will now be /mnt/client.

Description


In the xterm windows, as the user oracle, we will run the following command: /mnt/client/runInstaler –ignoreSysPrereqs and hit enter

Description


Initial Welcome screen. Click Next to continue.

Description


The inventory directory should be /opt/oracle/orainventory. The OS group name should be heroengine. Select Next to continue.

Description


Select a Custom installation and select Next to continue

Description


The name for the installation should be OraClient10g_home1 and the Path should be /opt/oracle/product/10.2.0. If you’re satisfied with the settings, click Next to continue.

Description


Product Components selection – The following 5 components should be selected:

After selecting these components, click Next to continue.

Description


The Oracle client install will perform some Prerequisite Checks. One warning will be indicated and is a warning about the OS version. CentOS 5 (RedHat ES 5) is not officially supported by Oracle. We have exhaustively tested CentOS 5.2 and have found no compatibility issues. It is acceptable to select Next to continue.

Description


A warning window will pop up requesting you to confirm continuation of the Client installation. Select Yes to continue.

Description


A summary window will pop up. After reviewing the information select, Install to continue.

Description


The installation process will now begin.

Description


Once the installation process has completed the Oracle Net Configuration Assistant window will pop up. Check the box to Perform typical configuration and select Next to continue.

Description


Select Next to begin the Net Configuration process.

Description


The actual configuration process is done in the background. Select Finish to continue.

Description


Now switch to the root xterm window and run the two scripts below.

Description
Description
Description
Description
Description


Once you’ve run the two scripts switch back to the Oracle Client installation window and select OK to continue.

Description

This completes the Installation process. Select Exit to continue.

Description

A window will pop up asking you to confirm you wish to Exit. Select Yes to continue.

Description

Oracle Patching

Again you’ll need to locate where the 10202 patch set is located. It will be the same as used by the server. In our installation scenario the location resided on a NFS mount /mnt:

/mnt/10202_Patchset/Disk1/runInstaller –ignoreSysPrereqs

Description


Initial Welcome screen. Click Next to continue.

Description


Verify the Name is the same as during the installation, in this case OraClient10g_home1, verify the path is the same as well, in this case /opt/oracle/product/10.2.0, and click Next to continue.

Description


A summary window will pop up. After reviewing the information select Install to continue.

Description
Description


Select Exit to complete the Patch Installation process.

Description


Select Yes to confirm you are done.

Description


Installation of Patch set 10204

The installation is same as was done with the first patch set. Please see the previous section for what each screen should look like and what you should do.

Again, the location for our patch set installation resides on a NFS mount and is in the following path: /mnt/10204_Patchset/Disk1/runInstaller –ignoreSysPrereqs

Description

Post Oracle Installation

  1. Copy over tnsnames.ora from your HeroEngine Oracle database to the /opt/oracle/product/10.2.0/network/admin/ directory
  2. Edit /opt/oracle/product/10.2.0/network/admin/sqlnet.ora
    1. NAME.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    2. NAME.DIRECTORY_PATH= (EZCONNECT, TNSNAMES)
  3. Change the default run level from 5 to 3. We want change the default run level of the server from 5 (non X11) to run level 3 – Full multiuser non X11 so as to get rid of the X11 memory and cpu overhead..
vi /etc/inittab
change the following line
From
id:5:initdefault:
To
id:3:initdefault:

Save and exit


CONGRATULATIONS – You can REBOOT.


We are now ready to choose your server’s role – Development Server Vs. HeroEngine World Server. If you are only setting up an Oracle Database, you do not to proceed with the following links:


Appendix A: sys_prep.sh

#!/bin/sh

# This script will setup the system with the
# required libraries and applications needed
# to install and run the Oracle 10gR2 client
# as well as the HeroEngine server daemons.

yum -y install sysstat compat-db gcc libstdc++-devel openmotif22 libXtst

# Add heroengine and oracle users and groups
groupadd heroengine
useradd -g heroengine -d /opt/heroengine -m -s /bin/bash heroengine
echo " "
echo " "
echo "Now enter in the password for the user heroengine"
echo " "
passwd heroengine

# update .bash_profile settings for user heroengine
echo "export
LD_LIBRARY_PATH=\"/opt/heroengine/lib:/opt/oracle/product/10.2.0/lib\"" >>
/opt/heroengine/.bash_profile
echo "export ORACLE_HOME=/opt/oracle/product/10.2.0" >>
/opt/heroengine/.bash_profile
echo "export VS_ORACLE_HOME=\$ORACLE_HOME" >>
/opt/heroengine/.bash_profile

# Now setup the oracle users
# groupadd oinstall
groupadd dba
useradd -g heroengine -G dba -d /opt/oracle -m -s /bin/bash oracle
echo " "
echo " "
echo "Set the password for the user Oracle"
echo " "
passwd oracle

# Update .bash_profle settings for user oracle

cat>~oracle/.bash_profile <<EOF
#!/bin/sh
# .bash_profile

umask 022

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

# PATH=\$PATH:\$HOME/bin

# export PATH

export TMP=/tmp
export TMPDIR=\$TMP
export ORACLE_BASE=/opt/oracle;
export ORACLE_HOME=\$ORACLE_BASE/product/10.2.0;
export PATH=.:/usr/sbin/:\$ORACLE_HOME/bin:\$PATH;
export PATH=\$PATH:\$ORACLE_HOME/Apache/Apache/bin;
export ORACLE_SID=hedb;
# set -o emacs
set -o vi
set filec
EOF

# set more permissive permissions to the users
# oracle and heroengine home directories
chmod 750 /opt/oracle

Instructions for development environment to compile HeroEngine Server Daemons

1. Install P4 to /usr/local/bin
You can download the latest Linux P4 client from Perforce.
http://www.perforce.com/perforce/downloads/platform.html

2. As the user root, run the following command:
yum –y install gcc-c++ libpng-devel libjpeg-devel libtiff-devel

3. Add all people who are going to be compiling to the heroengine group

4. As user heroengine, verify the following lines are in .bash_profile
export ORACLE_HOME=/opt/oracle/product/10.2.0
export VS_ORACLE_HOME=$ORACLE_HOME
# export LD_LIBRARY_PATH=$ORACLE_HOME/lib

If the lines were not in the .bash_profile you will need to log out and log back in as the
heroengine user for the changes to take effect.

5. Sync to the perforce repository.

6. Continue with the directions for Building and Installing found here:
http://hewiki.play.net/mediawiki/index.php?title=Linux_Build_System

Instructions for setting up a World Server

See also: World Server

cd RPMS/i386

rpm –i [rpmfile_name] (e.g. rpm –i heroengine-1.22.0-1.i386.rpm)

rpm –I --prefix /home/heroengine heroengine-1.22.0-1.i386.rpm

Description

rpm –q –i heroengine

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox