zookeeper安装
配置hosts
下载 wget http://apache.fayea.com/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
mv zookeeper-3.4.6 zookeeper
cd /opt/zookeeper
创建目录
mkdir data
mkdir logs
将zookeeper/conf目录下的zoo_sample.cfg文件copy一份
cp zoo_sample.cfg zoo.cfg
修改zoop
dataDir=/opt/zookeeper/data
dataLogDir=/opt/zookeeper/logs
clientPort=2181
server.1=Hadoop-host:2888:3888
在/opt/zookeeper/data文件下创建myid
vi myid
1
添加环境变量
export ZOOKEEPER_HOME=/opt/zookeeper
export PATH=$ZOOKEEPER_HOME/bin:$PATH
启动并测试zookeeper
zkServer.sh start
查看进程jps
[root@Hadoop-host etc]# jps
7315 Jps
1851 QuorumPeerMain
查看状态
zkServer.sh status
查看输出信息
tail -500f zookeeper.out
停止zookeeper进程
zkServer.sh stop
activemq安装
启动
cd /opt/activemq/bin
./activemq start
http://192.168.153.147:8161
默认的用户名和密码: admin admin
redis安装
编译和安装所需的包
yum install gcc tcl
下载 wget https://github.com/antirez/redis/archive/3.0.0-rc5.tar.gz
mv redis-3.0.0-rc5 redis
cd redis
安装(使用PREFIX指定安装目录)
make PREFIX=/opt/redis install
查看是否安装成功 cd bin
redis-benchmark redis-check-aof redis-check-dump redis-cli redis-sentinel redis-server
1. 将redis配置成服务
redis启动脚本为/opt/redis/utils/redis_init_script
将启动脚本赋值到/etc/rc.d/init.d/ 命名为redis
cp /opt/redis/utils/redis_init_script /etc/rc.d/init.d/redis
编辑redis
在第一行后面添加#chkconfig: 2345 80 90
EXEC=/usr/local/bin/redis-server 改为EXEC=/opt/redis/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli 改为CLIEXEC=/opt/redis/bin/redis-cli
创建redis配置文件目录
mkdir /opt/redis/conf
cp redis.conf conf/6379.conf
CONF="/etc/redis/${REDISPORT}.conf" 改为CONF="/opt/redis/conf/${REDISPORT}.conf"
更改redis开启命令,以后台运行方式执行
第20行 $EXEC $CONF 改为$EXEC $CONF & #"&"的作用将服务转到后台运行
配置完成,将redis注册成为服务
chkconfig --add redis
将redis添加到环境变量中
export PATH=$PATH:/opt/redis/bin
source /etc/profile
2. 启动redis服务
service redis start
使用redis相关命令
[root@Hadoop-host etc]# redis-cli
127.0.0.1:6379> set liusw LiuSongWei
OK
127.0.0.1:6379> get liusw
"LiuSongWei"
service redis start
tomcat安装
下载地址 https://tomcat.apache.org/download-70.cgi
删除 /opt/tomcat7/webapps目录文件
yum install -y unzip zip
解压并把目录命名为ROOT
unzip dubbo-admin-2.5.3.war -d ROOT
cd ROOT/WEB-INF/dubbo.properties
dubbo.registry.address=zookeeper://192.168.153.147:2181
dubbo.admin.root.password=root
dubbo.admin.guest.password=guest
启动 http://192.168.153.147:8080/
输入用户名和密码:guest/guest
配置部署了dubbo管控台的tomcat开启启动
编译 vi /etc/rc.local文件,加入
su - opt -c '/opt/tomcat7/bin/startup.sh'
注意:启动tomcat之前,要启动zookeeper