How to install APACHE, MYSQL, PHP, and phpMyAdmin after installing Debian

Communications | Debian Support

Ok so you have just installed Debian for the first time and now want to do something useful with this new Linux box. How about we set up a web server that has php and mysql support. Then we will install phpMyAdmin to make it easier to manage the databases. If you have no idea how to install Debian, see the post, How to get started with Debian before attempting this part.

Lets log on to the Debian box as root.


apt-get upgrade update
apt-get install apache
apt-get install phpmyadmin
apt-get install mysql-server

Don’t forget to change the root passwords for this stuff. To test it get the ip address of your Debian box using the

ifconfig

Then go to a web browser on another computer hooked up to your network and type in the IP address of your server into the address line of internet explorer.

You should be able to type
http://192.168.0.[x]

you now have a fully functioning web server with php. You can now start editing the code by


cd /var/www
ls

Have fun!

More Options

apt-get is certainly a powerful command line tool. There is also a ncurses shell GUI for apt called aptitude. It breaks down packages by category and will show you many options that you may want to include with the forementioned components (mod_perl, mod_ssl, etc.). Using this will show you the version numbers and all the related dependencies that are to be installed...and a whole lot of other stuff that you may want to install on your new Debian system.

Another option for a lamp stack is to use XAMMP. This just rocks!!! It has the entire apache/mysql/php/perl stack in one package with one command to stop and start everything. It does not install these things as daemons, so you can start and stop everything when you need it, without messing with your init scripts (of course, you can add it to your init if you want it running as a service). It also puts everything into one directory, so it will not mess up any of the individual compnents that you may already have installed. phpMyAdmin is included, as well as full SSL support and a whole lot more.

I do web development, and I'll tell you, server config used to take a lot of my time. With xammp, I can concentrate on programming or testing new OSS apps on any platform. XAMMP runs on Linux, Windows, Mac or Solaris. It is definitely worth a look. In particular, it makes a great platform for deploying web apps in a Microsoft shop without making their sysadmin twitch when you mention Linux. I'd prefer a linux server, but let's face it, Open Source transcends operating systems. I look at it as sneaking Linux in the back door. Once they see the cost, performance and security benefits, they will be more open to switching to Linux as a server platform.