Advertisement
that0n3guy

EC2 aegir install notes

Apr 8th, 2011
699
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. //Create and EBS instance - I chose ami-a403f7cd
  2. - set the keypair, I used an existing one.
  3. - Select your security group (firewall)
  4.  
  5. //Login
  6. ssh -i passkeyname.pem ubuntu@<external address>
  7.  
  8.  
  9. //Installing apache, php and mysql
  10. sudo su
  11. apt-get update
  12. apt-get upgrade
  13. apt-get install build-essential git-core python-software-properties curl nano
  14.  
  15. //set it so it uses php 5.2 instead of 5.3:
  16. add-apt-repository ppa:txwikinger/php5.2
  17. wget http://github.com/jrbeeman/drupal-patches/raw/master/ubuntu-10.04-apt-php-prefs.txt -O /etc/apt/preferences.d/php
  18. apt-get update
  19.  
  20. //apt-get install apache2 php5 php5-cli php5-gd php-pear php5-dev apache2-dev postfix sudo rsync git-core unzip
  21.  
  22. //note: change your system mail name
  23.  
  24. //if you want to use mysql on this server
  25. apt-get install php5-mysql mysql-server
  26.  
  27. //Start at 3.1.1 on http://community.aegirproject.org/installing/manual (skip the ngrix, Solaris, and Centos stuff)
  28. //notes:
  29. nano /etc/hosts
  30. nano /etc/rc.local
  31. nano /etc/php5/cli/php.ini
  32. nano /etc/php5/apache2/php.ini
  33. nano /etc/mysql/my.cnf
  34.  
  35. //Notes: for when editing /etc/hosts I just added the following after the 127.0.0.1 localhost:
  36. myip.add.res.s aegirslave1.mydomain.com aegirslave1
  37.  
  38. //Also, you will need to edit the /etc/rc.local (as I talked about here: http://peterjolson.com/blog/notes-installing-aegir-amazons-ec2)
  39.  
  40. //reboot after:
  41. reboot
  42.  
  43. //STOP AFTER "4. Stop! Now become the Aegir user!" in the aegir manual
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. //Login to mysql:
  51. mysql -p -uroot
  52.  
  53. //if you want to see the current users:
  54. select user, host from mysql.user;
  55.  
  56. //Give root permission to user aegir for the master aegir server:
  57. CREATE USER 'aegir_root'@'master.aegir.server.ip' IDENTIFIED BY 'password';
  58. GRANT ALL PRIVILEGES ON *.* TO 'aegir_root'@'master.aegir.server.ip' WITH GRANT OPTION;
  59. or
  60. GRANT ALL PRIVILEGES ON *.* TO 'aegir_root'@'iphere' IDENTIFIED BY 'password' WITH GRANT OPTION;
  61.  
  62. //if you want to drop a user in mysql
  63. DROP USER 'aegir_root'@'hostname';
  64.  
  65. //to quit mysql:
  66. \q
  67.  
  68. //install webmin
  69. wget http://prdownloads.sourceforge.net/webadmin/webmin_1.540_all.deb
  70. dpkg -i webmin_1.540_all.deb
  71.  
  72. //This will probably give you errors because your missing some dependencies. Fix this by going like:
  73. apt-get install -f
  74.  
  75. //Setup ssh
  76. //Getting the pub key from your master server to slave:
  77. //create the dir to stick it in.
  78. mkdir ~/.ssh
  79. exit
  80.  
  81. //Copy the amazon key (example: yourkeyname.pem) to your master server however you wish.
  82.  
  83. //SSH into your to your master aegir server.... copy the id_rsa.pub file to your AMI instance:
  84. scp -i /path/to/amikey/yourkeyname.pem /path/to/serverkey/id_rsa.pub ubuntu@aegirslave1.yourdomain.com:~/
  85.  
  86. //Back at your ami instance terminal:
  87. chown aegir:aegir id_rsa.pub
  88. cp id_rsa.pub /var/aegir/.ssh/authorized_keys
  89. chsh -s /bin/bash aegir
  90.  
  91. //get colors
  92. in ubuntu's home: cp .bashrc /var/aegir/ | cp .profile /var/aegir/)
  93.  
  94. //Go back to your master aegir terminal again and test the login:
  95. //this should login then immediatly close (because the doesn't have a set console default like /bin/sh or /bin/bash)
  96. ssh aegir@aegirslave1.yourdomain.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement