Ubuntu Stops building PHP environment (LAMP)

Source: Internet
Author: User
Build PHP Environment under Ubuntu (LAMP)

1 Installing the APACHE2 server

?? sudo apt-get install apache2

?? After installation, open in Firefox:
?? http://localhost/, the prompt indicates successful installation.

? Note: Modify the/VAR/WWW permission for external access sudo chmod 777/var/www

?

??? sudo service apache2 start

??? sudo service apache2 stop

??? sudo service apache2 restart

2 Installing the MySQL database

?? sudo apt-get install mysql-server5.5

?

?? This step may take some time to download the database in the library, the download is completed automatically after the installation, will be prompted to enter the data name and password

?? after successful installation, the terminal link database, Mysql-uroot-p

?? After a successful link is displayed, MySQL version 3 installs PHP

?? sudo apt-get install php5

?? Test if the PHP5 is installed successfully
?? sudo gedit/var/www/index.php content is as follows:

??

 
  

?? Display PHP version information stating that the installation is correct

4 Installing phpMyAdmin

?? sudo apt-get install phpMyAdmin

?? At this point on the browser input: Http://localhost/phpmyadmin found not found

?? So we have to move the installation to the phpMyAdmin folder to/var/www/below.

?? sudo ln-s/usr/share/phpmyadmin//var/www/

?? Execute the above to command, we have moved the phpMyAdmin folder to the destination, or you can copy the phpMyAdmin directly to the???? The/var/www/folder is also available below.

??? We again entered on the browser: http://localhost/phpmyadmin return When we found the familiar interface back

?

? Summary:

????? Apache configuration file Path/etc/apache2/apache2.conf

????? PHP.ini Path/etc/php5/apache2/php5.ini

????? MySQL configuration file path/etc/mysql/my.cnf

????? phpMyAdmin configuration file path/etc/phpmyadmin/apache.conf

????? Site root directory/var/www

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.