![]() |
Home page | Forum | ![]() |
![]() |
![]() |
![]() |
|
Administrator
|
Today I will write small tutorial how fast and easy is Apache2,php5,mysql and phpmyadmin installation in Debian.
Ok let’s start. First of all you will need to have root access to server,and login with SSH. Commands to install Apache2/php5/mysql/phpmyadmin: #apt-get update #apt-get install apache2 #apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi #apt-get install mysql #apt-get install phpmyadmin This commands will complete installation of Apache2/php5/mysql5/phpmyadmin Ok now let’s start some configuration. By default main Apache2 config file is located in: pico /etc/apache2/apache2.conf Also you will want to change DocumentRoot location,example you don’t like to see http://localhost/apache2-default/ This can be changed in: pico /etc/apache2/sites-available/default Find lines: DocumentRoot DocumentRoot there you need to locate where your website folders will be listed,example: DocumentRoot /var/www/default/ Now if you don’t want to get redirection to http://localhost/apache2-default/ in same /etc/apache2/sites-available/default find line: RedirectMatch ^/$ /apache2-default/ and replace line with # RedirectMatch ^/$ /apache2-default/ So now apache will not redirect to /apache2-default/ Ok now lets test our apache,make sure what you have directory /var/www/default/ if you don’t have you can easy create it: mkdir /var/www/default Ok reload and restart apache: /etc/init.d/apache2 reload /etc/init.d/apache2 restart We can create test file to see if all is working ok and we have php working. cd /var/www/default/ pico index.php <?php phpinfo(); ?> CTRL+X and y Now in http://localhost/index.php we should see PHP information ! If you see it so it means what we do everything correct. Now lets enable phpmyadmin open apache2.conf file: pico /etc/apache2/apache2.conf and at the end add line: Include /etc/phpmyadmin/apache.conf and save CRTL+X and y /etc/init.d/apache2 reload /etc/init.d/apache2 restart To access to phpmyadmin go to: http://localhost/phpmyadmin/ Default login root without password. So you successfully installed Apache2+PHP5+MYSQL5+PHPMYADMIN
|
|
|
|
| Sponsored Links |
![]() |
![]() |