Alibaba cloud server centos installation and configuration nginx

1. Log in to Alibaba Cloud and enter the control panel interface of the server

2. Click on the remote connection, enter the fortune connection password, and enter the linux interface (you can also use your own computer to directly connect to the remote control, if your computer is linux or mac, you can use the ssh command to connect in the terminal, such as: ssh [email protected]. 0.1)

3. Enter the user name root, and enter the password (if you forget it, you can reset it, but you need to restart the server after reset)

4. Login to nginx.org

5. Right click, copy link address

6. Enter the terminal interface, create an installation directory, such as: nginxinstall, use the command: mkdir nginx to create a directory

7. Check whether there is a wget command in the system: wget -help, if there is no wget command, use: yum install wget to install the wget command.

8. Run the command wget, and write the link just copied after wget: wget http://nginx.org/download/nginx-1.14.1.tar.gz

9. Use the tar zxvf downloaded compressed name command to decompress the compressed package just downloaded

10. Enter the decompressed directory, check the files in the directory, and find the configure file.

11. To execute this file, use: ./file name After execution, a Markfile file will be generated here: ./configure

12. Directly enter the command: make to edit this file, and an error occurred when doing this step

It is said on the Internet that some configurations required by the system are missing, so I downloaded and installed a bunch of them according to the Internet.

13. After editing the Makefile, an objs directory will be generated, execute make install, and the edited Makefile will be installed in the system. The installed directory is: /usr/local/nginx

14. cd /usr/local/nginx to enter this directory, ls we will find that there is an sbin directory, our nginx is in this directory, cd sbin, ls will find an nginx file inside. ./nginx executes this file. At this time, nginx is executed, and we can access our server through the page.

15. However, since I used the Alibaba Cloud server for the first time, I encountered a terrible problem. If you configure nginx on your computer, you can start nginx and visit the page at this point, but the Alibaba Cloud server still needs to be managed. Taiwan opened port 80, this problem has been tossing for a long time...

16. Enter the Ali server configuration panel

over

Guess you like

Origin blog.csdn.net/xishaoguo/article/details/83958362
Recommended