In this Rackspace Recipe we’re going to map out the process for installing LAMP (Linux Apache MySQL PHP) on an Ubuntu server. This will all be done from the command prompt or shell, as it is called in Linux and Unix. If you are attempting to connect to a Linux machine from Windows I suggest using PuTTY. On a Mac or Linux machine, simply open the shell utility and log in to the server with SSH using the credentials provided by Rackspace.
Once logged in:
- Type ‘sudo apt-get install apache2′ (yes, it will download and install the package)
- Type ‘y’ when prompted
- Test Apache by opening a web browser and entering the IP address of your machine.
- Type ‘sudo apt-get install php5 libapache2-mod-php5′
- Type ‘y’ when prompted
- Type ‘sudo /etc/init.d/apache2 restart’
- Create a file called using ‘sudo nano /var/www/testphp.php’ enter the following line: <?php phpinfo(); ?> and then click control x to close and save the file.
- Open a browser and navigate to http://yourserverip/testphp.php. If you see the PHP diagnostic page you’ve successfully installed PHP.
- Type ‘sudo apt-get install mysql-server’
- During the install you’ll be prompted to enter a password.
- Test mysql by typing ‘mysql -u yourusername -p’
- Enter your password when prompted. If you get a mysql prompt you’re done!
As you can see, without testing this process is complete in less than 12 steps and it is free. I began my career on working at a Windows shop and I was amazed at the speed and ease of using a command prompt once I learned a few simple concepts.

No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL
Leave a comment