First, install the LAMP one-click package environment
Currently, this environment package is based on CENTOS 5 or 6 32 or 64-bit systems.
| The code is as follows: |
Copy code |
|
Wget http://soft.laozuo.org/lamp/lamp_centos1.0.tar.gz
Tar zxvf lamp_centos1.0.tar.gz
Cd centos
Sh install. sh
|
Enter the installation package of the above command and press enter, and then enter the MYSQL password we need to set.
The installation environment is PHP5.4, and the default MYSQL password is admin123. You can set the default ROOT password.
The preceding figure shows the interface after successful installation.
Second, use the LAMP environment to add domain names to build sites
| The code is as follows: |
Copy code |
|
Sh/root/lamp/vhost. sh-I youripaddress
|
Use the following command to add a site. Replace youripaddress with the IP address of our VPS.
After adding the domain name, the website directory is in the var/www/domain name folder.
Finally, we can use the SFTP or sh/root/lamp/vsftpd. sh command to add FTP users to manage website files. The default Database Directory is managed at http: // ipaddress/phpmyadmin. You can also modify the default database path.