diff --git "a/45\351\253\230\351\233\205\350\257\227/20240622_\346\234\215\345\212\241\347\256\241\347\220\206.md" "b/45\351\253\230\351\233\205\350\257\227/20240622_\346\234\215\345\212\241\347\256\241\347\220\206.md" new file mode 100644 index 0000000000000000000000000000000000000000..920ce591b85aeba73f4b8876ac681f65473b7d3b --- /dev/null +++ "b/45\351\253\230\351\233\205\350\257\227/20240622_\346\234\215\345\212\241\347\256\241\347\220\206.md" @@ -0,0 +1,39 @@ +# 服务管理 + +1. 什么是服务,与普通进程有什么区别? + + 进程是动态的,程序是静态的,进程是运行中的程序; + + 程序是一些保存在硬盘上的一些代码; + + 服务是程序,是后台运行的,响应用户或其它程序的请求,提供某种功能的程序,nginx响应用户的http请求,提供web服务 + +2. 如何管理服务 + + ​ 开启 systemctl start 服务 + + ​ 关闭 systemctl stop 服务 + + ​ 重启 systemctl restart 服务 + + 查看状态 systemctl status 服务 + + 重加载配置 systemctl reload 服务 + + 开机自启动 systemctl enalbe/disable 服务 + + * + + service 服务 操作选项 + + /etc/init.d/服务 操作选项 + + systemctl 操作选项 服务 + + * + +3. 如何添加新服务 + + apt 安装 + + 手动编译 \ No newline at end of file