Linux环境下部署百度 disconf
来源:互联网 发布:multiselect.js 下载 编辑:程序博客网 时间:2024/06/14 21:01
Linux环境下部署百度 disconf
1. 下载disconf源码:
https://codeload.github.com/knightliao/disconf/zip/master
然后解压
unzip disconf-master.zip
2. 解压完成后,创建两个文件夹online-resources和war
mkdir /usr/local/disconf/online-resources mkdir /usr/local/disconf/war
3. 将
disconf-master/disconf-web/profile/rd
目录下的几个文件:
application-demo.properties(邮件配置163)jdbc-mysql.properties(mysql数据库连接的配置)redis-config.properties(redis连接的配置)zoo.properties(zookeeper的配置)拷贝到刚才的:
/usr/local/disconf/online-resources
目录下。
复制到这个目录下之后,修改
application-demo.properties改成application.properties之后其他几个文件 redis配置和zk配置就可以按照环境情况实际配置,由于我这redis,和zookeeper事先装好的,就不详细说redis和zk安装过程了
4. 上面解压完disconf-master包之后需要配置环境变量:
sudo vi /etc/profile,在文件的末尾加上ONLINE_CONFIG_PATH=/usr/local/disconf/online-resourcesWAR_ROOT_PATH=/usr/local/disconf/warexport ONLINE_CONFIG_PATHexport WAR_ROOT_PATH
5. 生成war包
cd disconf/disconf-websh deploy/deploy.sh不要使用 mvn clean install 编译会报错
最后会在 online-resources目录下生成war包:
6. 根据readme刷入你的SQL脚本 mysql
按照disconf-master/disconf-web/sql/readme.txt说明----------------------------为了方便大家开发,统一了所有SQL,请先后执行:- 0-init_table.sql create db,tables - 1-init_data.sql create data - 201512/20151225.sql patch - 20160701/20160701.sql patch ----------------------------刷入脚本:
cd /data/disconf-master/disconf-web/sql/ mysql -uroot -proot <0-init_table.sql mysql -uroot -proot -Ddisconf<1-init_data.sql mysql -uroot -proot -Ddisconf<201512/20151225.sql mysql -uroot -proot -Ddisconf<20160701/20160701.sql
7. 安装 tomcat 下面是给安装栗子,我实际上是安装的tomcat8
1.下载tomcat7.0.55 http://tomcat.apache.org/download-70.cgi 选择core 中的tar.gz。2.解压缩 tar -zxvf apache-tomcat-7.0.55.tar.gz
配置tomcat
在tomcat的server.xml Host节点中加入<Context path="" docBase="/usr/local/disconf/war"></Context>
第一步:
rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
第二步:
yum info nginx(查看当前版本可选)第三步:安装
yum install -y nginx
启动命令:nginx安装目录在/etc/nginx
service nginx start
启动命令 service nginx start停止命令 service nginx stop重启命令 service nginx restart
配置 nginx在nginx.conf中http添加:
upstream disconf { server 127.0.0.1:8080; } server { listen 8000; server_name localhost; access_log logs/disconf_access.log; error_log logs/disconf_error.log; location / { root /usr/local/disconf/war/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; } }
9. 最后需要访问 http://ip:8000
用户名密码 admin admin
目前只是调研,如果好用,会接着更新
至于为什么一定要使用nginx 之前是说如果只使用tomcat 的话,只能返回JSON,需要使用nginx反向代理,具体还在考察,
阅读全文
0 0
- Linux环境下部署百度 disconf
- disconf-web在windows下的部署
- disconf-web在windows下的部署
- linux下环境部署
- Linux环境下项目部署
- linux下部署erlang环境
- 统一配置管理-百度disconf
- 统一配置管理-百度disconf
- 百度配置管理disconf配置文件
- linux环境下Jenkins部署nodejs环境
- 【disconf】环境搭建
- Linux Centos7下Disconf分布式系统配置管理安装
- 在linux环境下部署tomcat应用
- LINUX下搭运行环境、部署系统
- Linux下部署MyEclipse开发环境
- linux环境下的weblogic部署
- Linux环境下快速项目部署
- Memcache在linux环境下的部署
- Centos6.5执行yum命令时出现:Another app is currently holding the yum lock; waiting for it to exit...
- 浅谈Mysql共享锁、排他锁、悲观锁、乐观锁及其使用场景
- Mybatis映射关系-多对一映射
- 哈希表(散列表)原理详解
- 机器学习中梯度下降法的分类及对比分析(附源码)
- Linux环境下部署百度 disconf
- C++加载运行Tensorflow模型
- 【赠书】拨云见日
- Linux下运行可执行文件出现no such file or directory
- Android中为什么主线程更新UI,子线程执行耗时操作?
- Mysql中Cast()函数,strftime()函数用法
- 读取Spring配置文件获取bean的几种情况
- MySql入门
- Mysql查看数据库总行数 占用硬盘容量