disconf-web 分布式配置管理平台

85 阅读1分钟

disconf-web 分布式配置管理平台 1、安装mysql 2、tomcat 3、安装nginx 4、安装zookeeper 5、安装redis 6、下载disconf安装包 (1)下载disconf包 git clone  github.com/knightliao/…

(2)配置disconf配置文件

2、1 创建两个文件夹online-resources和war mkdir /usr/local/disconf/war #设置War包将要被部署的地址 mkdir /usr/local/disconf/online-resources #配置文件放到此地址目录下

2、2 配置文件复制 /usr/local/disconf/online-resourcesonline-resources:放的是四个配置文件(四个所在文件位置 下载原始目录/opt/tools/disconf/disconf-web/profile/rd的目录下)

application-demo.properties(邮件配置163)

jdbc-mysql.properties(mysql数据库连接的配置)

redis-config.properties(redis连接的配置) zoo.properties(zookeeper的配置)

注意,即使只有一个redis,也应该配置两个redis client,否则将造成内部错误。* 2、3 application-demo.properties改成application.properties 2、4 cd /opt/disconf [root@minion disconf]# ONLINE_CONFIG_PATH=/usr/local/disconf/online-resources [root@minion disconf]# WAR_ROOT_PATH=/usr/local/disconf/war [root@minion disconf]# export ONLINE_CONFIG_PATH [root@minion disconf]# export WAR_ROOT_PATH [root@minion disconf]# cd disconf-web [root@minion disconf-web]# sh deploy/deploy.sh

脚本运行结束后会在/usr/local/disconf/war/路径下生成web部署所用到的程序文件 -disconf-web.war -html -META-INF -WEB-INF

(3)数据库导入 /opt/disconf/disconf-web/sql 注意sql文件导入顺序 0-init_table.sql---->1-init_data.sql---->201512/20151225.sql---->20160701/20160701.sql

(2)配置tomcat vim /usr/local/apache-tomcat-9.0.5/conf/server.xml

(2)配置nginx服务

upstream disconf { server 127.0.0.1:8080; }

server { listen 8000; server_name localhost;

location / { root /usr/local/disconf/war/html; if ($query_string) { expires max; } }

location ~ ^/(api|export) { proxy_pass_header Server; proxy_set_header Host httphost;proxyredirectoff;proxysetheaderXRealIPhttp_host; proxy_redirect off; proxy_set_header X-Real-IP remote_addr; proxy_set_header X-Scheme $scheme; proxy_pass http://disconf; } } }

问题描述 mvn clean install 安装报错问题

解决问题: mvn clean install -DskipTests -Dmaven.javadoc.skip=true