亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長(zhǎng)資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    設(shè)置redis開機(jī)啟動(dòng)

    設(shè)置redis開機(jī)啟動(dòng)

    使用下面的方法要注意的是安裝文件路徑和配置文件的路徑。

    [root@localhost ~]# vi /etc/init.d/redis

    復(fù)制下面代碼到腳本中(注意要修改里面redis的安裝路徑,不清楚find查找下)
    (這段代碼就是redis根目錄 /utils/redis_init_script 啟動(dòng)腳本的代碼)

    #!/bin/sh # chkconfig: 2345 10 90   # description: Start and Stop redis     REDISPORT=6379 EXEC=/usr/local/bin/redis-server CLIEXEC=/usr/local/bin/redis-server  PIDFILE=/var/run/redis_${REDISPORT}.pid CONF="/etc/redis/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         ;;     stop)         if [ ! -f $PIDFILE ]         then                 echo "$PIDFILE does not exist, process is not running"         else                 PID=$(cat $PIDFILE)                 echo "Stopping ..."                 $CLIEXEC -p $REDISPORT shutdown                 while [ -x /proc/${PID} ]                 do                     echo "Waiting for Redis to shutdown ..."                     sleep 1                 done                 echo "Redis stopped"         fi         ;;     restart)         "$0" stop         sleep 3         "$0" start         ;;     *)         echo "Please use start or stop or restart as first argument"         ;; esac

    設(shè)置權(quán)限

    [root@localhost ~]# chmod 777 /etc/init.d/redis

    設(shè)置開機(jī)啟動(dòng)

     chkconfig redis on

    啟動(dòng)測(cè)試

     service start redis

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)