workman项目设置开机自启动
https://blog.csdn.net/xxq929604980/article/details/78558317
http://man.linuxde.net/chkconfig
1.脚本编写
1.2.脚本前三行注释是注册服务所必须的,可以改参数,设置好php安装路径,项目跟路径,启动文件即可
- #!/bin/bash
- #chkconfig:2345 90 10
- #description:activitytask service
- #processname:activitytask
- php=/usr/bin/php
- root_path="/vagrant/activity_task/"
- start_file="web_start.php"
- case "$1" in
- start)
- echo 'starting activity_task web_start.php'
- echo "$php ${root_path}${start_file} start -d"
- $php ${root_path}${start_file} start -d
- ;;
- stop)
- echo "stoping activity_task...web_start.php"
- echo "$php ${root_path}${start_file} stop"
- $php ${root_path}${start_file} stop
- ;;
- status)
- echo "status activity_task...web_start.php"
- echo "$php ${root_path}${start_file} status"
- $php ${root_path}${start_file} status
- ;;
- restart)
- echo "restarting activity_task...web_start.php"
- echo "$php ${root_path}${start_file} reload"
- $php ${root_path}${start_file} reload
- ;;
- *)
- echo "Usage: $0 {start|stop|restart|restart}"
- exit 1
- ;;
- esac
1.2 配置开机自启动
1.配置文件可执行,chmod +x service_name(假设脚本文件命名为service_name)
2.设置服务的运行级别,默认2345.所以选择默认即可。
chkconfig service_name on
--------------------- 本文来自 带风带不走 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/xxq929604980/article/details/78558317?utm_source=copy
workman项目设置开机自启动的更多相关文章
- Fedora 16设置开机自启动程序与Ubuntu的区别
Ubuntu设置开机自启动脚本的方法是:修改/etc/init.d/rc.local这个文件,添加需要启动的程序即可,相关函数如下: void SetSysAutoBoot() { ] = {}; ; ...
- linux_设置开机自启动程序脚本
设置开机自启动
- Linux服务器,服务管理--systemctl命令详解,设置开机自启动
Linux服务器,服务管理--systemctl命令详解,设置开机自启动 syetemclt就是service和chkconfig这两个命令的整合,在CentOS 7就开始被使用了. 摘要: syst ...
- CentOS 6下 Oracle11gR2 设置开机自启动
[1] 更改/etc/oratab # This file is used by ORACLE utilities. It is created by root.sh # and updated by ...
- Ubuntu14.04设置开机自启动脚本
方法一.编辑rc.loacl脚本 Ubuntu开机之后会执行/etc/rc.local文件中的脚本,所以我们可以直接在/etc/rc.local中添加启动脚本.在 exit 0 前面添加好脚本代码, ...
- 设置开机自启动VirtualBox虚拟机系统
如果常用VirtualBox虚拟机系统的话,设置个随开机启动也是很方便的.不需要打开VirtualBox窗口,直接就是系统启动了. 又继续上网搜索学习了.(设置开机自启动VirtualBox虚拟机系统 ...
- CentOS7设置开机自启动命令大全
任务 旧指令 新指令 使某服务自动启动 chkconfig --level 3 httpd on systemctl enable httpd.service 使某服务不自 ...
- ntp服务设置开机自启动失败
设置了ntpd开机自启动,重启服务器ntpd没有自启动 1.需要禁掉chronyd.service: systemctl disable chronyd.service 2.手动启动ntpd: sys ...
- CentOS7设置开机自启动方式
方式一: # 在/etc/rc.d/rc.local文件中追加启动命令,该文件追加后,会随着机器自动后,自动运行文件中的命令 # vim /etc/rc.d/rc.local # 权限问题:在cent ...
随机推荐
- Deepin 系统下安装VMware并激活
1.打开深度商店:搜索VMware,并下载安装. 2.打开启动器:点击VMware-install. 3.填写管理员密码. 4.下一步,完成安装. 5.打开VMware Workstation,输入密 ...
- 电子商务(电销)平台中订单模块(Order)数据库设计明细(转)
以下是自己在电子商务系统设计中的订单模块的数据库设计经验总结,而今发表出来一起分享,如有不当,欢迎跟帖讨论~ 订单表 (order)|-- 自动编号(order_id, 自增长主键)|-- 订单单号( ...
- Halcon 彩色图片通道分割处理
1.RGB通道:R红色,G绿色,B蓝色:R.G.B各占一个字节,取值范围在0—255:可代表的颜色数256*256*256==2^24 黑色区域是:R=G=B=0; 白色区域是:R=G=B=255 ...
- 框架源码系列三:手写Spring AOP(AOP分析、AOP概念学习、切面实现、织入实现)
一.AOP分析 问题1:AOP是什么? Aspect Oriented Programming 面向切面编程,在不改变类的代码的情况下,对类方法进行功能增强. 问题2:我们需要做什么? 在我们的框架中 ...
- C# 移除Response Header,403调整返回为404Make IIS return a 404 status code instead of 403
Server Information Revealed For the benefit of those who land here through a google/bing search:: He ...
- OEL的下载
https://edelivery.oracle.com 注意的是:第一次下载安装的时候需要首先安装installer.exe软件,然后再下载即可.
- linux下用php将doc、ppt转图片
解决方案分成两步: (1)调用unoconv命令将 doc.ppt 转 pdf (2)使用 imagemagick将 pdf 转图片 步骤 1.安装unoconv sudo apt-get insta ...
- [Ubuntu] Git可视化比较工具 P4Merge 的安装/配置及使用
1 下载 下载地址. 链接到上面的下载页后,先找到左边导航的 Clients ,如下图 1 所示. 接着找到 P4Merge: Visual Merge Tool , 如下图 2 所示. 最后,选择好 ...
- PXC 57 二进制安装
1.准备阶段 1.1 在三个节点上分别创建:用户组 用户组 目录 --用户组 用户组 #/usr/sbin/groupadd mysql #/usr/sbin/useradd -g mysql mys ...
- Nginx子域名配置
extends:http://blog.csdn.net/xiaoping0915/article/details/53899465 ,http://www.myhack58.com/Article/ ...