New RHEL/CentOS Install Notes for Aegir Hosting System

Events happening in the community are now at Drupal community events on www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

Needing to use RHEL on a project forced me to write up these docs, as I spent days and days (even with druroot already having done CENTOS install months and months before) trying to get the install script to work. After many tries and just starting with CentOS on Rackspace Cloud (pretty standard stuff) I found that this was now the best way to go with all the recent changes and lack of consistent documentation on Aegir on CentOS/RHEL w/ the newest Drush and Drush_make changes.

I had pointed my domain name at mediatemple vps, so I simply setup an A record there to point to my Rackspace Instances IP. (If you have not checked out rackspace cloud vs. Amazon's "interesting" offerings you seriously should.) Then I went and added DNS entry on Rackspace clouds DNS tab. So I setup the hostname on the instance (ssh in) like:

nano /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=aegir.obj-a.com
GATEWAY=173.203.214.1
nano /etc/hosts
127.0.0.1     localhost localhost.localdomain
173.203.214.158     aegir aegir.obj-a.com
/bin/hostname aegir.obj-a.com
/sbin/service syslog restart

Setup a proper repo to get proper php 5.2 for Drush reasons...

rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
nano -w /etc/yum.repos.d/utterramblings.repo
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

Load all the great ingredients you need

yum install httpd postfix cvs sudo unzip mysql-server php php-mysql php-mbstring
y, y
yum update

Do a little edit in the main apache configuration to get rid of the annoying FQDN notices

nano /etc/httpd/conf/httpd.conf
-- Find ServerName in the conf file and enter similar domain name...
ServerName aegir.obj-a.com
service httpd start

Open some ports (On rackspace had to open up firewall...)

iptables -I RH-Firewall-1-INPUT 1 -p tcp --dport http -j ACCEPT
iptables -I RH-Firewall-1-INPUT 1 -p tcp --dport https -j ACCEPT
/etc/init.d/iptables save
service iptables restart

Make sure rules are entered:

iptables -L
--Should show:
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http

Add the Aegir user and working/home directory

useradd --home-dir /var/aegir aegir 
usermod -g apache aegir 
chmod -R 755 /var/aegir

Do your database preparations

service mysqld start
mysqladmin password XXXXXX
mysql -uroot -p
CREATE DATABASE aegir; 
-- Replace 'aegir_password' with the chosen password for 'aegir' mysql account 
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON aegir.* TO 'aegir'@'localhost' IDENTIFIED BY 'XXXXXX';
GRANT ALL PRIVILEGES ON *.* TO 'aegir_root'@'localhost' IDENTIFIED BY 'XXXXXX' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'aegir'@'localhost' IDENTIFIED BY 'XXXXXX' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'aegir'@'127.0.0.1' IDENTIFIED BY 'XXXXXX' WITH GRANT OPTION;
exit;

Setup some special allowances for your aegir user to relaunch apache without a password prompt

visudo 
-- You need to comment out the line
Defaults requiretty
-- then ON CENTOS (stupid simple)
aegir ALL=NOPASSWD
-- or ON RHEL (not so simple)
Cmnd_Alias APACHECTL = /usr/sbin/apachectl
aegir   ALL=NOPASSWD:APACHECTL
echo "Include /var/aegir/config/vhost.d/" > /etc/httpd/conf.d/aegir.conf

"GIT" some code to paste

GO TO http://git.aegirproject.org/?p=hostmaster.git;a=summary
Find the latest hostmaster that contains the install.sh.txt, download it and fill out these variables in the file...
(Release that contains file may not be the newest as it will only show up in the release when it was last changed, see * below in example)
-- basic variables, change before release - and don't bother to enter my comments, heh.
AEGIR_DOMAIN=aegir.example.com
-- *at the time the install.sh.txt file i used was in hostmaster-0.4-alpha5 but newest was this! 
AEGIR_VERSION=0.4-alpha5
-- leave it
AEGIR_HOME=$HOME
-- CENTOS/RHEL is this vs. UBUNTU/DEBIAN www-data
WEB_GROUP=apache
-- was 6.x-3.0-alpha1 (not newest)
DRUSH_VERSION=All-versions-3.0
-- leave it unless different/newer
DRUSH_MAKE_VERSION=6.x-2.0-beta6 

cd /var/aegir
nano install.sh.txt 
paste in your install.sh.txt contents
-- save it obviously

Launch the script as user aegir

su aegir -c "sh /var/aegir/install.sh.txt -w apache aegir.obj-a.com"
Y
-- Your screen will freeze around jquery, give up and start a new term session... this was a huge problem that I finally just accepted... 
-- Basically ^c and just ssh in again
cd /var/aegir/hostmaster-0.4-alpha5/profiles/hostmaster/
now run this different dynamically generated script
su aegir -c "sh ./install.sh.txt -w apache aegir.obj-a.com"
Y
service httpd restart

Start enjoying your labor with a "wizard" (hate that word)

#open a browser...
http://aegir.obj-a.com/install.php
-- pick hostmaster, answer the next few obvious questions
-- when you get to the warning about settings.php permissions set it like this:
chmod 440 /var/aegir/hostmaster-0.4-alpha5/sites/aegir.obj-a.com/settings.php
-- THEN when you reach Configure your database server use 
aegir_root user vs. aegir (we configured it earlier)
-- at the initialize system item run these in command line:
su -s /bin/sh aegir
cd /var/aegir/hostmaster-0.4-alpha5
php /var/aegir/drush/drush.php --uri=http://aegir.obj-a.com hosting-setup
Everything else is seriously easy...

Shew... Good Luck and I welcome to a look at the install script where it freezes up, thanx... really love aegir!

San Diego DUG

Group categories

Event Classifications

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: