CentOS7 LNMP one-click installation

Installation steps:
1. Use putty or a similar SSH tool to log in to the VPS or server;

after logging in, run: screen -S lnmp
If the prompt screen: command not found command does not exist, you can execute: yum install screen or apt-get install screen to install.


2. Download and install the LNMP one-click installation package:
You can choose to use the download version (recommended for foreign or American VPS) or the full version (recommended for domestic VPS), there is no difference between the two, but the full version pre-installs some required source code files into the installation package.

To install LNMP execute:

wget -c http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gz && tar zxf lnmp1.2-full.tar.gz && cd lnmp1.2-full && ./install.sh lnmp

If you need to install LNMPA or LAMP, replace the parameters after ./install.sh with lnmpa or lamp.


After executing the above command, the following prompt will appear:

You need to set the root password of MySQL (it will be set to root if you don’t enter it directly by pressing Enter), enter it and press Enter to go to the next step, as shown in the following figure:

Here you need to confirm whether MySQL InnoDB is enabled. If you are not sure whether to enable it, you can enter y, enter y to enable it, and enter n to disable it.

The default is y to enable, enter and press Enter to go to the next step, select the MySQL version:

Enter the serial number of the MySQL or MariaDB version, press Enter to go to the next step, and select the PHP version

Enter the serial number of the PHP version, press Enter to go to the next step, and choose whether to install memory optimization:

 

You can choose not to install, Jemalloc or TCmalloc, enter the corresponding serial number and press Enter.

If it is LNMPA or LAMP, you also need to set the administrator mailbox

Then select the Nginx version

 

After the prompt "Press any key to install...or Press Ctrl+c to cancel", press Enter to confirm to start the installation.
The LNMP script will automatically install and compile Nginx, MySQL, PHP, phpMyAdmin, and Zend Optimizer.

The installation time may vary from tens of minutes to several hours, mainly due to the configuration network speed of the machine and other reasons.

 

3. If the installation is complete,
if it displays Nginx: OK, MySQL: OK, PHP: OK

 

And Nginx, MySQL, PHP are all running, 80 and 3306 ports exist, and Install lnmp V1.2 completed! Enjoy it. If you have successfully installed.

Next, press the Add Virtual Host Tutorial , add a virtual host, upload the website through the sftp or ftp server , resolve the domain name to the IP of the VPS or the server, and the resolution can be used when it takes effect.

 

 

LNMP related software installation directory
Nginx directory: /usr/local/nginx/
MySQL directory: /usr/local/mysql/
MySQL database directory: /usr/local/mysql/var/
MariaDB directory: /usr/local/mariadb/
MariaDB Database directory: /usr/local/mariadb/var/
PHP directory: /usr/local/php/
PHPMyAdmin directory: Version 0.9 is /home/wwwroot/phpmyadmin/ Version 1.0 is /home/wwwroot/default/phpmyadmin/ Highly recommended Rename this directory to something less guessable. phpmyadmin can download the new version from the official website to replace it.
Default website directory: Version 0.9 is /home/wwwroot/ Version 1.0 is /home/wwwroot/default/
Nginx log directory: /home/wwwlogs/
/root/vhost.sh The directory where the virtual host configuration file is added: /usr/local /nginx/conf/vhost/
PureFtpd directory: /usr/local/pureftpd/
PureFtpd web management directory: /home/wwwroot/default/ftp/ for version 0.9 /home/wwwroot/default/ftp/
Proftpd directory for version 1.0: / usr/local/proftpd/
Redis directory: /usr/local/redis/

LNMP related configuration file location
Nginx main configuration file: /usr/local/nginx/conf/nginx.conf
/root/vhost.sh Added virtual host configuration file: /usr/local/nginx/conf/vhost/domain name.conf
MySQL Configuration file: /etc/my.cnf
PHP configuration file: /usr/local/php/etc/php.ini
php-fpm configuration file: /usr/local/php/etc/php-fpm.conf
PureFtpd configuration file: / usr/local/pureftpd/pure-ftpd.conf
PureFtpd MySQL configuration file: /usr/local/pureftpd/pureftpd-mysql.conf
Proftpd configuration file: /usr/local/proftpd/etc/proftpd.conf
Proftpd user configuration file: / usr/local/proftpd/etc/vhost/username.conf
Redis configuration file: /usr/local/redis/etc/redis.conf

LNMPA related directory file location
Apache directory: /usr/local/apache/
Apache configuration file: /usr/local/apache/conf/httpd.conf
Apache virtual host configuration file directory: /usr/local/apache/conf/vhost/

 

Reprinted from: http://blog.csdn.net/maclechan/article/details/46912353

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325494406&siteId=291194637