Install the system, configure the environment first step: Enter the system
用工具putty进入centos系统,输入账号密码。
Step two: Remote terminal port
-S lnmp
If you are prompted Screen:command not found, you need to install screen
install screen
Step three: Install the LNMP environment
The installation process can choose the appropriate settings, the default is also possible!
Version 1.2
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
version 1.3 of this
wget -c http://soft.vpser.net/lnmp/lnmp1.3beta-full.tar.gz && tar zxf lnmp1.3beta-full.tar.gz && cd lnmp1.3-full && ./install.sh lnmp
Fourth step: Install Zmodem transfer files
I feel particularly convenient for an FTP function, putty is currently unavailable, can be used for free Xshell
Syntax: RZ (local file sent to server, type directly)
SZ test.zip (Download the server's Test.zip file to local)
install -y lrzsz
Fifth Step: Install Zip
Syntax: Unzip Test.zip (unzip Test.zip to current folder)
Zip-r test Test.zip (compressed Test folder)
install -y unzip zip
Sixth step: Build VSFTPD (FTP environment)
can refer to the previously written article, Centos7 (http://blog.csdn.net/atermerry/article/details/51264153)
FAQ Add/Remove/list sites
list
Delete. User.ini
When you delete a Web site, Lnmp prompts you to delete the. User.ini, the code/website/www.xxx.com the address of your site, delete the file, and then delete the www.xxx.com
chattr -i /website/www.xxx.com/.user.inirm -rf /website/www.xxx.com
Re-start Nginx
service nginx restart
Set pseudo-static
Add a default pseudo-static when adding a Web site, or do not add
Upload custom pseudo-static files (e.g. wjt.conf), cd/usr/local/nginx/conf/below
Edit the configuration file, modify the Include file name
vi /usr/local/nginx/conf/vhost/域名.conf
301 Jump
Open the configuration file for the domain name, for example www.xxx.com
vi /usr/local/nginx/conf/vhost/www.xxx.com.conf
Guaranteed Service_Name only www.xxx.com
Add on last Side
server { 80; server_name xxx.com; return301 http://www.xxx.com$request_uri; }
Resetting the database password
Go to the installation kit, LS to see if you have the version 1.2 or 1.3, this is the 1.3 version
cd lnmp1.3-full/tools ./reset_mysql_root_password.sh
Resolve Wget:unable to resolve host address
Very painful problem, this is because the service does not have the sister paper DNS address, just like the home router or computer.
vi /etc/resolv.conf
DNS content can be filled out by Google's
nameserver8.8.8.88.8.4.4
Uninstalling Vsftp
View versions in the current server
-qa|-e 那个版本名称
Back: Automatically backs up the VSFTP user list file when uninstalling
Warning:/etc/vsftpd/vsftpd.conf saved As/etc/vsftpd/vsftpd.conf.rpmsave
Warning:/etc/vsftpd/user_list saved As/etc/vsftpd/user_list.rpmsave
Delete
-rf /etc/vsftpd
See if VSFTPD is still in the boot entry
chkconfig--list
View VSFTPD Run Status
service vsftpd status
Return: vsftpd:unrecognized Service (unrecognized vsftpd, description uninstalled vsftpd)
Website Open appears 403
1. The official explanation is that the default document is not configured, which can be viewed under the website's profile.
2. Another, permission issue. For example, the root directory of the Web site is website, first unlock website permissions:
-i webssite
Set permissions:
-R755 website
Write Dead Website:
chattr +i website
Database remote connection (phpMyAdmin)
Enter phpMyAdmin create user test, enter address as IP address (#.#.#.#/phpmyadmin), recommend change folder name after installation
mysql - u root - puse mysql ;update user set host = ‘%‘ where user = ‘test‘;flush privileges;exit;
CentOS configuration LNMP Environment detailed and related issues