HINTS_CentOS.txt 3.86 KB
Newer Older
1
.. -*- mode: rst; fill-column: 78; -*-
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
.. This document is formatted using the ReST syntax.

===============================================
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:

 1. Install requirements
 2. Configure system requirements, which include:
    * create a Aegir user
    * configure Apache, MySQL, DNS, etc
 3. Install the Aegir files
 4. Follow the install wizard


1. Install software requirements
================================

You should use the repos "utter ramblings" repos (which feature PHP
5.2) at: http://www.jasonlitka.com/yum-repository/

Shell commands::

 rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
 cat >> /etc/yum.repos.d/utterramblings.repo <<EOF
[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
EOF
 yum install httpd postfix cvs sudo unzip mysql-server php php-mysql

2. Configure system requirements
================================

Shell commands::
 useradd --home-dir /var/aegir aegir
 gpasswd -a aegir www-data
 chmod -R 755 /var/aegir
52 53
 # Include the Aegir configs
 ln -s /var/aegir/config/apache.conf /etc/httpd/conf.d/aegir.conf
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
 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.

MySQL commands::
 # Replace 'aegir_password' with the chosen password for 'aegir' mysql account
 CREATE DATABASE aegir;
 GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, \
   CREATE TEMPORARY TABLES, LOCK TABLES ON aegir.* TO \
   'aegir'@'localhost' IDENTIFIED BY 'aegir_password';
 # Create a mysql super user (with GRANT OPTION)
 # Replace 'aegir_root_password' with a new password
 GRANT ALL PRIVILEGES ON *.* TO 'aegir_root'@'localhost' \
   IDENTIFIED BY 'aegir_root_password' WITH GRANT OPTION;

You may need to edit your local hosts file to get the aegir domain to work if you 
have not already added a DNS record for this. On OS X:

http://decoding.wordpress.com/2009/04/06/how-to-edit-the-hosts-file-in-mac-os-x-leopard/


3. Install the Aegir files
==========================

Shell commands::
 su aegir -c "sh install.sh.txt -w apache"
 service httpd restart


4. Follow the install wizard
============================

You should now be in the installation wizard. The wizard is usually
self-documenting so you should just be able to follow the instructions
in the wizard to configure Aegir to properly use the webserver and
database server.

5. 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)".

Also, in some configurations, it seems necessary to restart crond for
the user crontab changes to take effect (very bizarre). For that, use:

Shell commands::
 service crond restart

See http://drupal.org/node/632308 if you have more information about
this issue.

The default sudo configuration in CentOS requires sudo to run in a real
TTY which will make verify and install tasks failed 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 comment out the following line
in your /etc/sudoers file:

Defaults    requiretty