root@ubuntu:/etc/init.d# ll
total
drwxr-xr-x root root May : ./
drwxr-xr-x root root May : ../
-rwxr-xr-x root root Oct apparmor*
-rwxr-xr-x root root Jan bootmisc.sh*
-rwxr-xr-x root root Jan checkfs.sh*
-rwxr-xr-x root root Jan checkroot-bootclean.sh*
-rwxr-xr-x root root Jan checkroot.sh*
-rwxr-xr-x root root Apr console-setup*
-rwxr-xr-x root root Apr cron*
-rwxr-xr-x root root Dec dbus*
-rw-r--r-- root root May : .depend.boot
-rw-r--r-- root root May : .depend.start
-rw-r--r-- root root May : .depend.stop
-rwxr-xr-x root root Mar grub-common*
-rwxr-xr-x root root Jan halt*
-rwxr-xr-x root root Jan hostname.sh*
-rwxr-xr-x root root Mar hwclock.sh*
-rwxr-xr-x root root Apr irqbalance*
-rwxr-xr-x root root Apr keyboard-setup*
-rwxr-xr-x root root Jan killprocs*
-rwxr-xr-x root root Dec kmod*
-rwxr-xr-x root root Jun mongodb*
-rwxr-xr-x root root Jan mountall-bootclean.sh*
-rwxr-xr-x root root Jan mountall.sh*
-rwxr-xr-x root root Jan mountdevsubfs.sh*
-rwxr-xr-x root root Jan mountkernfs.sh*
-rwxr-xr-x root root Jan mountnfs-bootclean.sh*
-rwxr-xr-x root root Jan mountnfs.sh*
-rwxr-xr-x root root Jul networking*
-rwxr-xr-x root root Oct ondemand*
-rwxr-xr-x root root Mar : php7.-fpm*
-rwxr-xr-x root root Nov plymouth*
-rwxr-xr-x root root Nov plymouth-log*
-rwxr-xr-x root root Sep procps*
-rwxr-xr-x root root Jan rc*
-rwxr-xr-x root root Jan rc.local*
-rwxr-xr-x root root Jan rcS*
-rw-r--r-- root root Jan README
-rwxr-xr-x root root Jan reboot*
-rwxr-xr-x root root Dec redis-server*
-rwxr-xr-x root root Nov resolvconf*
-rwxr-xr-x root root Jul rsync*
-rwxr-xr-x root root Feb rsyslog*
-rwxr-xr-x root root Jan sendsigs*
-rwxr-xr-x root root Jan single*
-rw-r--r-- root root Jan skeleton
-rwxr-xr-x root root Apr ssh*
-rwxr-xr-x root root Apr udev*
-rwxr-xr-x root root Aug ufw*
-rwxr-xr-x root root Jan umountfs*
-rwxr-xr-x root root Jan umountnfs.sh*
-rwxr-xr-x root root Jan umountroot*
-rwxr-xr-x root root Jan urandom*
-rwxr-xr-x root root Dec : uuidd*
root@ubuntu:/etc/init.d# cat redis-server
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start:
# Default-Stop:
# Short-Description: redis-server - Persistent key-value db
# Description: redis-server - Persistent key-value db
### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/redis-server
DAEMON_ARGS=/etc/redis/redis.conf
NAME=redis-server
DESC=redis-server RUNDIR=/var/run/redis
PIDFILE=$RUNDIR/redis-server.pid test -x $DAEMON || exit if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi . /lib/lsb/init-functions set -e Run_parts () {
if [ -d /etc/redis/${NAME}.${}.d ]
then
su redis -s /bin/sh -c "run-parts --exit-on-error /etc/redis/${NAME}.${1}.d"
fi
} case "$1" in
start)
echo -n "Starting $DESC: "
mkdir -p $RUNDIR
touch $PIDFILE
chown redis:redis $RUNDIR $PIDFILE
chmod $RUNDIR if [ -n "$ULIMIT" ]
then
ulimit -n $ULIMIT
fi Run_parts pre-up if start-stop-daemon --start --quiet --oknodo --umask --pidfile $PIDFILE --chuid redis:redis --exec $DAEMON -- $DAEMON_ARGS
then
Run_parts post-up
echo "$NAME."
else
echo "failed"
fi
;;
stop)
echo -n "Stopping $DESC: " Run_parts pre-down if start-stop-daemon --stop --retry forever/TERM/ --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
then
Run_parts post-down
echo "$NAME."
else
echo "failed"
fi
rm -f $PIDFILE
sleep
;; restart|force-reload)
${} stop
${} start
;; status)
status_of_proc -p ${PIDFILE} ${DAEMON} ${NAME}
;; *)
echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload|status}" >&
exit
;;
esac exit
root@ubuntu:/etc/init.d# redis-server stop
:C May ::19.728 # Fatal error, can't open config file 'stop'
root@ubuntu:/etc/init.d# ./redis-server stop
[ ok ] Stopping redis-server (via systemctl): redis-server.service.
root@ubuntu:/etc/init.d# ./redis-server start
[ ok ] Starting redis-server (via systemctl): redis-server.service.
root@ubuntu:/etc/init.d#

