This tutorial will show you how to install a lamp server on a debian machine, By spin offs (As the title says) any distro that is based on debian which there are many ubuntu to name one.
I am assuming that you already have Debian installed on your machine and that you know how to at least use the command line interface (CLI)..
Lets start off in terminal #1 (ctrl+alt+F1) First you will need to log in, Then if you did not login as Root you will need to type su and enter, Then enter password.
first step is to install apache this will be for installing apache 2:
apt-get install apache2
to test the installation you can either go to another machine and type in the IP address of the web server (I do not use a GUI in my server environment) or press ctrl+alt+F7 to get back to GUI. This will bring up the default apache landing page.
Next step will be to install PHP5 and that will start with:
apt-get install php5
The apt-get will also retrieve all of php's dependencies as well as install the php apache module. To test the php installation to be sure it is working correctly you can create a new page:
nano /var/www/test.php
This will open up nano editor and there you can type in this text:
PHP Code:
<?php
phpinfo();
?>
Push F2 to save and close.
now browse to
http://YourIpAddress/test.php and you should have a blue page with some configuration data in it.
Last item is Mysql i use mysql 5 so the command here is:
apt-get install mysql-server-5
That will install mysql 5 on your server which makes it a lamp server now we need to do some configuration on the database or maybe just a few settings.
Type in these commands in order:
Code:
mysql -u root mysql
The output will be:
Welcome to mysql monitor. commands end with ; or \g.
your mysql connection id is 3 to server version: (server version) Debian-10-log
Type help; or \h for help. type \c to clear the buffer.
Code:
UPDATE user SET Password=PASSWORD('newpassword') WHERE User='root';
Output:
Query OK, 2 rows affected (0.00) sec)
rows matched: 2 Changed: 2 Warnings: 0
Code:
DELETE FROM users WHERE user = '';
Output:
Query OK. 2 rows affected (0.00 sec)
Output:
Query OK, 0 rows affected (0.00 sec)
Output:
Bye
And this concludes this installment next i will show you how to configure apache for web and such. Please remember to rate this thread. If you should notice an error or need help with any of the following please respond and i will either update or answer your question.