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