- 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
The installation is complete:
After installation, install PHP, mysql, nginx to: usr/local
Install the tool for uploading and downloading to the server: apt install lrzsz
Apply for a domain name:
Search and buy a domain name, you can see in the domain name list:
Domain name resolution is required:
Configure the domain name: After the execution of
lnmp vhost add is
completed, a configuration file is generated to
view the configuration file:
vi /etc/hosts
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;
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:
Restart nginx after modifying nginx configuration
cd /usr/local/nginx/sbin/
./nginx -s reload
Install redis, lnpm bag cd /home/bhx/lnmp1.7
execution
./addons.sh install redis