In this post I will explain how to install a highly available server or in other words servers with a downtime of barely 0.001%. Computers crash sooner or later either due to some faulty component or as a result of a software bug, this tutorial will show how a simple server can be made nearly indestructible while costing near to nothing in requirement for technical knowledge.
The program I’ll use is HA-OSCAR, well simply because its free, open source, and lastly I know everything about it!
Ensure you get the following ready:
1. You have access to two computers that will be used as servers.
2. You are running at least CentOS4 or above.
Note: Portions of this tutorial in red text means it applies only to installation on a Rocks Cluster.
Download the three necessary HA-OSCAR packages available from XCR website to the computer that will be as the primary server
Create two directories “ha” and “rpm” in a “/tftpboot” directory
mkdir /tftpboot/ha
mkdir /tftpboot/rpm
Move the two repository haoscar packages “haoscar-repo-common” and “haoscar-repo-rhel” to your “/tftpboot/ha” directory
mv haoscar-repo-* /tftpboot/ha/
Untar these repository files that you moved in the previous step
tar xfvz haoscar-repo-common-*
tar xfvz haoscar-repos-rhel-*
Copy all the rpms from your installation DVD or all installation CDs into “/tftpboot/rpm”
cp /PATH/TO/DVD/RPMS /tftpboot/rpm/
Move the main haoscar package still in your download directory to any path of your choice, preferable to your desktop. Untar this file.
tar xfvz haoscar2.0.tar.gz
Change directory to the resulting haoscar folder and run the installation script “haoscar_install” with your private ethernet port as an argument:
cd haoscar2.0/
./haoscar_install eth0
If installing on CentOS you will be asked to enter a mysql password, leave blank and press enter on the other hand if installation is being done on Rocks Cluster, you will be asked to enter the root password for mysql, type the root password then when prompted to enter mysql password a second time leave blank.
On completion of all these steps you will see the HA-OSCAR graphical installer come up.
Follow the steps shown in the installer as follows:
Install HA-OSCAR server
Build Image of standby server
Configure image of standby server
Setup Network boot and install Standby server
Complete Installation
Exit.
Warnings!
When creating an image of the server in step 2, ensure that no additional drives such as flash drives are connected to the image otherwise installation on your standby server WILL FAIL during partitioning.
Known Bugs
- When asked to enter root password for mysql, if you recieve a message saying “access denied” or such, ensure that you can start up mysql manually i.e
service mysqld start
if it is unable to start due to a timeout error then there exists a bug with your mysql installation. A similar problem is outlined here. Note that this problem occurs when you install rocks with some of the os disks provided by rocks cluster, if you use an official CentOS disk as your OS base disk installation goes smoothly.
