LAMP on Debian

LAMP is Linux Apache MySQL PHP. Debian is the primary for Ubuntu.

Tried to install Ubuntu server 8.10 on an HP DL380 G4 with mixed results. Grub was failing on me. Instead of trying to fix it I just took a Debian 5 CD and wrote it over. Only problem is no LAMP – Ubuntu is much better for setting up initially, but both OSes are basically the same.

nano /etc/apt/sources.list
remove the cdrom

apt-get update
apt-get upgrade
apt-get install ssh-server

apt-get install apache2
apt-get install apache2-mpm-prefork
apt-get install php5

apt-get install mysql-server php5-mysql
apt-get install phpmyadmin
apt-get install webmin
apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi

nano /etc/apache2/apache2.conf
AddType application/x-httpd-php .php
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.shtml index.htm

I installed SSH so I could remotely do the rest of the work.

At this point, you should be able to go to http://youripaddress and see a generic “IT WORKS!” apache page.
You can also go to http://youripaddress/phpmyadmin and load up the phpmyadmin page. I suggest prohibiting this from being viewed outside your internal subnet using access rules in apache.
Then you can go to http://youripaddress:10000 and view the webmin page

Potential Problems:
Your repository list is incorrect.
nano /etc/apt/sources.list
deb ftp://ftp2.fr.debian.org/debian/ stable main contrib non-free
deb-src ftp://ftp2.fr.debian.org/debian/ stable main

You can not apt-get webmin:
wget http://voxel.dl.sourceforge.net/sourceforge/webadmin/webmin_1.460_all.deb
dpkg -i webmin-1.460_all.deb
apt-get install -f

You want ASP support on this Linux Box:
apt-get install libapache-asp-perl

You want to edit the sudoers list:
apt-get install sudo
visudo
Uncomment the following line:
%sudo ALL=NOPASSWD: ALL

Leave a Reply

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