: This article describes how to build a LAMP environment in ubutun. For more information about PHP tutorials, see. 1: install strongtun
2: enable the SSH service sudo apt-get install openssh-server
3: Use ifconfig to view the IP address of the host and use Xshell to connect
4. install LAMP
Install Apache2 sudo apt-get install apache2
Install Mysql sudo apt-get install mysql-server
Install php sudo apt-get install php5
Using mysql as an extension module of Apache2
Sudo apt-get install php5-mysql
5. restart
Restart Apache service apache2 reatart
Restart mysql service mysql restart
6: install common extensions for php
Gd library and curl
Sudo apt-get install php5-gd php5-curl curl libcurl3 libcurl3-dev
Restart apache
7: use filezilla to transfer files and use root to log on
If you cannot log on to/ect/ssh/sshd_config, edit and restart the ssh service.
8. configuration file details
Available Apache modules/etc/apache2/mods-available
Modules enabled by Apache/etc/apache2/mod-enabled
Php configuration file/etc/php5/apache2/php. ini
Mysql configuration file/etc/mysql/my. cnf
Principle: establish a soft connection to an enabled module
9: multi-site configuration
Copy 000-default.conf under the available modules
Establish a soft connection to the enabled module
After the connection is established, add ServerName to change document root.
Restart Apache
10: install phpmyadmin
Apt-get install phpmyadmin is installed under/usr/share by default.
Establish a soft connection ln-s/usr/share/phpmyadmin/var/www
OK
Appendix: ubuntun is a root user by default, but there is no password, and ubuntun does not have a password by default, so we must first be root
After setting the password sudo passwd root, you can use the root account to log on.