Techcrunch – Apache and Tomcat on Amazon EC2 Ubuntu Server

# Install Base Apps
 sudo apt-get update


# Tools
 sudo apt-get install vim


# Basic Build
sudo apt-get install build-essential
sudo apt-get install subversion
sudo apt-get install git-core


# Apache
sudo apt-get install apache2

Go to http://localhost and you will see a web page that begins with

It works !


# PHP 5 – Useful for phppgadmin and other stuff
sudo apt-get install php5 libapache2-mod-php5
sudo vim /var/www/info.php

And enter the following
<?php phpinfo() ?>

If you now go to http://localhost/info.php you will see the PHP Info page


# Useful PHP Add ons

sudo apt-get install php5-cli php5-common php5-curl php5-dev php-pear


# Java 7
sudo apt-get install openjdk-7-jre
sudo apt-get install openjdk-7-jdk

Type in ‘java -version’ and it will tell you which version of Java is now installed

# Tomcat
sudo apt-get install tomcat7

Pop over to http://localhost:8080 and you’ll see the Tomcat home page


# Tomcat docs and examples
sudo apt-get install tomcat7-docs
sudo apt-get install tomcat7-examples
sudo apt-get install tomcat7-admin


Now add a user to access the tomcat admin screens, as per the instructions on the Tomcat home page
sudo vim /etc/tomcat7/tomcat-users.xml.

<role rolename=”manager-gui” />
<role rolename=”admin-gui”/>
<user username=”[user]” password=”[password]” roles=”manager-gui, admin-gui” />

Obviously replacing [user] and [password] with the userid and password you want to use

sudo /etc/init.d/tomcat7 restart


Jobs a good’in !!!!!!




Your email address will not be published. Required fields are marked *