一、
卸载旧版本jdk
rpm -qa|grep jdk
rpm -e --nodeps java-1.6.0-openjdk-devel-1.6.0.0-11.1.13.4.el6.x86_64
rpm -e --nodeps java-1.8.0-openjdk-1.8.0.20-3.b26.el6.x86_64
rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-11.1.13.4.el6.x86_64
rpm -e --nodeps java-1.8.0-openjdk-devel-1.8.0.20-3.b26.el6.x86_64
rpm -e --nodeps java-1.7.0-openjdk-devel-1.7.0.65-2.5.1.2.el6_5.x86_64
rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.20-3.b26.el6.x86_64
rpm -e --nodeps java-1.6.0-openjdk-javadoc-1.6.0.0-11.1.13.4.el6.x86_64
rpm -e --nodeps java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64
升级jdk1.8
rpm -ivh jdk-8u91-Linux-x64.rpm
vim /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_91
export JAVA_BIN=/usr/java/jdk1.8.0_91/bin
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
source /etc/profile #当前生效
二、
安装mysql5.6
rpm -qa | grep -i mysql
yum -y remove mysql-libs*
rm -rf mysql
find / -name msyql-*
wget http://cdn.mysql.com/archives/mysql-5.6/MySQL-server-5.6.13-1.el6.x86_64.rpm
wget http://cdn.mysql.com/archives/mysql-5.6/MySQL-devel-5.6.13-1.el6.x86_64.rpm
wget http://cdn.mysql.com/archives/mysql-5.6/MySQL-client-5.6.13-1.el6.x86_64.rpm
rpm -vih epel-release-6-8.noarch.rpm
yum localinstall mysql57-community-release-el6-7.noarch.rpm
rpm -vih mysql-community-release-el6-5.noarch.rpm
yum list mysql-community-server
yum install mysql-community-server
/etc/init.d/mysqld restart
mysql_secure_installation
msyql -uroot -p123456
三、
分布式配置管理平台(jdk1.8 msyql5.6)
下载软件:
https://github.com/nobodyiam/apollo-build-scripts
apollo:
上传软件apollo-build-scripts.zip
解压
导入初始化库:
source /root/sql/apolloconfigdb.sql
source /root/sql/apolloportaldb.sql
修改配置
配置数据库连接信息
Apollo服务端需要知道如何连接到你前面创建的数据库,所以需要编辑build.sh,修改ApolloPortalDB和ApolloConfigDB相关的数据库连接串信息。
注意:填入的用户需要具备对ApolloPortalDB和ApolloConfigDB数据的读写权限。
#apollo config db info
apollo_config_db_url=jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8
apollo_config_db_username=用户名
apollo_config_db_password=密码(如果没有密码,留空即可)
# apollo portal db info
apollo_portal_db_url=jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8
apollo_portal_db_username=用户名
apollo_portal_db_password=密码(如果没有密码,留空即可)
注意:不要修改build.sh的其它部分
启动Apollo配置中心
3.1 确保端口未被占用
Quick Start脚本会在本地启动3个服务,分别使用8070, 8080, 8090端口,请确保这3个端口当前没有被使用。
执行启动脚本
./build.sh start
启动成功打印如下信息:
./build.sh start
==== starting service ====
Service logging file is ./service/apollo-service.log
Started [5200]
Waiting for config service startup...............
Config service started. You may visit http://localhost:8080 for service status now!
Waiting for admin service startup.....
Admin service started
==== starting portal ====
Portal logging file is ./portal/apollo-portal.log
Started [5490]
Waiting for portal startup..............
Portal started. You can visit http://localhost:8070 now!
验证:
http://192.168.1.51:8070/index.html