Disconf的disconf-web的管理端安装
来源:互联网 发布:ibm人工智能 编辑:程序博客网 时间:2024/05/17 08:31
最近刚接触大数据,在搞一个分布式配置平台——Disconf。由于是菜鸟级别的,也是在一边摸索一边自己搞,困难也是很大-主要以前没接触过什么Linux,服务器之类,看了好多的文章觉得不适合初学者去使用,而且其中也会出现种种问题无法解决。。。所以今天打算写个详细的过程,把自己所遇到的问题也罗列出来,供大家参考。
1. Linux上安装java,Maven,并且配置相关的环境。并且安装mysql,redis,Nginx,zookeeper。
以上这些网上都有教程,主要说一下redis安装的时候在他的配置文件一定要配置至少两个节点,一个主的slaver和一个从的slaver。这个是单机模式ip(127.0.0.1)。
集群模式的话就得分别在配置文件中配置分布式的主的ip和从的ip和相应的端口。
启动redis,并且验证能否远程访问,端口是否正常。
2.去git上面下载disconf-master的源码
地址:https://codeload.github.com/knightliao/disconf/zip/master
解压:unzip disconf-master.zip
3.创建两个文件夹online-resources和war。
1>
创建命令: mkdir /hadoop/disconf/online-resources
mkdir /hadoop/disconf/war
online-resources:放的是四个配置文件(四个所在文件位置disconf-master/disconf-web/profile/rd的目录下)
application-demo.properties(邮件配置163)
jdbc-mysql.properties(mysql数据库连接的配置)
redis-config.properties(redis连接的配置)
zoo.properties(zookeeper的配置)
1.首先将四个配置文件拷贝到/hadoop/disconf/online-resources 。
命令 cp 所在文件夹绝对路径 目标文件夹路径
2.application-demo.properties改成application.properties
3.四个配置文件夹可以在这里修改了,如果熟悉redis。zookeeper的话直接修改就行,反之使用默认就可以。
2>
cd disconf-master
mvn clean install
确保所有mvn命令能buildsuccess。
因为Maven执行 mvn clean install 的时候会出现下不到jar包,所以的手动添加jar包(网上可自行搜索maven手动添加jar包)。
3>
配置环境变量
ONLINE_CONFIG_PATH=/hadoop/disconf/online-resources
WAR_ROOT_PATH=/hadoop/disconf/war
export ONLINE_CONFIG_PATH
export WAR_ROOT_PATH
注意:执行 source /etc/profile 否则环境变量不生效。
4>
cd disconf-web
sh deploy/deploy.sh
注意:执行过程中也会出现下不到jar包,所以的手动添加jar包(网上可自行搜索maven手动添加jar包)。
执行完毕会在新建的/hadoop/disconf/online-resources下出现如下目录
-disconf-web.war
-html
-jpaas_control
-META-INF
-Release
-tmp
-WEB-INF
4.初始化数据库
按照disconf-master/disconf-web/sql/readme.txt说明按照顺序导入数据
默认username=root,password=123456
建议初始化完毕以后看一下其中的数据
mysql-u username -p password <0-init_table.sql
mysql-u username -p password -Ddisconf<1-init_data.sql
mysql-u username -p password -Ddisconf<201512/20151225.sql
5.配置tomcat。
主要就是把上面生成的war包部署到tomcat的容器中,这就觉得在分布式系统中tomcat和disconf是不可分离的必须部署到同一台主机上。
修改server.xml文件,在Host结点下添加Context:
<Context path="" docBase="/hadoop/disconf/war"></Context>
6.配置Nginx
在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 /hadoop/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;
- }
- }
7.浏览器里面输入nginx的ip和端口访问,通过http://你的ip:8000/即可访问 默认用户:admin/admin
- Disconf的disconf-web的管理端安装
- disconf-web的搭建
- 分布式配置管理平台 - Disconf web管理端安装
- 分布式配置管理平台 - Disconf web管理端安装
- 分布式配置管理平台 - Disconf web管理端安装【转】
- disconf-web安装教程
- disconf-web在windows下的部署
- disconf-web在windows下的部署
- disconf
- Disconf
- Disconf
- Disconf(二)disconf-web
- centos6.5环境disconf管理端安装配置详解
- disconf 安装笔记
- CentOS7下安装Disconf
- disconf安装与使用
- Disconf,百度的分布式配置管理平台
- 回归后的第一篇献给 Disconf
- Docker双刃剑
- 数据结构实验之栈六:下一较大值(二)
- POJ 3071 概率DP
- test命令的用法[]
- #4.Linux的设备管理
- Disconf的disconf-web的管理端安装
- JAVA环境变量设置
- Django urls.py的集中
- refresh的停车场
- HDU Problem 2196 Computer【树的直径】
- HDU 4499 Cannon (DFS回溯)
- POJ 1037 A decorative fence(dp)
- 快速入门Openstack,无脑多节点部署Mitaka(1)--前期环境搭建准备
- poj 1383 Labyrinth(树的直径)