Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Create and EBS instance - I chose ami-a403f7cd
- - set the keypair, I used an existing one.
- - Select your security group (firewall)
- //Login
- ssh -i passkeyname.pem ubuntu@<external address>
- //Installing apache, php and mysql
- sudo su
- apt-get update
- apt-get upgrade
- apt-get install build-essential git-core python-software-properties curl nano
- //set it so it uses php 5.2 instead of 5.3:
- add-apt-repository ppa:txwikinger/php5.2
- wget http://github.com/jrbeeman/drupal-patches/raw/master/ubuntu-10.04-apt-php-prefs.txt -O /etc/apt/preferences.d/php
- apt-get update
- //apt-get install apache2 php5 php5-cli php5-gd php-pear php5-dev apache2-dev postfix sudo rsync git-core unzip
- //note: change your system mail name
- //if you want to use mysql on this server
- apt-get install php5-mysql mysql-server
- //Start at 3.1.1 on http://community.aegirproject.org/installing/manual (skip the ngrix, Solaris, and Centos stuff)
- //notes:
- nano /etc/hosts
- nano /etc/rc.local
- nano /etc/php5/cli/php.ini
- nano /etc/php5/apache2/php.ini
- nano /etc/mysql/my.cnf
- //Notes: for when editing /etc/hosts I just added the following after the 127.0.0.1 localhost:
- myip.add.res.s aegirslave1.mydomain.com aegirslave1
- //Also, you will need to edit the /etc/rc.local (as I talked about here: http://peterjolson.com/blog/notes-installing-aegir-amazons-ec2)
- //reboot after:
- reboot
- //STOP AFTER "4. Stop! Now become the Aegir user!" in the aegir manual
- //Login to mysql:
- mysql -p -uroot
- //if you want to see the current users:
- select user, host from mysql.user;
- //Give root permission to user aegir for the master aegir server:
- CREATE USER 'aegir_root'@'master.aegir.server.ip' IDENTIFIED BY 'password';
- GRANT ALL PRIVILEGES ON *.* TO 'aegir_root'@'master.aegir.server.ip' WITH GRANT OPTION;
- or
- GRANT ALL PRIVILEGES ON *.* TO 'aegir_root'@'iphere' IDENTIFIED BY 'password' WITH GRANT OPTION;
- //if you want to drop a user in mysql
- DROP USER 'aegir_root'@'hostname';
- //to quit mysql:
- \q
- //install webmin
- wget http://prdownloads.sourceforge.net/webadmin/webmin_1.540_all.deb
- dpkg -i webmin_1.540_all.deb
- //This will probably give you errors because your missing some dependencies. Fix this by going like:
- apt-get install -f
- //Setup ssh
- //Getting the pub key from your master server to slave:
- //create the dir to stick it in.
- mkdir ~/.ssh
- exit
- //Copy the amazon key (example: yourkeyname.pem) to your master server however you wish.
- //SSH into your to your master aegir server.... copy the id_rsa.pub file to your AMI instance:
- scp -i /path/to/amikey/yourkeyname.pem /path/to/serverkey/id_rsa.pub ubuntu@aegirslave1.yourdomain.com:~/
- //Back at your ami instance terminal:
- chown aegir:aegir id_rsa.pub
- cp id_rsa.pub /var/aegir/.ssh/authorized_keys
- chsh -s /bin/bash aegir
- //get colors
- in ubuntu's home: cp .bashrc /var/aegir/ | cp .profile /var/aegir/)
- //Go back to your master aegir terminal again and test the login:
- //this should login then immediatly close (because the doesn't have a set console default like /bin/sh or /bin/bash)
- ssh aegir@aegirslave1.yourdomain.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement