页面“Debian 添加自启动服务”与“Php相关软件”之间的差异

来自linux中国网wiki
(页面间的差异)
跳到导航 跳到搜索
docker>Evan
 
docker>Evan
 
第1行: 第1行:
== update-rc.d 方式==
+
= 日志=
<pre>在基于Debian的发行版中你可以使用 update-rc.d:
+
php-syslog-ng
update-rc.d mysql defaults
 
sudo update-rc.d  mysql  start 20 3 4 5 . stop 20 0 1 2 6 .
 
  
run 'update-rc.d -f uwsgi defaults', or use the appropriate command on your
+
[https://www.oschina.net/p/seaslog PHP 日志扩展 SeasLog]
  
sudo service mysql start
+
[[category:php]]
sudo python manage.py runserver 192.168.1.158:80
 
</pre>
 
== systemctl方式==
 
<pre>
 
如何激活服务并在启动时启用或禁用服务(即系统启动时自动启动服务)
 
#启动
 
systemctl enable  vsftpd
 
# systemctl enable ssh.service
 
# systemctl disable ssh.service
 
 
 
systemctl is-active ssh.service # 这个 试过不可以 一开始还以为是查看
 
 
 
 
 
如何屏蔽(让它不能启动)或显示服务(如 httpd.service)
 
# systemctl mask httpd.service
 
ln -s '/dev/null' '/etc/systemd/system/httpd.service'
 
# systemctl unmask httpd.service
 
rm '/etc/systemd/system/httpd.service'
 
</pre>
 
 
 
==参考==
 
MariaDB的自动启动与停止
 
https://mariadb.com/kb/zh-cn/iniciando-e-parando-mariadb-automaticamente/
 
 
 
http://wenzhixin.net.cn/2013/10/30/debian_script_init
 
 
 
http://www.cnblogs.com/ac1985482/p/4046355.html
 
 
 
 [[category:ops]]  [[category:linux]]
 

2019年2月20日 (三) 03:57的版本

日志

php-syslog-ng

PHP 日志扩展 SeasLog