分布式配置管理平台
来源:互联网 发布:网络直播app 哪个好 编辑:程序博客网 时间:2024/05/17 06:54
配置简单,按步骤操作即可;以下配置方法,同样适用于linux~
1.环境配置
配置java、maven环境,并安装mysql,reids,zookeeeper,Nginx,Tomcat
2.下载disconf
github下载https://codeload.github.com/knightliao/disconf/zip/master
或csdn下载:http://download.csdn.net/download/syc001/10000954 版本(2.6.36)
解压:
unzip disconf-master.zip
目录结构如下:
3.初始化数据库
mysql创建数据库: 命名disconf
导入sql语句(sql路径:{disconf_master}/disconf_web/sql/):
执行
mysql -uroot -p disconf < 0-init_table.sqlmysql -uroot -p disconf < 1-init_data.sqlmysql -uroot -p disconf < 201512/20151225.sqlmysql -uroot -p disconf < 20160701/20160701.sql
4. 修改配置
配置文件包括:
- jdbc-mysql.properties (数据库配置)
- redis-config.properties (Redis配置)
- zoo.properties (Zookeeper配置)
- application.properties (应用配置)
- redis-config.properties (Redis配置)
- zoo.properties (Zookeeper配置)
- application.properties (应用配置)
copy 配置文件:
cp {disconf_master}/disconf_web/profile/rd/* {disconf_master}/disconf_web/src/main/java/resoures/注意,记得执行将application-demo.properties复制成application.properties:
5.打war包
cd {disconf_master}/disconf_web/mvn clean installcp {disconf_master}/disconf_web/target/disconf-web.war {tomcat_home}/webapps/
6.准备静态资源文件
cd {tomcat_home}/webapps/mkdir htmlcp -R {disconf_master}/disconf_web/html/assets {tomcat_home}/webapps/html/cp -R {disconf_master}/disconf_web/html/dep {tomcat_home}/webapps/html/cp -R {disconf_master}/disconf_web/html/*.html {tomcat_home}/webapps/html/
7.配置tomcat并启动
vi {tomcat_home}/conf/server.xml设置端口号为8080
加入context节点
<Context path=""docBase=" {tomcat_home}/webapps/disconff-web"></Context> ###此处为添加disconf目录。
<Context path=""docBase=" {tomcat_home}/webapps/disconff-web"></Context> ###此处为添加disconf目录。
如下图:
启动Tomcat.
8.配置nginx并启动
修改nginx配置
vi {nginx_home}/conf/nginx.conf
upstream disconf {server 127.0.0.1:8080; #代理tomcat,动态请求转发至后端tomcat程序} server { listen 8089; #server_name localhost;server_name disconf.com; #如果使用域名,可以设置为disconf.com(可以自定义),但它必须与 application.properties配置文件中的domain保持一致location / {root D:\\software\\tomcat\\tomcat8-8080\\webapps\\html\\;if ($query_string) {expires max;}} location ~ ^/(api|export) {proxy_pass_header Server;proxy_set_header Host $http_host;proxy_redirect off;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Scheme $scheme;proxy_pass http://disconf;} location = /favicon.ico {log_not_found off;access_log off;}启动:
start nginx
9.启动测试
输入:http://localhost:8089/
登陆:
默认用户名/密码:admin/admin 如下图:
阅读全文
0 0
- 分布式配置管理平台-Disconf
- 分布式配置管理平台 Disconf
- 分布式配置管理平台 Disconf
- 分布式配置管理平台Disconf
- 分布式配置管理平台Disconf
- 分布式配置管理平台Disconf
- 分布式配置管理平台
- 分布式配置管理平台
- 分布式配置管理平台
- 分布式配置管理平台 - Disconf介绍
- 分布式配置管理平台XXL-CONF
- Disconf,百度的分布式配置管理平台
- 一款轻量的分布式配置管理平台
- 分布式配置管理平台disconf-初体验
- 【推荐】百度分布式配置管理平台-Disconf
- 分布式配置管理平台的设计与实现
- 分布式配置管理平台 - Disconf web管理端安装
- 分布式配置管理平台 - Disconf web管理端安装
- Codeforces Round #436 (Div. 2)
- 【Leetcode】算法题26 Remove Duplicates from Sorted Array
- 学习MNIST For ML Beginners笔记
- Kotlin学习(5)空类型安全
- netty源码分析之-Executor的实现机制(2)
- 分布式配置管理平台
- phpstorm正则匹配删除注释行
- Linux分区与磁盘管理
- MFC更改图标
- 折半查找
- (HDU
- Redis初体验
- 李超线段树
- 归并排序(Merge-Sort)