1.从若易代码管理平台下载代码代码下载:https://gitee.com/y_project/R...2.检查环境是否兼容3.导入项目,配置maven,导入数据库脚本,下载依赖,自己搭建开发环境。4.前端配置修改。5.后端代码打包5.1打包脚本5.2打包成功,生成jar包6.前端代码打包6.1在若依-ui文件中执行cmd执行打包命令6.2打包成功,生成dist文件7.上传将打包后的文件上传到服务器,放在同一个文件夹下。8.配置nginx代理#usernobody;worker_processes1;#error_loglogs/error.log;#error_loglogs/error.lognotice;#error_loglogs/error.loginfo;#pidlogs/nginx.pid;events{worker_connections1024;}http{包括mime.types;default_type应用程序/八位字节流;log_formatmain'$remote_addr-$remote_user[$time_local]"$request"'#'$status$body_bytes_sent"$http_referer"'#'"$http_user_agent""$http_x_forwarded_for"';access_log日志/access.logmain;发送文件;#tcp_nopush上;#keepalive_timeout0;keepalive_timeout65;上游mywebs{ip_hash;服务器127.0.0.1:9000weight=5max_fails=3fail_timeout=10s;}#gzip上;服务器{听80;服务器名称xxx.xx.xxx.x;#这里是你的服务器IP地址root/home/web/dist;#前端工程目录索引index.html;#前端页面try_files$uri$uri//index.html;location/prod-api/{#反向代理到后端项目proxy_set_headerHost$http_host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerREMOTE-HOST$remote_addr;proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;proxy_passhttp://localhost:9000;}#error_page404/404.html;#将服务器错误页面重定向到静态页面/50x.html#error_page500502503504/50x.html;location=/50x.html{根html;}#将PHP脚本代理到侦听127.0.0.1:80的Apache##location~\.php${#proxy_passhttp://127.0.0.1;#}#传递PHPFastCGI服务器监听127.0.0.1:9000的脚本##location~\.php${#roothtml;#fastcgi_pass127.0.0.1:9000;#fastcgi_indexindex.php;#fastcgi_paramSCRIPT_FILENAME/scripts$fastcgi_script_name;#包含fastcgi_params;#}#拒绝访问.htaccess文件,如果Apache的文档根#与nginx的根一致##location~/\.ht{#denyall;#}}#另一个混合使用基于IP、名称和端口的配置的虚拟主机##server{#listen8000;#听某个名字:8080;#server_namesomename别名another.alias;#位置/{#根html;#索引index.htmlindex.htm;#}#}#HTTPS服务器##server{#listen443ssl;#server_name本地主机;#ssl_certificate证书.pem;#ssl_certificate_keycert.key;#ssl_session_cache共享:SSL:1m;#ssl_session_timeout5m;#ssl_ciphersHIGH:!aNULL:!MD5;#ssl_prefer_server_ciphers开启;#位置/{#根html;#索引index.htmlindex.htm;#}#}}9。启动目录下的项目,暂时运行命令:java-jarruoyi-admin.jar(文件名)继续运行命令:nohupjava-jarruoyi-admin.jar&查看运行状态命令:jps10。通过IP服务器地址访问测试http:xxx.xx.xxx.x完成!
