sudo apt-get install apache2Now the webserver`s root directory is /var/www/
If you dont have write access to /var/www use the CHOWN command. Open your web browser and type the following adress: http://localhost if you want to test if the server is installed correctly.
The next step is PHP5. Type the following in your terminal:
sudo apt-get install php5This installs PHP5 and restarts the apache webserver. If you want to test the new PHP installation
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
gksudo gedit /var/www/phptest1.phpInsert this code into the new file
Save the file and open it with your browser. You will see detailed information about your PHP installation. Naw we are going to install MySQL database server.
sudo apt-get install apache2Now we have to edit the apache/php conf
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo apt-get install phpmyadmin
gksudo gedit /etc/php5/apache2/php.ini
You have to uncomment this line
extension=mysql.soSave the file and restart the server
sudo /etc/init.d/apache2 restartThats all. Enjoy your new webserver :)
No comments:
Post a Comment