首页 > 数据库 >若依微服务框架RuoYi-Cloud-Oracle本地运行并部署搭建

若依微服务框架RuoYi-Cloud-Oracle本地运行并部署搭建

时间:2024-02-19 16:35:15浏览次数:25  
标签:index http log RuoYi nginx html proxy Oracle 依微

我一开始去若依官网学习,去Gitee上面下载的是RuoYi-Cloud 若依微服务版本 发现是mysql库,按照若依官方文档我运行了起来,没有啥太大的问题,但是我想要oracle版本,又去网上找了找终于在github上面找到了https://github.com/yangzongzhuan/RuoYi-Cloud-Oracle?tab=readme-ov-file 我就clone克隆了下来,和本身mysql版本运行思想是一样的,只是这个项目下面导入的sql是oracle的 创建RY-CLOUD表空间和用户 打开库 右击运行RuoYi-Cloud-Oracle下sql中的

 但是nacos配置中心默认用的是mysql,所以还是需要一部分的mysql ry-config库

seata我是没有用

整体过程:

若依官方:https://doc.ruoyi.vip/ruoyi-cloud/document/hjbs.html#%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C

1.IDEA中运行需要注意:

RuoYiGatewayApplication网关服务 端口要是已占用的话,可以改成8079或者其他,前端vue.config.js中也需要修改,本地部署的时候nginx里面的注意写成http://localhost:8079/

 

RuoYiAuthApplication 认证服务 占用的话可以修改为9199

 其他服务启动端口占用的话也需要修改

2.本地部署需要注意:

(1)打jar包,去各个springboot启动类对应的target下把它copy到部署的文件夹中,然后去项目根目录bin下将bat文件也copy到部署的文件夹中,如下图:

 (2)确保nacos启动了,遇到出现启动起来之后闪退的情况,可能是mysql数据库没有连接上,重启mysql,再次双击nacos>bin>startup.cmd,之后会有一个nacos cmd的启动窗口,不要不小心关了

 (3)分别双击启动run-auth.bat  run-gateway.bat  run-modules-system.bat 这三个是必须启动的 没有先后顺序 其他的run-modules-file.bat 文件上传  run-modules-gen.bat代码生成  run-modules-job.bat 定时任务 按照需求启动   和在IDEA中运行思想一样

(4)nginx配置:

nginx下载下来之后,修改nginx.conf 中的监听端口为8081(自己想要的端口切记不要端口冲突了)之后双击nginx.exe 闪退  不用担心 访问localhost:8081 会出现nginx的欢迎页面  说明nginx没有问题

之后开始打vue前端包,IDEA中打开Terminal 

cd ruoyi-ui  

npm run build:prod 

打正式环境包

打包之前需要修改的地方有:

 然后打包,之后在ruoyi-ui中会生成一个dist的文件夹,将这个放到nginx/html中,然后就可以配置nginx.conf了


#user root;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


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;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 8081;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root html/dist;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}

location /prod-api/ { #后端访问子路径,项目.env.development中的配置
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/; #后端访问接口
}

location /dev-api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/;
}
location /profile/ {
proxy_pass http://127.0.0.1:8080/profile/;
}

# 避免actuator暴露
if ($request_uri ~ "/actuator") {
return 403;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;

# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;

# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

}

 

重启nginx 

之后就访问:http://localhost:8081/#/login?redirect=%2Findex 

标签:index,http,log,RuoYi,nginx,html,proxy,Oracle,依微
From: https://www.cnblogs.com/yr1126/p/18021390

相关文章

  • Linux下oracle数据库安装
    1.环境准备:关闭防火墙,禁用开机自启防火墙关闭selinux配置网络IP静态地址添加组groupadddbagroupaddoinstall创建Oracle用户:useradd-d/home/oracle-goinstall-Gdba-moracle设计密码: passwdoracle 创建Oracle目录 mkdir-p/u01/app/oracle/product/11......
  • 若依微服务(三)新增一个微服务——附件管理服务
    若依本身有一个文件上传模块,但是实现的功能比较基础。我打算构建一个更偏应用的附件管理服务,功能更加完整丰富。功能如下:附件的上传、批量上传、下载、打包下载、查询、删除、假删除UI界面包含附件的预览和类似网盘的层级目录完善的权限控制通过这个附件管理服务的开发,熟......
  • Q:Oracle表空间使用权限错误:ORA-01950
    使用A用户账号(默认表空间tablespace_A),A用户表中插入数据报错ORA-01950报错处理方法:方法1:授予用户A unlimitedtablespace权限grantunlimitedtablespacetoA;方法2:分配表空间使用配额alteruserAquotaunlimitedontablespace_A;注意:unlimitedtablespace可以对......
  • [转帖]Oracle NUMBER Data Type
    https://www.oracletutorial.com/oracle-basics/oracle-number-data-type/ Summary:inthistutorial,youwilllearnabouttheOracle NUMBER datatypeandhowtouseittodefinenumericcolumnsforatable.IntroductiontoOracleNUMBERdatatypeTheOrac......
  • 从零开始搭若依微服务版
    1.打开文档https://doc.ruoyi.vip/ruoyi-cloud/document/hjbs.html按照这个清单安装环境2.JDK需要上oracle官网下载,很不方便,我这里直接提供网盘链接。安装建议全部默认,不要修改路径,会造成运行异常。安装之后,记得配置java环境变量。链接:https://pan.baidu.com/s/1-AoxxXC3u......
  • Oracle Java SE Product Releases
    1.gotothemainpage[https://www.oracle.com/]2.thenclick'Products'tochoosetheJavaicon3.clickthe'OracleJavaSEPlatform'icon[https://www.oracle.com/java/]4.repeattheactionasbelow[https://www.oracle.com/java/t......
  • 解决Oracle11g区分大小写问题
    连接到:OracleDatabase11gEnterpriseEditionRelease11.2.0.1.0-ProductionWiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptionsSQL>showparametersec_case_sensitive_logonNAMETYPEVALU......
  • [转帖]Oracle number类型详解
    Oraclenumber类型详解简介基本说明容易出错情况Number与MySQL数据类型简介Oracle的number类型比较复杂,很多限制,但是掌握一点小技巧就能轻松搞定。基本说明number(precision,scale)precision表示数字中的有效位,从左边第一个不为0的数算起,小数点和负号不计入有效......
  • 创建企业级地理数据库oracle
    创建oracle地理数据库sde之前写过一篇在postgres数据库中创建sde的教程,由于工作需求,现需要在oracle数据库中创建sde并连接使用,现把主要步骤记录下来,以备后续查看方便。有一说一,开源的postgres数据库创建sde不要太方便,关键是人家还有自己的PostGIS插件以支持空间数据表达,闭源的or......
  • 创建企业级地理数据库oracle
    创建oracle地理数据库sde之前写过一篇在postgres数据库中创建sde的教程,由于工作需求,现需要在oracle数据库中创建sde并连接使用,现把主要步骤记录下来,以备后续查看方便。有一说一,开源的postgres数据库创建sde不要太方便,关键是人家还有自己的PostGIS插件以支持空间数据表达,闭源的or......