亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

CentOS_6.5安裝Redis_3.0.2

發布時間:2020-08-04 09:43:50 來源:網絡 閱讀:391 作者:13128947463 欄目:網絡安全

1.安裝依賴包和開發工具:
yum install vim vim-enhanced wget zip unzip telnet ntsysv compat* apr* nasm* gcc gcc* gcc-c++ ntp make imake cmake automake autoconf zlib zlib-devel glibc glibc-devel glib2 libxml glib2-devel libxml2 libxml2-devel bzip2 bzip2-devel libXpm libXpm-devel libidn libidn-devel libtool libtool-ltdl-devel* libmcrypt libmcrypt-devel libevent-devel libmcrypt* curl curl-devel perl perl-Net-SSLeay pcre pcre-devel ncurses ncurses-devel openssl openssl-devel openldap openldap-devel openldap-clients openldap-servers krb5 krb5-devel e2fsprogs e2fsprogs-devel libjpeg libpng libjpeg-devel libjpeg-6b libjpeg-devel-6b libpng-devel libtiff-devel freetype freetype-devel fontconfig-devel gd gd-devel kernel screen sysstat flex bison nss_ldap pam-devel compat-libstdc++-33

2.

3.下載wget http://download.redis.io/releases/redis-3.0.2.tar.gz

2.解壓、編譯、安裝redis-3.0:
tar zxvf redis-3.0.2.tar.gz -C /usr/src/
cd /usr/src/redis-3.0.2/
make && make install

3.創建redis相關目錄:
mkdir -p /home/redis/log
mkdir -p /home/redis/pid
mkdir -p /home/redis/db

4.編輯redis.conf配置文件:
cp redis.conf /etc/redis.conf
vim /etc/redis.conf
daemonize yes
pidfile /home/redis/pid/redis.pid
port 6379
tcp-backlog 511
timeout 600
tcp-keepalive 0
loglevel notice
logfile /home/redis/log/redis.log
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
dbfilename dump.rdb
dir /home/redis/db
slave-serve-stale-data yes
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes

5.創建redis服務腳本,并賦予權限:
vim /etc/init.d/redis
#!/bin/sh
# chkconfig:        2345 60 40
# Description:        Start and Stop redis
# Provides:        redis
# Default-Start:    2 3 4 5
# Default-Stop:        0 1 6
PATH=/usr/local/bin:/sbin:/usr/bin:/bin
REDISPORT=6379
EXEC=/usr/local/bin/redis-server
REDIS_CLI=/usr/local/bin/redis-cli
PIDFILE=/home/redis/pid/redis.pid
CONF="/etc/redis.conf"
case "$1" in
start)
if [ -f $PIDFILE ]
then
echo "$PIDFILE exists, process is already running or crashed"
else
echo "Starting Redis server..."
$EXEC $CONF
fi
if [ "$?"="0" ]
then
echo "Redis is running..."
fi
;;
stop)
if [ ! -f $PIDFILE ]
then
echo "$PIDFILE does not exist, process is not running"
else
PID=$(cat $PIDFILE)
echo "Stopping Redis server..."
$REDIS_CLI -p $REDISPORT SHUTDOWN
while [ -x ${PIDFILE} ]
do
echo "Waiting for Redis to shutdown ..."
sleep 1
done
echo "Redis is stopped"
fi
;;
restart|force-reload)
${0} stop
${0} start
;;
*)
echo "Usage: /etc/init.d/redis {start|stop|restart|force-reload}" >&2
exit 1
esac

6.添加redis服務開機啟動:
chmod a+x /etc/init.d/redis
chkconfig --add redis
chkconfig --level 2345 redis on
chkconfig --list | grep redis

7.啟動redis服務:
service redis start
ps -aux | grep redis
netstat -anptu | grep 6379

8.防火墻啟用6379端口:
iptables -A INPUT -p tcp --dport 6379 -j ACCEPT

 


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

沂源县| 来凤县| 甘孜| 张家界市| 广汉市| 广宁县| 多伦县| 阳城县| 大埔县| 章丘市| 天祝| 伊宁市| 拉萨市| 商丘市| 侯马市| 石屏县| 铁岭县| 江门市| 五家渠市| 靖安县| 石渠县| 定边县| 图片| 应用必备| 通辽市| 金寨县| 昆山市| 新泰市| 内乡县| 呼和浩特市| 乌鲁木齐市| 怀来县| 阿拉尔市| 习水县| 社旗县| 湖州市| 宿松县| 台中县| 攀枝花市| 太仓市| 昭通市|