redis
1.下载redis-2.8.22.tar.gz 包放在 /opt/Front 下
2. 解压tar zxvf redis-2.8.22.tar.gz
3. cd redis-2.8.22 进入解压包下,
make
4. cd src
./redis-server
activemq
1.下载 apache-activemq-5.9.0-bin.tar.gz 包放在 /opt/Front 下
2. 解压tar zxvf apache-activemq-5.9.0-bin.tar.gz
3. cd /opt/Front/apache-activemq-5.9.0/bin
进入解压包下,
./activemq
4.启动 ./activemq start
redis 开机自启动 具体操作,实验有效
(1.复制redis_init_script 到/etc/init.d/redis下 2.修改安装路径 3.添加服务)
1、拷贝 redis 安装目前下的 /usr/local/redis-4.0.2/utils/redis_init_script 到 /etc/init.d/redis文件中;
cp /usr/local/redis-4.0.2/utils/redis_init_script /etc/init.d/redis
- 1
2、修改/etc/init.d/redis 文件。修改redis安装的相关文件安装目录
#!/bin/sh
# chkconfig: 2345 10 90
# description: Start and Stop redis
# Simple Redis init.d script conceived to work on Linux systems
# as it does use of the /proc filesystem.
REDISPORT=6379
EXEC=/usr/local/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli
PIDFILE=/var/run/redis_${REDISPORT}.pid
#CONF="/etc/redis/${REDISPORT}.conf"
CONF="/usr/local/redis-4.0.2/redis.conf"
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
#!/bin/sh
# chkconfig: 2345 10 90
# description: Start and Stop redis
- 1
- 2
- 3
备注:上面的注释的意思是,redis服务必须在运行级2,3,4,5下被启动或关闭,启动的优先级是90,关闭的优先级是10。从redis 安装目录中拷贝过来,可能没有,需要添加 上去; 否则 chkconfig 命令 会失败;
3、开机启动设置,执行一下命令:
- 添加redis服务:
chkconfig --add redis
- 1
- 设为开机启动 :
chkconfig redis on
- 1
- 打开redis命令:
service redis start
- 1
- 关闭redis命令:
service redis stop
- 1
4、重启动检查
init 6
ps -ef|grep redis