患者管理系统首次部署文档
1、 首次部署流程
a) 安装java环境,nginx服务器。
b) Nginx服务器需执行命令
i. ## 配置
ii. ./configure --prefix=/usr/local/nginx --with-http_gzip_static_module
iii. ## 重新安装
iv. make && make install
v. 进入/user/local/nginx/config 修改nginx.conf配置,然后重启nginx,配置如下:
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
client_max_body_size 1024m;
sendfile on;
tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 100;
gzip on;
gzip_static on;
gzip_min_length 1k;
gzip_buffers 4 32k;
gzip_http_version 1.1;
gzip_comp_level 1;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
gzip_disable "MSIE [1-6].";
gzip_proxied off;
server {
listen 80;
server_name localhost;
#charset koi8-r;
set $rootPath "/usr/local/nginx";
access_log logs/host.access.log main;
location / {
root "${rootPath}/html";
index index.html index.js.html;
try_files $uri $uri/ /index.html;
}
location /magpie/api/ {
proxy_pass http://localhost:9999/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 6 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
# location ~ .*.(gif|jpg|png|bmp|swf)$
# {
# root "${rootPath}/html";
# expires 30d;
# }
location ~ .*.(js|css)?$
{
root "${rootPath}/html";
expires 0d;
}
location ~ .*.(html|htm)?$
{
root "${rootPath}/html";
expires 0d;
}
error_page 404 /50x.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root "${rootPath}/html";
}
}
c) 部署ncaos
i. Unzip nacos.zip -d /自定义路径
ii. 解压完成进入 nacos/conf
iii. 修改application.properties,例如:
修改成自己的数据库地址。
d) 部署 magpie-auth jar, magpie-upms.jar, magpie-upms-biz.jar,magpie-gateway.jar,执行启动命令 nohup java -jar XXXX.jar &
e) 部署完成后访问 ip:8848/nacos 进入nacos页面
导入nacos配置文件,
i. 进入 application-dev.yml 修改
ii. 修改magpie-upms-biz-dev.yml数据库连接配置
iii. 修改magpie-medical-case-dev.yml数据库配置:
2、 数据库创建直接现有数据库导入到新的数据库地址:119.3.52.175
3、 一键部署项目地址
a) http://119.3.60.230/ScientificResearchPlatform/gmjk-service.git 文件下的 $workspace/magpie-medical-case/pom.xml进行maven打包然后启动该服务。 b) http://119.3.60.230/ScientificResearchPlatform/gmjk-medical-case.git 前端文件路径需要执行 ndoe命令。然后吧打包好的文件放到nginx下的html文件夹下,例如:
服务器都启动成功后可以访问对应的ip,查看登陆页面:如下:



