New RHEL/CentOS Install Notes for Aegir Hosting System
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:
127.0.0.1 localhost localhost.localdomain
18.104.22.168 aegir aegir.obj-a.com
/sbin/service syslog restart
Setup a proper repo to get proper php 5.2 for Drush reasons...
rpm --import <a href="http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka" title="http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka">http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka</a>
nano -w /etc/yum.repos.d/utterramblings.repo
name=Jason's Utter Ramblings Repo
Load all the great ingredients you need
yum install httpd postfix cvs sudo unzip mysql-server php php-mysql php-mbstring
Do a little edit in the main apache configuration to get rid of the annoying FQDN notices
-- Find ServerName in the conf file and enter similar domain name...
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
service iptables restart
Make sure rules are entered:
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;
Setup some special allowances for your aegir user to relaunch apache without a password prompt
-- You need to comment out the line
-- then ON CENTOS (stupid simple)
-- or ON RHEL (not so simple)
Cmnd_Alias APACHECTL = /usr/sbin/apachectl
echo "Include /var/aegir/config/vhost.d/" > /etc/httpd/conf.d/aegir.conf
"GIT" some code to paste
GO TO <a href="http://git.aegirproject.org/?p=hostmaster.git;a=summary" title="http://git.aegirproject.org/?p=hostmaster.git;a=summary">http://git.aegirproject.org/?p=hostmaster.git;a=summary</a>
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.
-- *at the time the install.sh.txt file i used was in hostmaster-0.4-alpha5 but newest was this!
-- leave it
-- CENTOS/RHEL is this vs. UBUNTU/DEBIAN www-data
-- was 6.x-3.0-alpha1 (not newest)
-- leave it unless different/newer
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"
-- 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
now run this different dynamically generated script
su aegir -c "sh ./install.sh.txt -w apache aegir.obj-a.com"
service httpd restart
Start enjoying your labor with a "wizard" (hate that word)
#open a browser...
<a href="http://aegir.obj-a.com/install.php" title="http://aegir.obj-a.com/install.php">http://aegir.obj-a.com/install.php</a>
-- 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
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!