/etc/init.d# ./redis-server start
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的更多相关文章
- 虚拟机centOS中安装Redis,主机Redis Destop Manager不能访问虚拟机Redis server的解决方案
今天在学些redis的时候碰到个问题,发现主机Redis Destop Manager不能访问虚拟机Redis server的解决方案,找了一些网上的资料,原因可能有两个,整理记录下来: 1. Red ...
- C# Redis Server分布式缓存编程 --网络转载
这篇文章我将介绍如果用最简洁的方式配置Redis Server, 以及如何使用C#和它交互编程 一. 背景介绍 Redis是最快的key-value分布式缓存之一 缺点: 没有本地数据缓冲, 目前还没 ...
- 本地计算机 上的 Redis Server 服务启动后停止
服务器上Redis服务安装正常..却启动不了.. 报错 : 本地计算机 上的 Redis Server 服务启动后停止.某些服务在未由其他服务或程序使用时将自动停止. 最后发现是Redis的配置 ...
- 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 ...
- redis客户端连接服务端the version of redis server is too low to support this function错误
redis作为一个内存数据库,使用得当可以大大的提升系统运行的效率,据说能读的速度是110000次/s,写的速度是81000次/s,我们的其中一个系统就用到了这个. 由于之前负责这个的同事离职,只好临 ...
- mac上配置mysql与redis server,并结合Pydev准备某爬虫环境
mysql下安装mysql server mysql下安装redis server:https://www.jianshu.com/p/3bdfda703552 mac下安装配置redis:https ...
- Redis server went away的解决方案
Redis server went away出现的问题如下: 1.看redis服务是否启动,包括端口 2.看是否是服务器端的防火墙引起的,iptables和selinux 3.看是否是redis.co ...
- 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 ...
- Linux 下安装 Redis server
版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/defonds/article/details/30047611 本文简介了 Linu ...
- C# Redis Server分布式缓存编程(一)(转)
出处:http://www.cnblogs.com/davidgu/p/3262571.html 这篇文章我将介绍如果用最简洁的方式配置Redis Server, 以及如何使用C#和它交互编程 一. ...
随机推荐
- FFmpeg SDK开发模型之中的一个:解码器
简单介绍 本例解说了怎样使用ffmpeg SDK解码媒体文件: 參考源代码是ffmpeg 自带的apiexample.c 一.源代码#include <stdlib.h>#include ...
- 使用 VS Code 搭建 TypeScript 开发环境
使用 VS Code 搭建 TypeScript 开发环境 TypeScript 是 JavaScript 的超集,TypeScript 只是增强了 JavaScript 而非改变了 JavaScri ...
- Markov Chain Monte Carlo Simulation using C# and MathNet
Math.Net Numerics has capability to conduct Markov Chair Monte Carlo simulations, yet the document i ...
- R语言模型选择之精度准则与最大值法问题
在模型选择中我们一般用caret包train函数建立模型,并对模型进行评判 方法1: ) tr_control<-trainControl(method = ) # 创建随机森林模型 model ...
- linux 防止误操作 mysql 数据库技巧
mysql 帮助说明 1[oldboy_c64 ~]# mysql --help|grep dummy 2 -U, --i-am-a-dummy Synonym for option --safe-u ...
- 连接数据库出现错误:1045-Access denied for user 'root'@'localhost'解决方法
Navicat for MySQL 链接: https://pan.baidu.com/s/1slwQxVB 密码: r737 1.出现这个问题的原因之一是权限的问题,也就是说你的电脑可能没有权限访问 ...
- 【Git】error: RPC failed; HTTP 413 curl 22 The requested URL returned error:413 Request Entity Too Large
error: RPC failed; HTTP 413 curl 22 The requested URL returned error:413 Request Entity Too Large fa ...
- Zabbix--01 介绍及安装
目录 一. 监控知识基本概述 1.为什么要使用监控 2.如何进行监控,比如我们需要监控磁盘的使用率 3.流行的监控工具 4.如果去到一家新公司,如何入手监控 二. 单机时代如何监控 三. zabbix ...
- spring boot filter -Autowired
需求:在SpringBoot实现拦截器,并且需要自定义的filter类型自动装配一些对象 自定义的过滤器类 public class SessionExpireFilter implements Fi ...
- php内置函数分析之strpos()
PHP_FUNCTION(strpos) { zval *needle; zend_string *haystack; char *found = NULL; ]; zend_long offset ...