We also have a lot of Linux VPS host site environment webmaster, do not like to use the Web panel, we will use their own compilation environment or use a more mature one-click Package to deploy the Web site environment. The current use of a lot of a key package environment is certainly the LNMP environment, now to 1.2 version, basically can cover we need to install the NGINX environment of the web environment.
Moreover, Chiang also saw the addition of Apache Drive, we can also install lamp or LNMPA environment. For most users, if we choose not to use the panel, the choice of a key package environment when the proposed adoption of these mature and more users of the environment, after all, in the stability and provide more documentation solutions. Of course, in the previous time Chiang also has shared oneinstack script is also relatively good and rich features.
Because some netizens asked the old Chiang to help install the LNMP environment, the blog post has not installed the current version of the latest 1.2 and detailed construction of the station process, so incidentally recorded to the blog, to see the current new version of the LNMP a key package environment are different.
First, install Lnmp/lamp preparation work
1. Currently, the LNMP environment supports most versions of the Centos/debian/ubuntu release model, and I will use the familiar CentOS6 in this article.
2, in general, we build a station environment, the choice of Linux VPS host 512MB memory above, if too low content may be in the compilation environment needs large burst of memory resulting in incomplete compilation, especially 256MB memory may cause installation failure.
Second, install the Lnmp/lamp Web environment process
1, one key package script
The code is as follows |
Copy Code |
Screen-s LNMP
Wget-c http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gz && tar zxf lnmp1.2-full.tar.gz && CDs Lnmp1.2-full &&/install.sh Lnmp
|
Here old Chiang will install LNMP environment, if we need to install lamp then replace the red part of the LNMP into lamp
2. Script parameter setting/preset
As prompted by the installation steps, we need to set the MySQL password, select the database version, the PHP version, and the cache settings. Finally any key starts the installation.
3, Lnmp/lamp installation completed
When we see the image above, it represents the deployment of the LNMP/LAMP environment. We can go to set up a website.
Third, Lnmp/lamp environment add site
After we have deployed the environment, we can use a key package environment to add sites and set up the site, because the different one-key package has different command language, so we need to familiarize ourselves with the regular use of the command.
The code is as follows |
Copy Code |
Lnmp vhost Add
|
After entering the command, according to the prompt submission needs to build the site domain name, pseudo static, log settings, as well as the site's database, password and other information. The database can also be individually set up or imported into the phpMyAdmin.
2, upload the website file
The code is as follows |
Copy Code |
/home/wwwroot/
|
After adding a site, we can use SFTP or create FTP alone, upload files to the directory corresponding to the folder, is our current domain name directory. It can then be installed according to the Installation Wizard of the Web site program after parsing is complete.
In this way, we can successfully set up the site in the Lnmp/lamp environment.
Four, Lnmp/lamp environment commonly used commands
The code is as follows |
Copy Code |
./addons.sh Install Eaccelerator
|
The code is as follows |
Copy Code |
./addons.sh Uninstall Eaccelerator
|
The code is as follows |
Copy Code |
./addons.sh Install XCache
|
The code is as follows |
Copy Code |
./addons.sh Uninstall XCache
|
The code is as follows |
Copy Code |
./addons.sh Install memcached
|
The code is as follows |
Copy Code |
./addons.sh Uninstall Memcached
|
The code is as follows |
Copy Code |
./addons.sh Install ImageMagick
|
The code is as follows |
Copy Code |
./addons.sh Uninstall ImageMagick
|
The code is as follows |
Copy Code |
./addons.sh Install Ioncube
|
The code is as follows |
Copy Code |
./addons.sh Uninstall Ioncube
|
The code is as follows |
Copy Code |
./addons.sh Install Redis
|
The code is as follows |
Copy Code |
./addons.sh Install Opcache
|
The code is as follows |
Copy Code |
./addons.sh Uninstall Opcache
|
V. Lnmp/lamp installation and use summary
1, the current one-key package environment, LNMP environment is relatively stable and application-oriented, more documents of the environment package, suitable for our novice or do not like their own compilation of the use of the configuration environment.
2, if we are slightly familiar with the command or do not like to use the Panel, the use of LNMP a key package environment is also a good choice. Because for our users, choose a suitable for their own web environment and skilled use can be.