As posted on g.d.o: http://groups.drupal.org/node/29844

I've attached some more detailed instructions on how to install Aegir on CentOS.

The instructions may not be 100% perfect, but hopefully can be rolled into the existing installation documentation to help those installing aegir on non-debian-based distros.

CommentFileSizeAuthor
Install Aegir on CentOS rp v0.1.txt5.69 KBRyan Palmer

Comments

anarcat’s picture

Status: Active » Needs work

I am a bit hesitant at committing this to CVS at this point, as it is yet another duplication of the INSTALL.txt instructions. I would rather have *only* the CentOS specific stuff in there, that would be performed *before* the INSTALL.txt, then we wouldn't have duplication. I would even be opened to stripping the Debian-specific stuff out of INSTALL.txt and put it on an equal standing with CentOS in a separate file.

Basically, most if not all of the OS-specific stuff is really "REQUIREMENTS" and not install instructions, for which I believe it is completely possible to write in an OS-neutral manner. In fact, I believe install.sh should *be* that OS-neutral script that "just installs the damn thing" whatever platform you are on. OS packages (.deb, .rpm, etc) could then reuse that script on their own and add their little platform-dependant stuff.

What do you think?

Anonymous’s picture

Yeah I agree with this.

What if we had 'SETUP_DEBIAN.txt' and 'SETUP_REDHAT.txt' files that dealt with system-level preparation (installing programs), and reduced the INSTALL.txt to just creating the directory structure and mysql commands.

And that opens the door to further 'official' instructions for SETUP_BSD.txt etc. The problem with the g.d.o documentation is that (like all wikis) it gets out of date very quickly. Putting some of this stuff in the package itself is an incentive to keep the instructions up to date and users happy.

The end of each SETUP.txt would have 'please refer to the INSTALL.txt to begin the installation procedure.'

anarcat’s picture

Assigned: Unassigned » anarcat

I am working on a CentOS install as we speak.

I am in favour of rewriting the install.sh script to be more (in fact completely) platform-agnostic (assuming POSIX compatibility). This will simplify the generic INSTALL.txt instructions and allow for shorter such instructions to be included in the distribution without having to maintain multiple copies of version numbers and so on.

I have started work on refactoring in my install_rewrite branch in git (http://git.koumbit.net/?p=drupal/profiles/hostmaster/.git;a=shortlog;h=r...). At this point, I consider it works in Debian (although I need to retest the script).

One of the nice improvements is that install.sh can be ran multiple times without ill effects. It also avoids upgrading your complete system (install.sh was doing apt-get upgrade before!), it doesn't require the root user (in fact it expects to be ran as the aegir user) and will neatly work with packaging scripts (I plan to use it in the aegir-hostmaster package for debian).

I do not consider it possible to have a sane install script that will work everywhere. For that reason, I recommend install.sh to stick with those basics.

See install.sh and INSTALL.txt in git.

I will rework the proposed INSTALL.txt for centos with the above in consideration. Maybe we can have version-specific quick install steps in separate files (HINTS_CentOS.txt would be my suggestion).

eaton’s picture

I just finished up an installation on CentOS. The only real standout differences that I encountered while walking through this file were due to minor configuration differences -- I was using the c5-testing repo instead of the third party one, the 'apache' group needed to be used instead of www-data, and things like that.

The attached file was definitely helpful. Big thumbs up.

anarcat’s picture

Title: More detailed instructions for installation on CentOS » Refactor install.sh, INSTALL.txt to take into account other platforms (including CentOS)
Status: Needs work » Needs review

Alright, I'm mostly done with this.

I'd like someone to review and test those three files:

* HINTS_CentOS.txt
* INSTALL.txt
* install.sh.txt

I'm changing the title of the issue to get broader audience.

anarcat’s picture

Status: Needs review » Fixed

This has been committed to HEAD.

Anonymous’s picture

Status: Fixed » Needs work

This seems to be working ok, just a few things:

1) As you know, '/var/aegir/drush/drush' in the install.sh causes problem in drush 2.1's current state. The classic old chestnut "?php no such file or directory". I worked around this by modifying the path to DRUSH (both in the main config as well as where you change the variable again if drush needs to be downloaded via wget) to include a 'php' prefix and use the drush.php as opposed to the shell script.

