zoukankan      html  css  js  c++  java
  • 普通用户启动redis

    重庆231 Redis 服务器 redis用户启动

    复制 /etc/init.d/redis 启动脚本到 /redisdata/redis3.2下面,修改内容

    [root@localhost ~]# less /redisdata/redis3.2/redis6380
    #!/bin/sh
    #
    # redis init file for starting up the redis daemon
    #
    # chkconfig: - 20 80
    # description: Starts and stops the redis daemon.

    # Source function library.
    . /etc/rc.d/init.d/functions

    name="redis-server"
    exec="/usr/bin/$name"
    pidfile="/redisdata/redis3.2/6380/redis6380.pid"
    # REDIS_CONFIG="/etc/redis.conf"
    REDIS_CONFIG="/redisdata/redis3.2/6380/redis6380.conf"

    [ -e /etc/sysconfig/redis ] && . /etc/sysconfig/redis

    lockfile=/var/lock/subsys/redis

    start() {
    [ -f $REDIS_CONFIG ] || exit 6
    [ -x $exec ] || exit 5
    echo -n $"Starting $name: "
    daemon --user ${REDIS_USER-redis} "$exec $REDIS_CONFIG"
    retval=$?
    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
    }

    修改/redisdata 目录归属 chowd -R redis:redis /redisdata

    /redisdata/redis3.2/redis6380  start 启动 redis

    [root@localhost ~]# ps -ef |grep redis
    redis 5301 1 0 Feb16 ? 04:09:19 /usr/bin/redis-server 0.0.0.0:6379
    redis 17079 1 0 15:20 ? 00:00:00 /usr/bin/redis-server 127.0.0.1:6380

    附注:

    pidfile /var/run/redis6380.pid
    logfile /redisdata/redis3.2/6380/stdout
    logfile /redisdata/redis3.2/6380/log/redis6380.log
    dir /redisdata/redis3.2/6380/data
    /usr/bin/redis-server /redisdata/redis3.2/6380/redis6380.conf

    /redisdata/redis3.2/redis6380 启动脚本

  • 相关阅读:
    04-Bootstrap的插件
    03-Bootstrap学习
    02-移动端单位介绍
    01 响应式页面-@media介绍,
    14-jQuery补充
    13-jQuery的ajax
    12-事件委托(事件代理)
    11-jQuery的事件绑定和解绑
    10-事件对象
    09-JS的事件流的概念(重点)
  • 原文地址:https://www.cnblogs.com/fatt/p/6600269.html
Copyright © 2011-2022 走看看