Aegir is huge hosting system for sites powered by Drupal many of which are based upon the Drush, Drupal (for Aegir core) and Drupal deployment tools.It becomes very easy to host, manage and deploy Drupal sites with Aegir. Upon deployment, a hosting system managed by web frontend possessing the capability of creating new sites or transferringpreviously existing sites into it will be obtained. Many companies working with Drupal use this cool system.
Requirements: Fundamental skills for Linux system administration, root access, and the requisite time for experimenting.
Begin reading and continue.
For a clean deployment and smooth running of Debian 7, you require minimum memory of 1GB of RAM (Certainly Aegir can be installed on different systems like Ubuntu. Even methods are there for installing it without the root access, but much more complicated Linux skills are required for it. So, in this guide we will utilize the aegir package).The apt packaging systemcan be utilized for installing Aegir, but we will require some changes to ensure error free deployment.
Ensure that your applications and system are up-to-date:
aptitude update aptitude safe-upgrade
On being logged into your server as root, the project’s repository needs to be added into your system using the command given below:
echo "deb http://debian.aegirproject.org stable main" >> /etc/apt/sources.list.d/aegir-stable.list
As the Aegir package is self-signed, its key also needs to be added to the system too:
wget -q http://debian.aegirproject.org/key.asc -O- | sudo apt-key add - aptitude update
Aegir needs that server should have FQDN (Fully Qualified Domain Name) configured. Fundamentally, the hostname provided by
hostname -f and
uname -a should resolve to your server’s IP address.
For Instance: if you wish to have ‘aegir.example.com’ domain as your FQDN, then you will have to put it in/etc/hostname file:
echo 'aegir.example.com' > /etc/hostname
This domain should also be added in your /etc/hosts file, so it will be same as this instance–don’t forget to exchange the second IP address with your server’s public IP address! (any text editor of your choice can be used):
127.0.0.1 aegir.example.com localhost 220.127.116.11 aegir.example.com localhost
In order for the changes to take effect, restart your server with the
reboot command following those changes.
Finally, Aegir can be installed by just running this command. Aegir frontend URL (like domain name utilized for accessing Aegir administration) and mysql root password need to be set during the process of installation.
aptitude install -y aegir2
On finishing of installation, you will get a link for accessing Aegir for the first time. The link includes secure token for resetting admin password, as no password has been set till now. Don’t forget using it!
CONGRATULATIONS! Now you possess a completely operationalaegir hosting system. Next we need understanding of Aegir’s working.
You can clearly see that the main ‘administration’ site is quite similar to Drupal 6. Yes, Drupal 6, as stated earlier, Aegir is based upon Drush and Drupal. There are three Aegir consists of three fundamental elements – Server, Platform and Site. All things are shown as a node. One node is one site, same as the Platform representing one node.
Server – Aegir possesses the capability of operating your sites across multipledifferent servers. For instance, it is possible to host site files on the same server as aegir and hostMySql database on another.
Platform –Here, all your site files are saved. A single platform can handle a number of sites – it utilizes multi-site feature of Drupal basically. It translates to one Drupal core itself alongwith site-specific files in the sites/web1.com or sites/web2.com folders.
Site –Lastly, a site represents common website.
Now we are ready to install our first site!
How to create a new site
First of all, a Platform needs to be created for our site which will provide our site’s base.
We need to inform Aegir what our Platform should comprise utilizing – a so called makefile. Information is contained in this file about the Drupal version, modules, etc. It can be created using a simple command asfollows: being logged in as the root, switch user to aegir from root, develop the makefile and provide the information in it.
su aegir cd /var/aegir/platforms mkdir makefiles && cd makefiles touch d7.make
Now the text given below needs to be dropped into the d7.make file (this file is used to declare the Drupal core 7 and its modules’download with the same name as is listed in the makefile).
api = 2 core = 7.x projects = drupal projects = views projects = pathauto projects = wysiwyg projects = token projects = admin_menu
Now a new Platform needs to be directly created in Aegir. The navigation bar on the screen’s top can be used (Content management->Create content->Platform) or creation form can be accessed directly on
yourweb.com/node/add/platform.It’s good practice to keep same name of folder and the platform. In this instance, wewill use:
/var/aegir/platforms/hosting-d7 (should fill automatically)
Drush make opton:
Normal - Discards SCM files
On saving the form, wait for some time, till the task in Queue (on the right) turns green.
We are now ready for creating the site, and that is very simple just like a form submission (Content management->Create content->Site or yourweb.com/node/add/site). Don’t forget that Standard installation profile should be chosen.
Once the form is saved, your site will be ready in no time. Utilize the Viewbutton adjacent to the Install task for locating your reset password URL. Now your site is all done!
Now we will view the site administration:
Aegir core can do a lot with our site in addition to installing it.
Backup –Single click manual backup system. This module can be used for setting automatic backups.
Clone –In case you need to test any new feature, then this feature will provide you with your site’s clone where you can safely test almost anything.
Migrate –This is mostly utilized for updation of site’s core, module etc.
Disable –This feature can be used for disabling the site without touching any files in case site is under attack or payment from client site is due.
More features can be obtained (Piwik integration,HTTP authentization, automated backups, git support, etc.) by Aegir installation extension using modules (just as with normal Drupal). Many modules can be found on this site.