While installing Aegir for FreeBSD there were a couple additional steps that were not included in install.txt (mig5 encouraged me to share my experience)
Alright, first issue I came across was in regards to the php dependancies, do not forget that only certain php modules are "drush" friendly but be sure to install what you need, here is a list of known friendly extensions:
Also, do not forget to install unzip '/usr/ports/archivers/unzip' or install will fail when grabbing jquery
bcmath
bz2
ctype
curl
pcre
simplexml
spl
dom
filter
ftp
gd
gettext
hash
iconv
json
mysql
openssl
pdf
posix
readline
session
sockets
tokenizer
xml
xmlreader
xmlwriter
zlib
mcrypt
mbstring
mysqli
pdo_mysqli
Once you have your dependencies settled there are a couple edits that make the install.sh friendlier for the environment:
install.sh:
########################################################################
# Aegir quick install script
@@ -20,18 +20,22 @@
########################################################################
# basic variables, change before release
-AEGIR_DOMAIN=aegir.example.com
-AEGIR_VERSION=HEAD
+HOME=/www/aegir
+PHP_LIBRARY=/usr/local/bin/php
+AEGIR_DOMAIN=aegir.example.com
+AEGIR_VERSION=6.x-0.4-alpha3
AEGIR_HOME=$HOME
WEB_GROUP=www-data
-DRUSH="$AEGIR_HOME/drush/drush.php"
-DRUSH_VERSION=All-Versions-2.1
+DRUSH="$AEGIR_HOME/drush/drush.php --debug --php=$PHP_LIBRARY"
+DRUSH_VERSION=All-Versions-HEAD
# when adding a variable here, add it to the display below
# no configurable settings below this line
-HOSTMASTER_DIR=$AEGIR_HOME/hostmaster-$AEGIR_VERSION
-
-########################################################################
+HOSTMASTER_DIR=$AEGIR_HOME/platforms/hostmaster-$AEGIR_VERSION
+
+########################################################################
+
+
# functions
# noticeable messages
@@ -104,6 +108,8 @@
* you have read INSTALL.txt and prepared the platform accordingly
* you are running as your "aegir" user
* the following settings are correct:
+HOME=$HOME
+PHP_LIBRARY=$PHP_LIBRARY
AEGIR_DOMAIN=$AEGIR_DOMAIN
AEGIR_VERSION=$AEGIR_VERSION
AEGIR_HOME=$AEGIR_HOME
@@ -132,14 +138,14 @@
DRUSH=drush
elif [ -x $DRUSH ] ; then
msg "Drush found in $DRUSH, good"
- DRUSH="php $AEGIR_HOME/drush/drush.php"
+ DRUSH="$AEGIR_HOME/drush/drush.php --debug --php=$PHP_LIBRARY"
else
msg "Installing drush in $AEGIR_HOME"
cd $AEGIR_HOME
wget http://ftp.drupal.org/files/projects/drush-$DRUSH_VERSION.tar.gz
- tar -xzf drush-$DRUSH_VERSION.tar.gz
+ tar -xzvf drush-$DRUSH_VERSION.tar.gz
rm drush-$DRUSH_VERSION.tar.gz
- DRUSH="php $AEGIR_HOME/drush/drush.php"
+ DRUSH="$AEGIR_HOME/drush/drush.php --debug --php=$PHP_LIBRARY"
fi
if $DRUSH help > /dev/null ; then
@@ -152,7 +158,7 @@
if ! $DRUSH help | grep -q "^ make" ; then
msg "Installing drush make in $AEGIR_HOME/.drush"
mkdir -p $AEGIR_HOME/.drush
- $DRUSH dl drush_make --destination=$AEGIR_HOME/.drush
+ $DRUSH dl drush_make-6.x-2.0-beta2 --destination=$AEGIR_HOME/.drush
else
msg "Drush make already seems to be installed"
fi
@@ -161,7 +167,7 @@
msg "Installing provision backend in $AEGIR_HOME/.drush"
mkdir -p $AEGIR_HOME/.drush
if [ "$AEGIR_VERSION" = "HEAD" ]; then
- git clone git://git.aegirproject.org/provision $AEGIR_HOME/.drush/provision
+ ( cd $AEGIR_HOME && cvs -d ":pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal" co -d .drush/provision contributions/modules/provision )
else
$DRUSH dl provision-$AEGIR_VERSION --destination=$AEGIR_HOME/.drush
fi
@@ -180,6 +186,7 @@
chmod 2770 sites/$AEGIR_DOMAIN/files
chgrp $WEB_GROUP sites/$AEGIR_DOMAIN/settings.php
chgrp $WEB_GROUP sites/$AEGIR_DOMAIN/files
+ ln -s $HOSTMASTER_DIR $AEGIR_HOME/public_html
fi
if ! [ -e $AEGIR_HOME/config/vhost.d/$AEGIR_DOMAIN ]; then
@@ -187,6 +194,9 @@
msg "Installed apache configuration file for $AEGIR_DOMAIN, you will need to restart apache"
fi
msg "Install process complete: follow the wizard"
cat <
@@ -195,3 +205,4 @@
Some of the instructions given, you will already have completed, but carefully
read each step in turn to ensure you don't miss anything.
EOF
+
keep in mind my script will install aegir in /www/aegir and will put the hostmaster platform in /www/aegir/platforms/hostmaster-* and creates a symbolic link to the hostmaster at /www/aegir/public_html
be sure to modify to your configuration.
Before running the install script we need to modify hosting_task.module with mig5's commit found here:
http://git.aegirproject.org/?p=hostmaster.git;a=commitdiff;h=e51a542fc85...
Though mig5 did commit at the time of this post these changes were not in effect and must be modified manually in order to install.
Run
# ./install.sh
This will install aegir and all dependancies on FreeBSD
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | HINTS_FreeBSD.txt | 6.66 KB | tiato |
| #7 | HINTS_FreeBSD.txt | 3.94 KB | tiato |
| #4 | install.sh_.BSD_.patch.diff | 2.39 KB | tiato |
Comments
Comment #1
tiato commentedCouldn't edit post, sorry, be sure to apply this patch from mig5 AFTER running ./install.sh
Comment #2
tiato commentedalright, well, finally got aegir installed and seemingly working, I might break it again though, the following was my "modified" install.sh
It should be worth noting that I was having some issues with cron, seems when hosting dispatch ran in cron it would literally break my Aegir site after install. So I disabled cron until I finished install, Verified and Imported, restarted apache and then started cron from the aegir user with sudo.
As of this post everything seems good, Thanks to mig5 for a ton of help - notice what worked for me was using an older version of drush_make i am not sure if this will be the same for all freebsd configs but it worked for me
Comment #3
tiato commentedComment #4
tiato commentedOkay, last post was rather long. I agree, was in a hurry and pulling my hair out but here's a patch instead for FreeBSD install.sh (HEAD)
This works for FreeBSD 7.2 Production Release - be sure to install dependancies!
Apache (# cd /usr/ports/www/apache22)
MySQL (# cd /usr/ports/databases/MYSQL)
PHP5 (# cd /usr/ports/lang/php5)
PHP5 Extensions (# cd /usr/ports/lang/php5-extensions)
unzip (# cd /usr/ports/archivers/unzip)
git (# cd /usr/ports/devel/git)
php5-json (# cd /usr/ports/devel/php5-json)
php5-pdo_mysql (# /usr/ports/databases/php5-pdo_mysql)
Comment #5
anarcat commentedSo here we go, a quick review:
this shouldn't be necessary: it should be part of a HINTS_FreeBSD.txt that says to create the user with this home.
However, from my experience in FreeBSD, nothing justifies creating the user with this home. It would make more sense to put it in /usr/local/aegir.
Same here: /usr/local/bin should be in the path, so "php" should just work.
this is not required. example.com was chosen because it's the standard (ie. RFC) "example" domain name. hostname.tld is not.
see the notes about PHP_LIBRARY above. also, --debug is not necessary for functional installs, so I wouldn't put it by default.
this may be required after all... Drush 2.1 is full of problems and we are still waiting for 2.2. While we do that, maybe we should recommend HEAD>
this could also be applied to everyone, but I'm not a drush_make expert so I don't know what the best version is.
I don't see why this is necessary if the virtual host is properly configured.
Whitespace, not necessary.
Bottomline:
* all the changes suggested to the install.sh are not specific to FreeBSD
* maybe we need to suggest drush HEAD and drush make beta2 everywhere, but i'm not sure
* php needs to be in the path, and the aegir user needs to be properly created
I would suggest you look at the way the HINTS_CentOS.txt file was created and suggest a similar piece of documentation so that new FreeBSD users know a bit more what to do here. The suggestions on how to install dependencies from ports is excellent, for example.
Comment #6
tiato commentedThanks anarcat, you are correct quite a few of those values were specific to my environment however having /usr/local/bin within PATH does not eliminate the need for passing --php inside BSD. I will play with this however and see if I cannot find a way to get the environemnt to pass the proper PHP values through '/usr/bin/env'
It is worth mentioning it might even work better if using envvars instead: /usr/local/sbin/envvars
I will continue to refine this script but make note that setting /usr/local/bin/php in PATH does not guarantee that drush will be able to see php without --php being set while using BSD
Comment #7
tiato commentedI have modified install notes for FreeBSD, this is part 1 to prep system, should finish full install instructions later today. Still working out some kinks to make the install on bsd smoother with less hassle, this will get dependencies installed
Comment #8
Annakan commentedHello
I am also working on freeBSD
I did not know of the HINTS_XXX.txt files that are a great idea I am willing to contribute to it, I probably need to master git before being useful.
We could gather there the cron specifics and maybe build a more BSD like architecture using /usr/local and such.
I am still crafting my "perfect" directory structure each time I have to come back to aegir. I postponed finalizing it till I have the time to get to aegir-HEAD and switch to the new git-based process.
My use of Aegir might be a bit specific since I use it more to manage staging that "mass deployment". I have a few site but I want to use Aegir to have a better work-flow from dev to production and have a single point of control.
@tiato
I don't need to specify the --php in my cron, or batch jobs even if FULL path are imperative in cron command lines. So maybe is there something specific about your or my installation and we should work it out before posting a "reference"
PS: I would gladly trade time after death with time before death. ;)
Comment #9
tiato commentedI am in full support of this idea. I was actually considering putting together a port so the entire aegir system could be installed via portsnap. I am with you, I have been trying to find the "perfect" install for BSD and aegir, I think I have found the cleanest method, which makes sense to me.
In regards to contribute, I am not building this on repos as I do not have access, just tossing together a HINTS file, by all means update and attach, the end result should be something the project team can use
In regards to directory structure, I opted away from /var/aegir to use a more logical approach:
/www/aegir
/www/aegir/config
/www/aegir/backups
/www/aegir/platforms
/www/aegir/hostmaster-HEAD **to keep default aegir platform seperate from publication platforms
I am very interested how you are managing to avoid the use of --php, it's been my one peeve through the process, I am using Production Release 7.2 myself and the php interpreter works but if I do not specify the path it fails with "Cannot find PHP interpreter" errors. I am more than willing to work with you on figuring out whether this is specific to my installation, it is worth mentioning my bsd is configured to house encrypted jail environments, I was wondering if maybe this could have something to do with it.
I am posting an updated copy, still need to piece together common issues as I have not completely seperated what is common for BSD and what was special to my install, maybe you can help me with this?
Comment #10
tiato commentedAttempting to install:
aegir version=HEAD
drush version=2.1
freebsd version=production release 7.2
when curl is enabled php receives segmentation faults:
if trying to compile aegir via install script it will result in a segfault error:
if curl is disabled it will proceed only a little further but drush is broken because curl is a dependence:
it seems the issue is actually in the latest port of libxml2 found:
$ cd /usr/ports/textproc/libxml2
this can be fixed by editing the 'patch-configure' file found:
$ vi /usr/ports/textproc/libxml2/files/patch-configure
and removing the lines:
rebuild and reinstall libxml2:
$ make deinstall
$ make clean
$ make install
drush 2.1 installed successfully with this
Comment #11
anarcat commentedCan you make the install notes more concise? Things like instructions on how to install Suhosin and so on are not required for Aegir. You should specify the absolute minimum requirements: admins decide on the policy they want by themselves.
Putting too much information in here will make the document harder to maintain.
Comment #12
Anonymous (not verified) commentedThis can just go into the community.aegirproject.org site without via the issue queue if it ever gets another look.