标签:/etc 输出 git bsp 脚本 set add enc home
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
标签:/etc 输出 git bsp 脚本 set add enc home
原文地址:https://www.cnblogs.com/mutong1228/p/9127495.html