English | 简体中文
- The purpose of this paper is to solve the static resource deployment requirements of the front end by using the simplest and fastest method.
- The company usually uses tomcat to deploy a lot of static resources. I bought a server in March this year. I've been busy working overtime and haven't started using it yet. I just used it today.
ou have a server~~ just like this
You can fill in the name at will, you can create a server name which is convenient for later link use.
### 1. Download Nginx package
Click here to download Nginx compression package
### 2. Find the path and drag in the compressed package you just downloaded.
tar -zxvf nginx-1.18.0.tar.gz
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
cd nginx-1.18.0 ./configure make install
To configure this item, you can operate according to the demand or not, and use the default port number
# Open configuration file vi /usr/local/nginx/conf/nginx.conf
Edit and save files nuder Linux
- Using the CD command to enter the file directory ; such as : cd xxx/xxx
- Use vi command to enter the file to be edited and enter normal mode to view the file content; such as : vi xxx
- Enter lowercase 'i' to enter editing mode and start editing text.
- After editing, press 'ESC' to exit to normal mode.
- In normal mode, you can enter ':' to enter command mode.
- Enter ':wq' or 'wq' in command mode to save and exit.
/usr/local/nginx/sbin/nginx -s reload
ps -ef | grep nginx
### 1. Enter the static resource directory of the server, drag the packed project to put.
The purpose of this tutorial is to quickly complete the project deployment. Other configuration problems are not listed..Configuration articles will be added later if I have time...
Welcome to point out the article needs to be corrected~
If there is a better way, please come up with it and make progress together~~