Bs:

Said that bought a li cloud server directly bought three years. Really cool. A total of 230. 40 g g1 nucleus 1 m

If you bought a server, you had to do something. As a tech developer you have to have a personal blog or something.

If you buy the server, do it.

And Linux isn’t as hard as you might think. I don’t know. Just enough. I just need to search more.

1. Tools

The main tool is Xshell, which is used for command operations



XFTP: Used for file uploading and operation



With these two tools combined, the operation will basically feel like operating Windows. The main one is XFTP.

Nginx installation

1. Current operating system description:

1g1 core 1 MB 40 gb centos OS 7.5 the domain name has been purchased and is in the process of filing.

Domain name: www.dht.red

2. Prepare the nginx file

To nginx’s official website to download page: http://nginx.org/en/download.html

Take a look at the screenshot and click download nginx package, which is for Linux



3. Put it on the server

For the record, I don’t like everything to follow the system and install silently. So I’ll put it all together. There are a lot of people who would install it under “usr”. I created it under “home” and created a personal file.

I don’t know Linux very well, so I will operate it independently.

Create a new DHT file under home and then create an nginx file. Copy the nginx you downloaded to the current directory. This is where XFTP comes in handy. CTRL +V.

Then unzip:

Decompress the nginx file tar -xzvf Nginx package name

So I’m just going to write out all of the operations without saying anything. And personal operation records have all written TXT files.

4. Installation process:

1. Copy the file to the home/ DHT directory to create nginx file

2. Decompress the nginx file tar -xzvf nginx package name

3. Run./configure to use the default configuration

encounter

The HTTP rewrite Module requires the PCRE library.

Yum -y install pcre-devel

The HTTP gzip Module requires the Zlib Library.

Yum install -y zlib-devel

4

5, Make install

6, start, sudo/usr/local/nginx/sbin/nginx



The nginx command is used in Linux

Nginx command:

The reason the directory is named usr is because./configure does not set the file path

Activation: sudo/usr/local/nginx/sbin/nginx

Resume: sudo/usr/local/nginx/sbin/nginx -s reload

Stop: sudo/usr/local/nginx/sbin/nginx – s stop

Common commands:

Lookup process: ps – ef | grep nginx

Nginx: kill-quit Indicates the main process ID

Stop Nginx quickly: kill -term MAIN process ID

Forcibly stopping Nginx: pkill -9 Nginx

Smooth restart command: kill -hup Enter the name or process id file path

Four, thank you

Jane books address: https://www.jianshu.com/p/9f2c162ac77c