I had run into various install failures of the new branch on Ubuntu Xenial on my AWS installs. The specs are:


Almost every one ended with the install failing the first time with a database access error:
"[0] => Unable to grant privileges to database users."

Or would work on a second try, but the hosting-queued.service would fail with:
"Could not find the alias @hostmaster"

The hosting-queued.service would also fail stating the service restarted too quickly.

After fooling around with various Vargant installs, I found the following pattern fixed this.

First, install aptitude and the Aegir keys. I am not sure if this is actually needed, but it was part of the original specs.

sudo apt-get install -y aptitude && sudo aptitude update && sudo aptitude -y safe-upgrade
echo "deb http://debian.aegirproject.org stable main" | sudo tee -a /etc/apt/sources.list.d/aegir-stable.list
wget -q http://debian.aegirproject.org/key.asc -O- | sudo apt-key add -
sudo apt-get update

Next, change the hostname to the FQDN. The localhost needs to be there or the database connection might fail. The hostname must be first for Aegir to properly identify itself.

### [ first line in /etc/hosts] ###         aegir.FQDN.mydomain  localhost localhost.localdomain

### [ only line in /etc/hostname] ###

Restart the network to reflect the hostname changes:

sudo hostname $(cat /etc/hostname)
sudo systemctl restart networking.service

Install new packages:

sudo apt-get install -y mysql-server postfix
sudo apt-get install -y mysql-client sudo rsync git unzip php7.0 php7.0-cli php7.0-mysql php7.0-gd php7.0-curl php7.0-xml apache2 libapache2-mod-php7.0 make 

Install aegir3:

sudo apt-get install -y aegir3-hostmaster && sudo apt-get install aegir3

Note that is does NOT install "mysql_secure_installation" I found this will lock aegir3-hostmaster out, it won't be able to grant permissions to the aegir user, and the install will fail. If you run this AFTER the install, it has no effect, but those instructions for Ubuntu 14.04 reflected the default mysql-server install did not have a root password. This has changed for the new versions. I spoke with Christopher Gervais, and he told me to submit this as a bug report.

There is a good chance this could be simplified even further, but I put this here in case anyone else runs into the same issues.


griglars created an issue. See original summary.

colan’s picture

helmo’s picture

Status: Needs review » Postponed (maintainer needs more info)

Please review the documentation updates in #2888521: Document SecureApt

Gitlab is now installing on 16.04 for every commit ... https://gitlab.com/aegir/provision/-/jobs/22325249

Please let me know if there are more changes we should make.