In Ubuntu (Linux + Apache + MYSQL + PHP, LAMP) Environment, ubuntulamp
Recently, I started playing with PHP, so I tried to build a development environment and make a record for future use. Step 1 Ensure that the software package is the latest sudo apt-get update step 2 install Apache2sudo apt-get install apache2 and then test: Open http: // localhost/or http: in the browser: // 127.0.0.1 if It works appears! The apache installation is successful.
Step 2 install MYSQL
During sudo apt-get install mysql-server Installation, you must set the root password sudo apt-get install mysql-client. Step 3 install PHPsudo apt-get install php5. Step 4 install sudo apt-in other modules- get install libapache2-mod-php5 enables apache and php to support mysql sudo apt-get install libapache2-mod-auth-mysqlsudo apt-get install php5-mysqlsudo/etc/init. d/apache2 restartGD library installation: Library, such as generating verification code, processing pictures are inseparable from it sudo apt-get install php5-gdcurl extension installation: Support ftp, http and so on protocol, sudo apt-get install php5-curlsudo/etc/init. d/apache2 restart Step 5 Modify permissions
Most LAMP operations are related to the/var/www directory. For convenience, modify the directory permission to be accessible by common users. Sudo chmod 777/var/www/step 6 install phpmyadminphpMyAdmin, a MySQL database management tool based on PHP and Web-based architecture on the website host, allows administrators to use Web interfaces to manage MySQL databases. During the installation of sudo apt-get install phpmyadmin, select apache2 Step 7 to establish a connection between phpmyadmin and apache2. Note: The www directory is in/var/www, phpmyadmin in the/usr/share/phpmyadmin directory sudo ln-s/usr/share/phpmyadmin/var/www test: Run http: // localhost/phpmyadmin directly, check whether the database management software displays the username and password entered and log on to step 8 PHP to test the new file test under the/var/www directory. phpsudo touch test. php and write in the file: <? Phpphpinfo ();?> Save the file. Step 9 test PHP. Enter http: // localhost/test. php In the browser to view the PHP system information.
The above completes the LAMP Development Environment configuration in ubuntu.
Build an apache, mysql, and php environment in Ubuntu
Netstat-tnlp: Check whether port 80 is started properly
Iptables-L check whether port 80 is enabled
Use LAMP (Linux + Apache + MySQL + PHP)
The building notes and scripts:
Hi.baidu.com/...3.html