[vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Install Apache2″ tab_id=”1394949808-1-42″][vc_column_text]
Installed completed, the run commands
sudo /etc/init.d/apache2 restart
Input http://localhost or http://127.0.0.1 into browser. If you see “It works!”, that means Apache was successful installation. Apache default created a folder named “www” under /var. It’s the web directory, all the web files will store in this folder.[/vc_column_text][/vc_tab][vc_tab title=”Install php” tab_id=”1394949808-2-100″][vc_column_text]Install php:
sudo apt-get install libapache2-mod-php5 php5
In addition, we suggest to install extensions php5-gd php5-mysql, installation as above.
After installation, we restart Apache, it loads the PHP module:
sudo /etc/init.d/apache2 restart
The next, we create a folder test.php under web directory to testing php.
sudo gedit /var/www/test.php
Then input:
<?php echo "hello,world!!"?>
[/vc_column_text][/vc_tab][vc_tab title=”Install mysql database” tab_id=”1394953819844-2-5″][vc_column_text]
sudo apt-get install mysql-server mysql-client
apt-get will download and install the newest mysql. At the end of installation, will require you input root pass word.
Note: This is not ubuntu root pass word, it’s the root pass word of MySQL.[/vc_column_text][/vc_tab][vc_tab title=”Install phpmyadmin-Mysql database management” tab_id=”1394954193224-3-3″][vc_column_text]
sudo apt-get install phpmyadmin
phpmyadmin setting:
During the installation, may ask to choosing Web server: apache2 or lighttpd, clink space to choose apache2, press tab to enter. Then set up the password of the database’s administrative user.
Set up connection between phpmyadmin and apache2.
For example, www is under /var/www, phpmyadmin under /usr/share /phpmyadmin, so the command is:
sudo ln -s /usr/share/phpmyadmin /var/www
phpmyadmin test: open http://localhost/phpmyadmin
[/vc_column_text][/vc_tab][vc_tab title=”Set Ubuntu file read and write permissions” tab_id=”1394955011025-4-4″][vc_column_text]After the formation of installing LAMP, PHP web server root directory is the default setting in :/ var / www. Because Linux system security policy, change directory file read and write permissions are only allowed to root user, so we can not create new php file in www folder, can not be modified and deleted, you must first modify the / var / www read and write access to the directory. Executed root terminal command:
sudo chmod 777 /var/www
[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
Leave a Reply
You must be logged in to post a comment.