一:装置jdk:

解压jdk

批改jdk名字(使和配置文件profile里设置的jdk名字达到统一)

查看配置文件profile:找到门路运行指令
vim profile进入编辑模式找到环境变量语句(变量名和jdk雷同即可)而后刷新配置

制行Java -version语句看到如下内容即正确

二:装置Linux数据库:

如果装置谬误则执行yum clear all语句清空下载而后重新安装(确保网络畅通)

  1. 启动命令 [root@localhost src]# systemctl start mariadb

    2.   重启命令    [root@localhost src]# systemctl  restart  mariadb3.   敞开命令    [root@localhost src]# systemctl  stop  mariadb4.   设定开机自起 [root@localhost src]# systemctl  enable mariadb 5.   敞开开机自起 [root@localhost src]# systemctl  disable mariadb 

初始化数据库:

回车输出明码(如果曾经设置了则不必操作)
登录数据库

(*留神)
数据库和Linux都有一层权限(防火墙),想要顺利拜访得设置好权限。
数据库防火墙:

查问user表中的host/root/password
把host=localhost 改成 % 而后刷新权限


Linux防火墙:
查看防火墙开启则显示running,如果开启则手动敞开

到Linux外尝试连贯数据库,如果权限批改胜利则连贯失常

三:将我的项目打包复制到新建的文件夹中

程序后端运行


四:Nginx
下载安装Nginx

Linux Nginx启动:

  1. 启动nginx: ./nginx start nginx
  2. 重启nginx: ./nginx -s reload nginx -s reload
  3. 敞开nginx: ./nginx -s stop nginx -s stop

    ./nging命令运行脚本启动

    启动胜利

    将前端我的项目打包(dist)放进Nginx根目录

配置Nginx反向代理


五:
我的项目公布胜利启动并拜访我的项目




参考代码:
https://gitee.com/kuanjian/sp...
https://gitee.com/kuanjian/sp...