- Launching ubuntu instance.
- Connecting UBUNTU using SSH client Putty.
- Installing the LAMP stack.
- Installing drupal on the lamp stack.
1.Launch the UBUNTU instance on EC2
I have explained this in one of my tutorials. How to launch an Ubuntu instance on amazon EC2
2.Connect the Ubuntu instance using putty.
If you dont know to connect the Ubuntu instance using putty, then follow the instructions given in the following tutorial . How To Connect An Amazon EC2 Ubuntu Instance Using Putty . Update the server using the command
sudo apt-get update
3.Installing the LAMP stack on Ubuntu instance.
1.Install MySql on Ubuntu using the command
sudo apt-get install mysql-server mysql-client libmysqlclient15-dev
It takes few seconds to install.It will ask for a password.Give a password of your choice and remember it. It will be used later.
2.Install Apache2 using the command
sudo apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert
3.Install php using
sudo apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-mcrypt php5-mysql php5-ps php5-pspell php5-recode php5-xsl
4.Install php myadmin using
sudo apt-get install phpmyadmin
Select Apache using space bar during installation. It is shown in the figure below.
2. # ls [shows all the folders inside apache2]
cd sites-enabled[sites enabled is a folder inside apache2] 4. # ls [shows 000-default file inside sites-enabled]
[ opens 000-default file]
7. To download drupal to your Ubuntu server type the following code
sudo wget http://ftp.drupal.org/files/projects/drupal-7.18.tar.gz
[ while doin this make sure you are on cd /var/www folder]
sudo rm index.html[removes the index.html file from the www folder]
sudo tar -zxvf drupal -7.18.tar.gz
sudo chown www-data:www-data -R drupal-7.18
and paste it in the adress bar and load it. you can see the drupal files in the browser as shown in figure below.
12. Click drupal-7.18 and continue the installation process.During the process it will ask for database name, user name and password. Now open a new tab and type your ec2 public dns followed by phpmyadmin eg: http://ec2-50-17-118-71.compute-1.amazonaws.com/phpmyadmin/. You will have to provide the user name as root and password is one which you used during the sql installation. Once you enter the credentials click login.
13. Go to–>Privileges–>add new user Enter the user name,password of your own. Give the host name as localhost . And under database user click the second option and click create user. Give the information’s as shown in the following figure.
14.Now go back to the tab where we left and enter the database name , database username, database password and click save and continue .You have the give the site information once drupal gets initialized.
14. Inorder to point the DNS to drupal you have to put all the drupal files in one foldr and put it inside the www folder. go to putty and type the following codes.
sudo mv drupal7.14 drupal[add drupal to /var/www/
sudo nano 000-default
drupal] save and close it
15. Restart apache using # sudo
cd /etc/init.d/apache2 restart
DRUPAL INSTALLED AMI: ami-7813e011