HINTS_Solaris.txt 3.98 KB
Newer Older
1
.. -*- mode: rst; fill-column: 78; -*-
2 3 4 5 6 7
.. This document is formatted using the ReST syntax.

================================================
Aegir -- Solaris installation instructions hints
================================================

8 9 10 11
This is a helper file to the canonical INSTALL.txt. It is aimed at helping you
install Aegir on Solaris. 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.
12

13 14
It is recommended that the INSTALL.txt document is consulted before going
ahead with this install.
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

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

TODO: Show how to install:

 * Apache2
 * git
 * sudo
 * mysql
 * PHP 5.2
 * wget

unzip and sendmail should be part of the base Solaris install. Other
applications should be available on the companion CDs or:

http://www.sunfreeware.com/

In particular, git can be compiled easily by exporting the following
environment::
 export CFLAGS="-I/usr/sfw/include -I/opt/sfw/include"
 export LD_LIBRARY_PATH="/usr/sfw/lib:/opt/sfw/lib:$LD_LIBRARY_PATH"

Then the compile instructions bundled with git should just be followed
plainly.

50 51 52
XXX: I had trouble installing the binaries, as git expects ginstall to be
available in the path. I ended up adding the source directory in the path,
which works fine for most uses.
53 54 55 56 57 58 59 60

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

Shell commands::
 groupadd aegir
 useradd -g aegir -G webservd -d /var/aegir -s /bin/bash -c "Aegir sandbox" aegir
 chown aegir:aegir /var/aegir
61
 echo "Include /var/aegir/config/apache.conf" >> /etc/apache2/httpd.conf
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

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 USAGE,CREATE USER ON *.* TO 'aegir_root'@'localhost' \
   IDENTIFIED BY 'aegir_root_password' WITH GRANT OPTION;
 GRANT ALL PRIVILEGES ON `site\_%`.* TO 'aegir_root'@'localhost';

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

Shell commands::
 su - aegir
 bash install.sh.txt -w webservd -d /var/aegir

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

You should now be in the installation wizard. The wizard is usually
86 87
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.
88 89 90 91 92 93 94 95 96 97 98 99 100

5. Common issues
================

Drush issue
-----------

Solaris suffers from the dreaded execution issues of drush:

http://drupal.org/node/637574
http://drupal.org/node/586466

Those can be worked around by hardcoding the --php executable on the
101 102
commandline path. Adding the proper shebang header and using a proper PATH
that includes the PHP executable also helps.
103 104 105 106

Cron issues
-----------

107 108 109 110
I had numerous problems setting up a proper cron job, as Solaris' crond seems
pretty anal about what it accepts. The only way I could get it to work was to
create a wrapper shell script that would be called using the simplest cron
tab.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127

Crontab entry::

 * * * * * /var/aegir/dispatch.sh

Content of dispatch.sh::
 #!/usr/bin/bash
 
 HOME=/var/aegir
 LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/lib/sparcv9:/opt/mysql/mysql/lib:/usr/sfw/lib:/usr/sfw/lib/gcc:/opt/sfw/lib
 PATH=/usr/bin:/opt/mysql/mysql/bin:/usr/sfw/bin:/opt/sfw/bin:/opt/SUNWspro/bin:/usr/local/bin:/opt/csw/bin
 
 export HOME
 export LD_LIBRARY_PATH
 export PATH
 
 php '/var/aegir/drush/drush.php' --php=/usr/local/bin/php hosting tasks --root='/var/aegir/hostmaster-HEAD' --uri='http://aegir.example.com'