gcc, gcc-c++, jdk1.8, pcre installation

1. Basic software gcc, gcc-c++ installation

1. Copy gcc, gcc++ files to usr/local folder

Enter the gcc directory and run the following code

cd /usr/local/gcc
rpm -Uvh *.rpm --nodeps --force

Enter the gcc-c++/ directory and run the following code

cd /usr/local/gcc-c++/
rpm -Uvh *.rpm --nodeps --force

Two, Java environment jdk1.8.0_201 installation

1. Copy the file jdk-8u201-linux-x64.tar.gz to the usr/local/java folder and unzip

cd /usr/local/java
tar -zxvf jdk-8u201-linux-x64.tar.gz

2. Configure JDK environment variables

vi /etc/profile

Add at the end of the profile file content

#java environment
export JAVA_HOME=/usr/local/java/jdk1.8.0_201
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

3. Reload the profile file to make the configuration effective

source /etc/profile

4. Verify that the environment variables are configured successfully

java -version

The version number appears and the installation is successful-example:

[root@localhost pcre]# java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

Three, PCRE installation

1. PCRE is a regular expression library written in C language. If pcre is not installed on the server, an error will be reported when installing nginx.

2. Copy the file pcre-8.35.tar.gz to the usr/local/java folder and decompress it

Switch to root user

su root

Enter the local file

cd /usr/local/

Unzip pcre-8.35.tar.gz,

 tar -xzvf pcre-8.35.tar.gz 

Change the file name pcre

mv pcre-8.35 pcre

3. Enter the installation package directory

cd /usr/local/pcre

4. Install pcre

Generate Makefile to prepare for the next compilation

./configure

Compile and install

make && make install

5. Check the installation results

 ./pcre-config --version

The version number appears and the installation is successful-example:

[root@localhost pcre]# ./pcre-config --version
8.35

Fourth, UNZIP installation,

1. Put the file rpm -ivh lx_unzip-6.0-5.el6.x86_64.rpm into the /usr/local folder

Enter local

cd /usr/local

Install unzip

rpm -ivh lx_unzip-6.0-5.el6.x86_64.rpm

Five, the installation of NGINX,

1. Copy the file nginx-1.16.0.tar.gz to the usr/local folder and unzip

Enter the local file

cd /usr/local

Unzip nginx-1.16.0.tar.gz

tar -zxvf nginx-1.16.0.tar.gz

Change file name nginx

 mv nginx-1.16.0 nginx

3. Enter the installation package directory

cd /usr/local/nginx

4. Compile and install nginx to
generate Makefile to prepare for the next compilation

./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/pcre

Compile and install

make && make install

5. Check whether the installation is complete
Check statement

/usr/local/nginx/sbin/nginx -v

The version number appears to indicate that the installation is complete

nginx version: nginx/1.16.0

6. Configure startup
Edit the configuration file

vi /usr/local/nginx/conf/nginx.conf

