Aegir -- CentOS installation instructions hints
This is a helper file to the canonical INSTALL.txt. It is aimed at helping you install Aegir on CentOS. It simply lists commands that diverge from the base INSTALL.txt in a concise document that will be easy to maintain in the long term.
It is recommended that the INSTALL.txt document is consulted before going ahead with this install.
We reuse the same process describe in that document:
- Install requirements
- Configure system requirements, which include:
- create a Aegir user
- configure Apache, MySQL, DNS, etc
- Run the install script
1. Install software requirements
You should use the repos "utter ramblings" repos (which feature PHP 5.2) at: http://www.jasonlitka.com/yum-repository/
rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
cat >> /etc/yum.repos.d/utterramblings.repo <<EOF
name=Jason's Utter Ramblings Repo
yum install httpd postfix sudo unzip mysql-server php php-mysql
2. Configure system requirements
useradd --home-dir /var/aegir aegir
gpasswd -a aegir apache
chmod -R 755 /var/aegir
# Include the Aegir configs
ln -s /var/aegir/config/apache.conf /etc/httpd/conf.d/aegir.conf
service mysqld start
# Optional: set the mysql root password
mysqladmin password $password
mysql -uroot -p
The last two lines can also be (better) accomplished using the mysql_secure_installation script.
The aegir user needs to have sudo access. The wizard will explain how to do this, but you can already just add the relevant line to your sudoers file.
aegir ALL=NOPASSWD: /usr/sbin/apachectl
The default sudo configuration in CentOS requires sudo to run in a real TTY which will make verify and install tasks fail with the message:
"Web server could not be restarted. Changes might not be available until this has been done"
For sudo to behave properly, you should also comment out the following line in your /etc/sudoers file:
3. Run the install script
This section deals with the actual installation of Aegir.
There is an install script that takes care of installing the right packages and preparing the backend and frontend install for you. That script needs to be run as the aegir user created above. This file is available in Provision or can be downloaded through the web at:
By default, the install script will install the "correct" version of Aegir (ie. if it was downloaded through git, it will install the version from the git master branch. If you downloaded an official release, it should install the official release.). You can modify which version to install by editing the AEGIR_VERSION variable in the script.
su -s /bin/sh aegir -c "sh install.sh.txt aegir.example.com"
Note you must run this as root or prefix with sudo.
Be sure to change 'aegir.example.com' to match the URI of your site.
You can append '--firstname.lastname@example.org' if you wish to receive the traditional Drupal 'Welcome' e-mail upon completion of the installation. This e-mail address will also be used as the default e-mail address of the first user and client in Aegir, but can be changed later.
4. Common issues
There are various caveats on running Aegir on CentOS.
You may need to adjust CentOS's firewall settings to allow HTTP traffic on port 80. If you installed CentOS with a UI, enable "Firewall settings -- WWW (HTTP)".
Alternatively, another solution may be to edit /etc/sysconfig/iptables and add a rule accepting traffic on the relevant interface on port 80.
Afterwards, you can restart the firewall with this command:
service iptables restart
Also, in some configurations, it seems necessary to restart crond for the user crontab changes to take effect (very bizarre). For that, use:
service crond restart
See http://drupal.org/node/632308 if you have more information about this issue.