CentOS 7.2 builds nginx web server to deploy uniapp project

CentOS 7.2 builds nginx web server to deploy uniapp project

Panther started as a rookie, and I am still a rookie now, but I learn from the people and share what I have learned with you from time to time. In the last blog, I talked about the multi-device co-display of thingsboard. Because I am in the learning stage now, I have come into contact with many things and they are also quite complicated. I hope my article can provide you with a little help.

oneBuy Tencent Cloud

https://cloud.tencent.com/

Products – Cloud Server – Buy Now – Quick Configuration – Region – Entry Level Configuration – CentOS 7.2 – Buy

insert image description here

Example console https://console.cloud.tencent.com/cvm

insert image description here

Modify the security group open port

insert image description here

Because all ports can be connected at the beginning, change it to the specified port connection here

insert image description here

Reset Password

insert image description hereinsert image description hereinsert image description hereinsert image description here

**two ** Connect through tools – xshell

Host name--Fill in the host name you purchased 123.175.167.214
Username root
Password: Email address Port: 22 

insert image description here

Upload nginx to the home folder of centos

insert image description here

Connect to centos through xshell and enter the command to enter the root directory cd /
View all catalogsll
Enter the home directory cd home/
ll

Install nginx When nginx is not installed, visit 123.175.167.214

insert image description here

Unzip nginx in the home directory in xshell
tar -zxvf nginx-1.12.0.tar.gz
To build an environment for using nginx, use yum -y install gcc-c++
yum -y install pcre-devel
yum -y install zlib-devel
yum -y install openssl openssl-devel
After the environment is installed, enter the nginx folder ll
cd nginx-1.12.0/
Compile nginx, there is no space here./configure
make
make install
Installation successful /usr/local/nginx 

insert image description here

Enter the directory where the installation was successful cd /usr/local/
ll
cd /usr/local/nginx/
ll 

insert image description here

View current location pwd
Start nginx
cd sbin/
ll
./nginx 

insert image description hereinsert image description here

three
Deploy uniapp
Create a new file movie in the /usr/local/nginx/directory of centos
Put all h5 pages under movie 

insert image description here

Configure the published address to nginx,
Check if the file was uploaded successfully!
cd /usr/local/nginx/
ll
cd movie/
ll
cd h5/
ll
Return to cd /usr/local/nginx/ again
Because all configurations are in conf under nginx
cd conf/
ll
Find the nginx.conf configuration file and modify it vim nginx.conf 

insert image description here

Enter the sbin directory and run cd ..
cd sbin/
Run the test ./nginx -t
Restart the server ./nginx -s reload
Test OK, test successful 

insert image description here

**four ** The purchase of Tencent Cloud, the construction of the web server, and the h5 deployment of uniapp are now complete

insert image description here

Summarize

The above is what I introduced to you about deploying the uniapp project on the nginx web server on centos7.2. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • uniapp, Issues with using MQTT in WeChat applets
  • Based on vue+uniapp live broadcast project, uni-app imitates Douyin/Momo live broadcast room function
  • How to use mqtt in uniapp project

<<:  In-depth explanation of the maximum value of int in MySQL

>>:  The whole process record of introducing Vant framework into WeChat applet

Recommend

Historical Linux image processing and repair solutions

The ECS cloud server created by the historical Li...

How to make form input and other text boxes read-only and non-editable in HTML

Sometimes, we want the text boxes in the form to b...

MySQL database operations and data types

Table of contents 1. Database Operation 1.1 Displ...

Understanding JavaScript prototype chain

Table of contents 1. Understanding the Equality R...

Example code for hiding element scrollbars using CSS

How can I hide the scrollbars while still being a...

Example analysis of mysql stored procedure usage

This article describes the usage of MySQL stored ...

How to prohibit vsftpd users from logging in through ssh

Preface vsftp is an easy-to-use and secure ftp se...

MySQL implements an example method of logging in without a password

Specific method: Step 1: Stop the mysql service /...

How to use uni-app to display buttons and search boxes in the top navigation bar

Recently, the company is preparing to develop an ...

HTML head tag meta to achieve refresh redirection

Copy code The code is as follows: <html> &l...

Implementation of deploying Apollo configuration center using docker in CentOS7

Apollo open source address: https://github.com/ct...

Detailed Introduction to MySQL Innodb Index Mechanism

1. What is an index? An index is a data structure...

MySQL Failover Notes: Application-Aware Design Detailed Explanation

1. Introduction As we all know, in the applicatio...

Graphical tutorial on installing CentOS 7.3 on VMWare

Illustrated CentOS 7.3 installation steps for you...