Linux Server Setup with CentOS 5.2
|The information on this page has been deprecated..
It is provided for informational purposes only.
Go Here Instead
- For setup instructions under 4.3, see Linux Server Setup with CentOS 4.3.
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:
- /boot 100M Boot flag on
- / (root) 10Gig
- 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:
- Static IP for the host
- Fully Qualified Host Name
- Subnet mask
- Default Gateway
- Primary DNS Server
- Secondary DNS server
- Desktop – Gnome unchecked
- Server GUI
- All Sever Daemons disabled under the Servers Group
- Disabling Dialup Networking Support under Base System
- Everything else default
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.
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.
Next you will see the initial CentOS 5 splash screen, click Next to continue.
Select English (English) as the default language and click Next.
Select U.S. English for the keyboard type and click Next.
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.
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.
You will be prompted to confirm this choice. If you’re satisfied, click Yes to continue.
The system made the following determinations for our 10.2Gig drive:
- It created a 100MB partition called /dev/hda1 with a mount point of /boot
- It created a 10.1Gig Logical Volume Partition called VolGroup00 and subdivided it into two logical volumes called LogVol00 root and LogVol01 swap.
We suggest swap be between 50%-100% the amount of RAM installed
- LogVol00 / (root) and 8.13Gig in size
- LogVol01 swap and 1.984Gig in size (in this case 50% of the RAM we have installed – 4Gig)
If you’re satisfied with the partition layout select Next to continue. Otherwise, modify partition types and sizes as necessary and then click Next.
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.
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:
- IP address
- FQDN – Fully Qualifed Domain (host) Name
- Default Gateway
- Primary DNS
- Secondary DNS
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.
Next enter in the hostname, Gateway address, Primary and Secondary DNS, and select Next to continue.
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.
Next, set the root password. You’ll need to enter it in twice. When finished, select Next to continue.
Uncheck all boxes except for the one marked “Server – GUI”. Activate the ‘Customize now’ radio button and click Next to continue.
On the next screen, make the following Package Group choices:
- Desktop Environments
- Gnome Desktop Environment
- Text-based Internet
- Development – Nothing Checked
- Servers – By default, almost all server components are checked. You will need to uncheck all the server component boxes
- Base System
- Administrator Tools
- Un-check Dialup Networking Support
- System Tools
- X Windows System
- Virtualization – Nothing Checked
- Clustering – Nothing Checked
- Cluster Storage – Nothing Checked
- Languages – Nothing Checked
Once you’ve made the appropriate Package Group choices, click Next to continue.
Now, CentOS is ready to begin the installation. Click Next to continue.
After formatting the partitions according to the settings selected earlier, the installation will begin.
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.
Post Operation System Installation
Initial startup screen
There are a few configuration changes we need to make to our new system. Click Forward to continue.
The first configuration change we will make is to disable the firewall. Choose ‘Disabled’ from the drop down box and click Forward to continue.
A Window will pop up and ask you to confirm this choice. Click Yes to continue.
Next, SELinux needs to be disabled. Select Disabled from the drop down box and click Forward to continue.
Again, a window will prompt you to confirm your selection. Click Yes to continue.
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.
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.
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.
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.
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.
No additional CDs will be installed at this time, click Finish to complete the Post OS Installation process.
You may see a window informing you the system may need to reboot. Click OK to continue and reboot the system.
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’.
Enter “xterm” for the Name, Command and Comment section and click OK to continue.
A new icon is created on the desktop. Double click on the icon to open up an Xterm window.
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:
- Installs some additional programs and libraries needed by the HeroEngine server daemons and the Oracle client.
- Creates the user heroengine and set’s up the .bash_profile
- Creates the oracle users and set’s up the .bash_profile
- 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.
In the xterm windows, as the user oracle, we will run the following command: /mnt/client/runInstaler –ignoreSysPrereqs and hit enter
Initial Welcome screen. Click Next to continue.
The inventory directory should be /opt/oracle/orainventory. The OS group name should be heroengine. Select Next to continue.
Select a Custom installation and select Next to continue
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.
Product Components selection – The following 5 components should be selected:
- Oracle Call Interface (OCI)
- Oracle Programmer
- Oracle XML Development Kit
- Oracle Net
After selecting these components, click Next to continue.
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.
A warning window will pop up requesting you to confirm continuation of the Client installation. Select Yes to continue.
A summary window will pop up. After reviewing the information select, Install to continue.
The installation process will now begin.
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.
Select Next to begin the Net Configuration process.
The actual configuration process is done in the background. Select Finish to continue.
Now switch to the root xterm window and run the two scripts below.
Once you’ve run the two scripts switch back to the Oracle Client installation window and select OK to continue.
This completes the Installation process. Select Exit to continue.
A window will pop up asking you to confirm you wish to Exit. Select Yes to continue.
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:
Initial Welcome screen. Click Next to continue.
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.
A summary window will pop up. After reviewing the information select Install to continue.
Select Exit to complete the Patch Installation process.
Select Yes to confirm you are done.
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
Post Oracle Installation
- Copy over tnsnames.ora from your HeroEngine Oracle database to the /opt/oracle/product/10.2.0/network/admin/ directory
- Edit /opt/oracle/product/10.2.0/network/admin/sqlnet.ora
- NAME.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
- NAME.DIRECTORY_PATH= (EZCONNECT, TNSNAMES)
- 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:
- Continue with instructions for the Development Environment.
- Continue with instructions for setting up a World Server
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
- To install the HeroEngine binaries from a binary RPM, first log in as root and navigate to the directory containing the RPM:
- Then, to perform a default install, simply type:
rpm –i [rpmfile_name] (e.g. rpm –i heroengine-1.22.0-1.i386.rpm)
- This will install HeroEngine into the default install path: /opt/heroengine
- To specify a different installation path, add the --prefix option to your rpm command; for example:
rpm –I --prefix /home/heroengine heroengine-1.22.0-1.i386.rpm
- To verify the package was installed correctly, query the local rpm database for information about the HeroEngine package:
rpm –q –i heroengine
- At this point, HeroEngine is installed under ownership of the user heroengine and you may begin using your HeroEngine installation!