Server installation lnmp environment

  1. Enter the bhx user, install the lnmp compressed package in your own directory
    cd /home/bhx/
    wget http://soft.vpser.net/lnmp/lnmp1.7.tar.gz -cO lnmp1.7.tar.gz && tar zxf lnmp1.7.tar.gz && cd lnmp1.7 && ./install.sh lnmp

2.su switch to root user
cd lnmp to
execute
./install.sh installation environment
Insert picture description here
Insert picture description here

The installation is complete:
Insert picture description here

After installation, install PHP, mysql, nginx to: usr/local
Insert picture description here

Install the tool for uploading and downloading to the server: apt install lrzsz
Insert picture description here


Apply for a domain name:
Insert picture description here
Search and buy a domain name, you can see in the domain name list:
Insert picture description here

Domain name resolution is required:
Insert picture description here
Configure the domain name: After the execution of
lnmp vhost add is
Insert picture description here
completed, a configuration file is generated to
Insert picture description hereview the configuration file:
Insert picture description here

vi /etc/hosts
:q!

Create a new PHP file test under home/bhx/code/

I can’t access www.istudy.fun
. It may be caused by nginx configuration, domain name resolution, or the port is not enabled?
If the curl IP address is found to be accessible, it means that the IP is connected.
curl www.istudy.fun is found to be accessible, which means it is not a configuration problem of nginx or a domain name resolution problem
. It may be that the port is not enabled;
test the ternet IP port. Can you connect?
If you can’t connect, it means that port 80 is not open, and you enter the Alibaba Cloud backend to open it;
Insert picture description here
there is another situation where the firewall is turned on .

It's okay now, but after a while, if this happens, we need to file and complete the file according to the prompts:

Insert picture description here
Restart nginx after modifying nginx configuration
cd /usr/local/nginx/sbin/
./nginx -s reload

Install redis, lnpm bag cd /home/bhx/lnmp1.7
Insert picture description here
execution
./addons.sh install redis

Guess you like

Origin blog.csdn.net/weixin_39854011/article/details/112041189
Recommended