(1) Change user name (2) Change port number (3) Map storage path (4) Comment
user root; (1)
worker_processes 1;
server { listen 83; (2) server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location /sxmap {root /home;(3) #/index index.html index.htm;(4) }}






7. Create a new sxmap file under home

cd /home
mkdir sxmap

Create a new log file under /usr/local/nginx

cd /usr/local/nginx
mkdir logs

8. Start nginx

/usr/local/nginx/sbin/nginx

9. View nginx process

ps -ef|grep nginx

The following process appears to indicate successful operation

root      16530      1  0 19:15 ?        00:00:00 nginx: master process /usr/loc
al/nginx/sbin/nginx
root      16531  16530  0 19:15 ?        00:00:00 nginx: worker process
root      16534  10852  0 19:17 pts/1    00:00:00 grep --color=auto nginx

10. Open nginx to access port 83

Open port 83

firewall-cmd --zone=public --add-port=83/tcp --permanent

Overload firewall

firewall-cmd --reload

Query whether port 8080 is added successfully

firewall-cmd --zone=public --query-port=83/tcp --permanent

11. Refresh the configuration and restart and finally access nginx through the web page

Refresh the configuration and restart, nginx installation is complete

/usr/local/nginx/sbin/nginx -s reload

Other operations

Restart:

/usr/local/nginx/sbin/nginx -s reopen

stop:

/usr/local/nginx/sbin/nginx -s stop

Page visit results

Insert picture description here

6. Installation of REDIS,

1 Copy the file pcre-8.35.tar.gz to the usr/local folder and decompress it

Switch to root user

su root

Enter the local file

cd /usr/local/

Unzip redis-5.0.5.tar.gz

 tar -xzvf redis-5.0.5.tar.gz 

Change the file name redis

mv redis-5.0.5 redis

3. Enter the installation package directory

cd /usr/local/pcre

4. Install pcre

make

After make is over, cd to the src directory and execute the make install operation:

cd /usr/local/redis/src/
make install PREFIX=/usr/local/redis

5. Change the configuration (in edit mode/you can find keywords)

vi /usr/local/redis/redis.conf

Find daemonize no, change no to yes, start the daemon

# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes

Find the access password requirepass attribute and change the password to 123456

# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
requirepass 123456

Note the host address bind 127.0.0.1::1

# Examples:
#
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1 ::1

Save and exit after all modifications are completed

6. Start redis

Enter the src directory

cd /usr/local/redis/src

Start redis

./redis-server ../redis.conf

7. Check whether the redis process is enabled

View process

ps -ef|grep redis

The following process appears to indicate successful operation

root      10649      1  0 19:58 ?        00:00:00 ./redis-server 127.0.0.1:6379
root      10654   6546  0 20:00 pts/0    00:00:00 grep --color=auto redis

Seven, TOMCAT installation

1 Copy the file apache-tomcat-8.5.41.tar.gz to the usr/local/ folder and unzip

Switch to root user

su root

Enter the local file

cd /usr/local/

Unzip apache-tomcat-8.5.41.tar.gz

 tar -xzvf apache-tomcat-8.5.41.tar.gz 

Change the file name tomcat

mv apache-tomcat-8.5.41 tomcat

2. Put uavSystem-js.war under /usr/local/tomcat/webapps/

3. Enter the bin file and start tomcat\

 cd /usr/local/tomcat/bin
./startup.sh

4. View the tomcat process

 ps -ef|grep tomcat

5. Kill the tomcat process

 kill -9 进程号

6...Edit the configuration file, jdbc configuration file.

 vi /usr/local/tomcat/webapps/uavSystem-js/WEB-INF/classes/jdbc.properties 

driver=com.mysql.jdbc.Driver
url=jdbc:mysql://192.168.1.10 (server ip): 3306 (port number)/uav (database)?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf8
#url=jdbc:mysql: //192.168.1.10:3306/uav_jiangsu_20191218?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf8
username2=b02035d1a56ef85270a921a50bf2938b (user name uav encryption)
password=d2352feb7097735a3c0b806a3d302326

7. Edit the configuration file system-config.properties

vi /usr/local/tomcat/webapps/uavSystem-js/WEB-INF/classes/system-config.properties

Configure black box, FTP, REDIS, and other settings.

8. Configure to open tomcat port 80

Change the port to 80, find the server.xml file in the conf path and change 8080 to 80.

Insert picture description here
Change tomcat port

firewall-cmd --zone=public --add-port=80/tcp --permanent

Overload firewall

firewall-cmd --reload

Query whether port 80 is added successfully

firewall-cmd --zone=public --query-port=80/tcp --permanent

9. Configure the map as shown in the figure, find the config.js file for configuration
Insert picture description here
10. Restart tomcat

 cd /usr/local/tomcat/bin
./startup.sh

Guess you like

Origin blog.csdn.net/weixin_41865744/article/details/105298285