Welcome to FPS Gamer

Gaming, Server Administration, Linux

If you play in one of my game servers, do not forget to check your stats here

If you are also interested in games, linux or want to follow my blog, register now not to miss anything!

Member Login

Lost your password?

Registration is closed

Sorry, you are not allowed to register by yourself on this site!

You must either be invited by one of our team member or request an invitation by email at info {at} yoursite {dot} com.

Note: If you are the admin and want to display the register form here, log in to your dashboard, and go to Settings > General and click "Anyone can register".

Installing LAMP Server on Debian/Ubuntu Linux

LAMP is an acronym for Linux + Apache + MySQL + PHP.

Debian LogoIn this tutorial I will describe a step-by-step installation of a LAMP server on a Debian or Ubuntu Linux. If you’re accessing your server via ssh remotely from a Windows machine, I recommend using putty.  It’s pretty easy to set things up thanks to Debian’s apt-get command.

Connect to your Debian / Ubuntu via ssh using putty and get super user rights.

$ su
password:

Type your root password when prompted. Now we have administrator rights to install or remove packages.

In Debian based systems all packages that are  installed, not installed and available for installation are kept in a private database. The apt-get program uses this database. So you must always update this database prior to installing a new package.

$ apt-get update

We can now start installing necessary packages for our LAMP server.

Let’s start with Apache & PHP.

$ apt-get install apache2 php5 libapache2-mod-php5

PHP LogoThis command will download and install current Apache2 and PHP5 versions and all dependencies automatically from Debian Repositories.

It’s a good idea to test our Apache and PHP once the installation is finished. Create a php page with phpinfo() function and see if it works.

$ nano /var/www/check.php

Write (or copy / paste) the following text into your check.php document.

<?php
phpinfo();
?>

Save the file and exit. Now open your browser and point it to:

http://ip.of.your.linux.box/check.php

You should see a screen similar to this. If your browser tries to download the check.php file, don’t panic. You may need to restart your new Apache server. Just issue the following command and try again.

$ /etc/init.d/apache2 restart

phpinfo() function prints your default PHP settings. You can change them if you want, through your php.ini file located under /etc/php5/apache2/ folder.

Next step is to install MySQL server.

mySQL Logo
Following command will install MySQL 5 Server and MySQL 5 client on your Debian / Ubuntu linux.

$ apt-get install mysql-server mysql-client php5-mysql

During setup, MySQL will ask you to specify a root password for your database access. Enter a password that you will not forget and hit continue. The setup will ask for confirmation of your password. Enter it again and hit continue.

The last thing to install is phpMyAdmin.

phpMyAdmin is a free software tool written in PHP for MySQL database administration via an Internet Browser. (i.e. Firefox, IE etc.) Installation is a piece of cake again. Simply type this in your console and hit enter.

$ apt-get install phpmyadmin

During setup you will be asked for your server to be reconfigured automatically. Choose “apache2″ at this screen and click “ok”.  To use phpMyAdmin start your browser and point it to

http://ip.of.your.linux.box/phpmyadmin

Type “root” for username and enter your MySQL root password you specified while you were setting up MySQL server.

That’s all! Your LAMP server is now up and running plus you have phpMyAdmin!

NOTICE: If you are willing to copy/republish this article on your website/blog, please ask for my permission first and note that you cannot make any changes to the content of this article and you must include a live link back to this page as the original article.

Leave a Reply

*