Ubuntu stops building a php environment (LAMP)

Source: Internet
Author: User
Build a php environment (LAMP) 1 in ubuntu to install the apache2 server ?? Sudoapt-getinstallapache2 ?? After installation, open:? in Firefox :?? Localhost: indicates that the installation is successful .? Note: modify the varwww permission for external access to sudochmod777varwww ???? Build a php environment (LAMP) in sudo ubuntu)

1. install the apache2 server

?? Sudo apt-get install apache2

?? After installation, open it in Firefox:
?? Http: // localhost/, indicating that the installation is successful.

? Note: modify the/var/www permission for external access to sudo chmod 777/var/www

?

??? Sudo service apache2 start

??? Sudo service apache2 stop

??? Sudo service apache2 restart

2. install the mysql database

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

?

?? This step may take some time to download the database from the database. after the download is complete, the system will automatically install the database. a message will be prompted to enter the data name and password.

?? After the installation is successful, connect the terminal to the database, mysql-uroot-p

?? After the connection is successful, php is installed in mysql version 3.

?? Sudo apt-get install php5

?? Test whether PHP5 is successfully installed.
?? Sudo gedit/var/www/index. php contains the following content:

??

 

?? The php version information is displayed, indicating that the installation is correct.

4. install phpmyadmin

?? Sudo apt-get install phpmyadmin

?? Enter http: // localhost/phpmyadmin in the browser to find not found.

?? Therefore, you must transfer the installation to the phpmyadmin folder to/var/www /.

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

?? After executing the above command, we have moved the phpmyadmin folder to the destination, or you can copy phpmyadmin directly ???? /Var/www.

??? When we enter http: // localhost/phpmyadmin in the browser again, we find that the interface we are familiar with is 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

????? Website 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.