/etc/init.d# ./redis-server start的更多相关文章

  1. 虚拟机centOS中安装Redis,主机Redis Destop Manager不能访问虚拟机Redis server的解决方案

    今天在学些redis的时候碰到个问题,发现主机Redis Destop Manager不能访问虚拟机Redis server的解决方案,找了一些网上的资料,原因可能有两个,整理记录下来: 1. Red ...

  2. C# Redis Server分布式缓存编程 --网络转载

    这篇文章我将介绍如果用最简洁的方式配置Redis Server, 以及如何使用C#和它交互编程 一. 背景介绍 Redis是最快的key-value分布式缓存之一 缺点: 没有本地数据缓冲, 目前还没 ...

  3. 本地计算机 上的 Redis Server 服务启动后停止

    服务器上Redis服务安装正常..却启动不了.. 报错  :   本地计算机 上的 Redis Server 服务启动后停止.某些服务在未由其他服务或程序使用时将自动停止. 最后发现是Redis的配置 ...

  4. windows redis:Uncaught exception 'RedisException' with message 'Redis server went away'

    window-exe-redis-2.8.12服务,当你复制好php_igbinary.dll,php_redis.dll时候,你运行redis报错:Fatal error: Uncaught exc ...

  5. redis客户端连接服务端the version of redis server is too low to support this function错误

    redis作为一个内存数据库,使用得当可以大大的提升系统运行的效率,据说能读的速度是110000次/s,写的速度是81000次/s,我们的其中一个系统就用到了这个. 由于之前负责这个的同事离职,只好临 ...

  6. mac上配置mysql与redis server,并结合Pydev准备某爬虫环境

    mysql下安装mysql server mysql下安装redis server:https://www.jianshu.com/p/3bdfda703552 mac下安装配置redis:https ...

  7. Redis server went away的解决方案

    Redis server went away出现的问题如下: 1.看redis服务是否启动,包括端口 2.看是否是服务器端的防火墙引起的,iptables和selinux 3.看是否是redis.co ...

  8. redis error It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING

    应用redis出现如下错误 It was not possible to connect to the redis server(s); to create a disconnected multip ...

  9. Linux 下安装 Redis server

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/defonds/article/details/30047611         本文简介了 Linu ...

  10. C# Redis Server分布式缓存编程(一)(转)

    出处:http://www.cnblogs.com/davidgu/p/3262571.html 这篇文章我将介绍如果用最简洁的方式配置Redis Server, 以及如何使用C#和它交互编程 一. ...

随机推荐

  1. 洛谷 - P1522 - 牛的旅行 - Cow Tours - Floyd

    https://www.luogu.org/problem/P1522 好坑啊,居然还有直径不通过新边的数据,还好不是很多. 注意一定要等Floyd跑完之后再去找连通块的直径,不然一定是INF. #i ...

  2. 通过修改host解决VS2019下载极慢的问题

    原文:通过修改host解决VS2019下载极慢的问题 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn ...

  3. 14-jquery元素节点操作

    **创建节点** ```var Div = $('<div>');var Div2 = $('<div>这是一个div元素</div>');``` **插入节点** ...

  4. SpringAOP用到了什么代理,以及动态代理与静态代理的区别

    spring aop (面向切面)常用于数据库事务中,使用了2种代理. jdk动态代理:对实现了接口的类生成代理对象.要使用jdk动态代理,要求类必须要实现接口. cglib代理:对类生成代理对象. ...

  5. idea无法使用注解@Data解决方法

    @Data相关依赖 <dependency> <groupId>org.projectlombok</groupId> <artifactId>lomb ...

  6. Codeforces Round #427 (Div. 2) - A

    题目链接:http://codeforces.com/contest/835/problem/A 题意:两个人给网站发信息,现在给出信息的长度n,两个人的延迟和打字速度(一个字符),问网站先收到哪个人 ...

  7. keras数据增强

    1.keras数据增强:https://www.cnblogs.com/hutao722/p/10075150.html 2 .keras fit 中的 verbose verbose:日志显示ver ...

  8. eclipse多个项目提交到同一个仓库(码云)

    参考博客:Eclipse提交多个项目到同一个仓库 https://blog.csdn.net/qq_30764991/article/details/80379365 步骤一:码云建立个远程仓库 步骤 ...

  9. Python中numpy的应用

    #创建ndarray import numpy as np nd = np.array([2,4,6,'])#numpy中默认ndarray的所有元素的数据类型是相同,如果数据的类型不同,会统一为统一 ...

  10. mysql 中文乱码 修改编码 utf8

    在安装完数据库的时候,先不要创建数据库,先去更改字符集设置. show variables like 'character%'; vim /etc/my.cnf   (注意 下面的字段文件内没有时,自 ...