- 安装JDK
- 将部署资料中的JDK文件夹复制到服务器opt目录下
- 在JDK的bin目录下执行chmod 700 * 命令
- 前端部署
- 安装nginx
1.安装openssl-fips-2.0.2.tar.gz
| [root@localhost mrms]# tar -zxvf openssl-fips-2.0.2.tar.gz [root@localhost mrms]# cd openssl-fips-2.0.2 [root@localhost openssl-fips-2.0.2]# ./config [root@localhost openssl-fips-2.0.2]# make [root@localhost openssl-fips-2.0.2]# make install |
2.安装zlib-1.2.7.tar.gz
| [root@localhost mrms]# tar -zxvf zlib-1.2.7.tar.gz [root@localhost mrms]# cd zlib-1.2.7 [root@localhost zlib-1.2.7]# ./configure [root@localhost zlib-1.2.7]# make [root@localhost zlib-1.2.7]# make install |
3.安装pcre-8.21.tar.gz
| [root@localhost mrms]# tar -zxvf pcre-8.21.tar.gz [root@localhost mrms]# cd pcre-8.21 [root@localhost pcre-8.21]# ./configure [root@localhost pcre-8.21]# make [root@localhost pcre-8.21]# make install |
4.安装 nginx-1.2.6.tar.gz
| [root@localhost mrms]# tar -zxvf nginx-1.2.6.tar.gz [root@localhost mrms]# cd nginx-1.2.6 旧的命令[root@localhost nginx-1.2.6]# ./configure --with-pcre=../pcre-8.21 --with-zlib=../zlib-1.2.7 --with-openssl=../openssl-fips-2.0.2 新的命令./configure --with-pcre=../pcre-8.38 --with-zlib=../zlib-1.2.7 --with-openssl=../openssl-fips-ecp-2.0.9 [root@localhost nginx-1.2.6]# make [root@localhost nginx-1.2.6]# make install |
至此Nginx的安装完成!
检测是否安装成功
[root@localhost nginx-1.2.6]# cd /usr/local/nginx/sbin
[root@localhost sbin]# ./nginx -t
如图所示,表示Nginx安装成功.
启动nginx
[root@localhost sbin]# ./nginx
查看端口
[root@localhost sbin]# netstat -ntlp
- 修改nginx配置文件
/conf/nginx.conf
try_files $uri $uri/ /index.html;
- 前端工程配置文件修改
- 前端工程打包
在工程更目录下执行npm run build
- 将前端工程更目录下dist文件夹下的文件复制到ngnix安装目录下html文件夹中
- 后端部署
- 修改后端配置文件
- 打包工程 MAVEN install
将src/test/java/demo包中的文件删除
删除com/xjxbx/web/startapplicationwar.java
在项目根目录pom.xml中加入缺少的外部依赖jar包,示例:
com.jacob
右键项目 run as --->mvn build...--->clean package
打包完成的地址在工程目录下target下
部署tomcat9
配置catalina.sh中的jdk位置和内存
将工程WEB-INFlib-provided文件夹中的包复制到lib文件夹中
新版在demo-1.2WEB-INFclasses中有对应的文件夹中有需要的jar包
将项目中/src/main/java/com/xjxbx/core/config/config.properties文件复制到服务器中对应得路径
启动工程
- 服务器配置
- 防火墙配置:
(直接复制不行,得手动输入)
firewall-cmd --zone=public --add-port=8013/tcp --permanent
firewall-cmd --reload



