开机启动

Nginx 开机启动

对着背影说爱祢 提交于 2019-12-09 20:32:26
本文摘自: http://www.01happy.com/centos-nginx-shell-chkconfig/ 在安装完nginx后,重新启动需要“kill -HUP nginx进程编号”来进行重新加载,显然十分不方便。如果能像apache一样,直接通过脚本进行管理就方便多了。 nginx官方早就想好了,也提供了这个脚本,地址:http://wiki.nginx.org/RedHatNginxInitScript。这里将管理脚本收录在这里: 启动脚本有坑,nginx reload 和stop的时候是直接用killproc 干掉进程的,应该用nginx -s reload 和nginx -s stop 完整脚本如下 #!/bin/sh # # nginx - this script starts and stops the nginx daemin # # chkconfig: - 85 15 # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ # proxy and IMAP/POP3 proxy server # processname: nginx # config: /www/wdlinux/nginx/conf/nginx.conf # pidfile: /www/wdlinux/nginx

Windows下架设SVN服务器并设置开机启动

最后都变了- 提交于 2019-12-06 21:51:14
1、安装SVN服务器 ,到 http://subversion.apache.org/packages.html Subversion for Windows 下载windows版的SVN,并安装,在命令行下运行svn命令,如下所以,则svn服务器安装成功。 C:\Documents and Settings\Administrator>svn 使用“svn help”得到用法。           2、创建仓库Repository :运行命令 ( 注意:单仓库和多仓库模式——可参考文档SVN教程 ) C:\Documents and Settings\Administrator>svnadmin create G:\svn 该命令会在G盘下自动创建一个名字为svn的文件夹,该文件中的内容如非必要,不要手动修改,其内容是由svn自动维护的,各自得用途: conf里文件夹中都是这个仓库的配置文件。 db是真正用来存储数据版本的地方。 hooks文件夹中的内容用以定义某些动作触发的hook脚本。 locks中的文件用于在某些分支或者文件上加锁。    3、创建用户 :进入conf目录(本例中是G:\svn\conf),打开svnserve.conf文件,找到如下内容: [general] ### These options control access to the

PostgreSQL数据文件权限不对导致开机启动失败

时光毁灭记忆、已成空白 提交于 2019-12-02 22:53:43
上午开发告知机子重启后DB连接不了了,登进去一开,确实,进程啥的都没有起来。 手工启动: [postgres @develop ~]$ pg_start server starting [postgres @develop ~]$ps -ef|grep postgres 发现还是没起来,查看日志,里面有如此报错信息: [postgres @develop ~]$ tail -f pg_log FATAL: data directory "/home/postgres/data" has wrong ownership HINT: The server must be started by the user that owns the data directory. FATAL: data directory "/home/postgres/data" has wrong ownership HINT: The server must be started by the user that owns the data directory. FATAL: data directory "/home/postgres/data" has wrong ownership HINT: The server must be started by the user that owns the

CentOS7设置开机启动

左心房为你撑大大i 提交于 2019-11-29 06:48:34
‍ vi /etc/rc.local 在文件末尾加入程序的启动脚本 但使用CentOS7后发现程序并未开机启动。执行如下命令就好了 ‍ chmod +x /etc/rc .d /rc . local 具体原因可以都这篇文章: 戳我 文章中 强烈建议创建自己的systemd服务或udev规则来在开机时运行脚本。 ‍ ‍ 创建自己的systemd服务可以读读这篇文章: ‍ ‍ http://www.centoscn.com/CentOS/config/2015/0507/5374.html 来源: oschina 链接: https://my.oschina.net/u/2374253/blog/521228

centos自定义服务并加入开机启动

折月煮酒 提交于 2019-11-28 09:56:43
在 /etc/init.d/ 加入 workerman 文件(自定义服务,其实就是一个bash脚本),注意不要 .sh 后缀; 内部的 start() 这个函数会开机启动,配合 chkconfig workerman on 使用,注意引用绝对路径命令。 ###一、脚本内容 #!/bin/bash #chkconfig: 2345 70 30 #description: workerman command #关于脚本的简短描述 #processname: workerman start() { cd /data/wwwroot/web/workman/http /usr/local/php/bin/php http.php start -d } stop(){ cd /data/wwwroot/web/workman/http /usr/local/php/bin/php http.php stop } case "$1" in start) cd /data/wwwroot/web/workman/http /usr/local/php/bin/php http.php start -d echo "Starting WorkerMan..." ;; stop) cd /data/wwwroot/web/workman/http /usr/local/php/bin/php