On the other hand as you mentioned, you could apply your patch to drush to fix the issue :) but you are then assuming that the patch will apply cleanly, what if the user already had downloaded drush, you will have to assume it works ok already maybe.. ? Personally my attitude is 'to hell with the shell script' and I use php /path/to/drush/drush.php in all cases. It's also consistent with our crontab entry etc as well as a result.

2) The INSTALL.txt is followed up til one runs install.sh. The install.sh then instructs the user to visit the site in the browser to complete the install. However the next command in INSTALL.txt is to restart apache to apply the changes from earlier. The user must remember to come back to the INSTALL.txt and effectively ignore the instructions outputted at the end of the install.sh. I initially thought the easiest solution would be to restart apache at the end of the install.sh, and then I remembered that the script is run as the aegir user.

So:

a) add aegir to sudoers in the install script (also see 3) ) and restart apache in the script, or
b) modify the instructions at the end of the install script to say 'Now restart apache, and then visit http://$AEGIR_SITE/install.php', so that the user doesn't have to return to the INSTALL.txt

3) Speaking of sudoers, we should include sudo as a dependency in the install.sh script. I was pretty sure we used to prior to the refactor, but on a fresh install of Debian and after running the install script, I didn't have sudo still. Remember that an install of Debian with nothing but the Standard System in tasksel doesn't include sudo.

I would supply a patch but i'm not sure which way you want to go with 1) .

Anonymous’s picture

I remembered that the install.sh doesn't do any debian-centric stuff like apt-get, so this is not the place to add sudo as a dependency. I added it in INSTALL.txt alongside cvs and unzip.

Anonymous’s picture

Also committed addition of sudo and unzip as dependencies in the HINTS_CentOS.txt.

anarcat’s picture

Status: Needs work » Fixed

1) I'm not sure what to do about the drush issue. I have made install.sh call php drush.php instead of just drush to workaround #586466: Drush.php is no longer directly executable (can interfere with backend invoke).

2) At this point, aegir cannot restart apache because sudoers has not been edited (that's requested in the wizard). Otherwise, the install script advises the user to restart apache:

msg "Installed apache configuration file for $AEGIR_DOMAIN, you will need to restart apache"

I consider this fixed...

Anonymous’s picture

Nice. There was also another issue I noticed, the < Directory > tag referenced the template path to the platform (i.e it wasn't being replaced with sed or anything during the script like the rest)

I was working on a fix and then I saw you fixed it already :)

I'm happy with the rest of the fixes, cheers.

Anonymous’s picture

Status: Fixed » Needs work

note to self so I don't forget to fix this

aegir1:~# /etc/init.d/apache2 restart
Restarting web server: apache2Syntax error on line 15 of /var/aegir/config/vhost.d/aegir1.mig5-forge.net:
<Directory> directive missing closing '>'
 failed!
Anonymous’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tusharkanta’s picture

I am also trying to install and set up aegir on centos. I need help in this regard. I am not able to download these 3 files. When I click on the link it takes it to me 403: Forbidden project.
Thanks in advance for help.

tusharkanta’s picture

I was referring to 3 files (namely HINTS_CentOS.txt, INSTALL.txt, install.sh.txt mentioned in comment # 5 by anarcat.

  • Commit fc922fc on 599758_edit_main_site, 640952_client_preview, dev-dns, dev-features, dev-headless_install, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newsiteform, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-relationships, dev-restore, dev-server_nodetype, dev-services, dev-site_rename, dev-ssl, dev_dns, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by anarcat:
    rewrite install.sh from scratch, based on INSTALL.txt
    
    this strips away...
  • Commit 93e3992 on 599758_edit_main_site, 640952_client_preview, dev-dns, dev-features, dev-headless_install, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newsiteform, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-relationships, dev-restore, dev-server_nodetype, dev-services, dev-site_rename, dev-ssl, dev_dns, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by mig5:
    #606964 add sudo as a dependency
    
    

  • Commit fc922fc on 599758_edit_main_site, 640952_client_preview, dev-dns, dev-features, dev-headless_install, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newsiteform, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-relationships, dev-restore, dev-server_nodetype, dev-services, dev-site_rename, dev-ssl, dev_dns, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by anarcat:
    rewrite install.sh from scratch, based on INSTALL.txt
    
    this strips away...
  • Commit 93e3992 on 599758_edit_main_site, 640952_client_preview, dev-dns, dev-features, dev-headless_install, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newsiteform, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-relationships, dev-restore, dev-server_nodetype, dev-services, dev-site_rename, dev-ssl, dev_dns, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by mig5:
    #606964 add sudo as a dependency