{"id":285350,"date":"2023-10-18T20:07:56","date_gmt":"2023-10-18T12:07:56","guid":{"rendered":"https:\/\/lrxjmw.cn\/kszwlfwjzdjj.html"},"modified":"2023-10-18T20:07:56","modified_gmt":"2023-10-18T12:07:56","slug":"kszwlfwjzdjj","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/kszwlfwjzdjj.html","title":{"rendered":"\u5feb\u901f\u638c\u63e1Linux\u670d\u52a1\u52a0\u8f7d\u7684\u7edd\u4f73\u547d\u4ee4"},"content":{"rendered":"

\u672c\u6587\u5c06\u4ecb\u7ecdLinux<\/a>\u7cfb\u7edf<\/a>\u4e2d\u52a0\u8f7d\u670d\u52a1\u7684\u547d\u4ee4<\/a>\uff0c\u5e2e\u52a9\u8bfb\u8005\u66f4\u597d\u5730\u7ba1\u7406\u548c\u63a7\u5236\u7cfb\u7edf\u670d\u52a1\u3002<\/p>\n

1.\u542f\u52a8\u670d\u52a1\uff1a<\/b><\/p>\n

\u8981\u542f\u52a8\u4e00\u4e2a\u670d\u52a1\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl start \u670d\u52a1\u540d\n<\/pre>\n<\/p>\n

\u4f8b\u5982\uff0c\u8981\u542f\u52a8Apache\u670d\u52a1\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl start apache2\n<\/pre>\n<\/p>\n

2.\u505c\u6b62\u670d\u52a1\uff1a<\/b><\/p>\n

\u8981\u505c\u6b62\u4e00\u4e2a\u6b63\u5728\u8fd0\u884c\u7684\u670d\u52a1\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl stop \u670d\u52a1\u540d\n<\/pre>\n<\/p>\n

\u4f8b\u5982\uff0c\u8981\u505c\u6b62MySQL\u670d\u52a1\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl stop mysql\n<\/pre>\n<\/p>\n

3.\u91cd\u542f\u670d\u52a1\uff1a<\/b><\/p>\n

\u5982\u679c\u9700\u8981\u91cd\u542f\u4e00\u4e2a\u670d\u52a1\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl restart \u670d\u52a1\u540d\n<\/pre>\n<\/p>\n

\u4f8b\u5982\uff0c\u8981\u91cd\u542fNginx\u670d\u52a1\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl restart nginx\n<\/pre>\n<\/p>\n

4.\u67e5\u770b\u670d\u52a1\u72b6\u6001\uff1a<\/b><\/p>\n

\u8981\u67e5\u770b\u4e00\u4e2a\u670d\u52a1\u7684\u8fd0\u884c\u72b6\u6001\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl status \u670d\u52a1\u540d\n<\/pre>\n<\/p>\n

\u4f8b\u5982linux\u52a0\u8f7d\u670d\u52a1\u547d\u4ee4<\/strong>\uff0c\u8981\u67e5\u770bSSH\u670d\u52a1\u7684\u72b6\u6001\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl status sshd\n<\/pre>\n<\/p>\n

5.\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8\uff1a<\/b><\/p>\n

\u5982\u679c\u5e0c\u671b\u67d0\u4e2a\u670d\u52a1\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u81ea\u52a8\u8fd0\u884c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl enable \u670d\u52a1\u540d\n<\/pre>\n<\/p>\n

\u4f8b\u5982\uff0c\u8981\u8bbe\u7f6eTomcat\u5728\u5f00\u673a\u65f6\u81ea\u52a8\u542f\u52a8\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl enable tomcat\n<\/pre>\n<\/p>\n

6.\u7981\u6b62\u5f00\u673a\u81ea\u542f\u52a8\uff1a<\/b><\/p>\n

\u5982\u679c\u5e0c\u671b\u67d0\u4e2a\u670d\u52a1\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u4e0d\u81ea\u52a8\u8fd0\u884c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl disable \u670d\u52a1\u540d\n<\/pre>\n<\/p>\n

\u4f8b\u5982\uff0c\u8981\u7981\u6b62Cron\u670d\u52a1\u5728\u5f00\u673a\u65f6\u81ea\u52a8\u542f\u52a8\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl disable cron\n<\/pre>\n<\/p>\n

7.\u67e5\u770b\u5df2\u542f\u52a8\u7684\u670d\u52a1\uff1a<\/b><\/p>\n

\u8981\u67e5\u770b\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u542f\u52a8\u7684\u670d\u52a1\u5217\u8868\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl list-units --type=service --state=running\n<\/pre>\n<\/p>\n

8.\u67e5\u770b\u6240\u6709\u670d\u52a1\uff1a<\/b><\/p>\n

\u8981\u67e5\u770b\u7cfb\u7edf\u4e2d\u6240\u6709\u53ef\u7528\u7684\u670d\u52a1\u5217\u8868linux\u52a0\u8f7d\u670d\u52a1\u547d\u4ee4<\/strong>linux\u547d\u4ee4\u8be6\u89e3\u8bcd\u5178\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo systemctl list-unit-files --type=service\n<\/pre>\n<\/p>\n

9.\u67e5\u770b\u670d\u52a1\u65e5\u5fd7\uff1a<\/b><\/p>\n

\u8981\u67e5\u770b\u67d0\u4e2a\u670d\u52a1\u7684\u65e5\u5fd7\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\njournalctl -u\u670d\u52a1\u540d\n<\/pre>\n<\/p>\n

\u4f8b\u5982\uff0c\u8981\u67e5\u770bApache\u7684\u65e5\u5fd7\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

```<\/p>\n","protected":false},"excerpt":{"rendered":"

\u672c\u6587\u5c06\u4ecb\u7ecdLinux\u7cfb\u7edf\u4e2d\u52a0\u8f7d\u670d\u52a1\u7684\u547d\u4ee4\uff0c\u5e2e\u52a9\u8bfb\u8005\u66f4\u597d\u5730\u7ba1\u7406\u548c\u63a7\u5236\u7cfb\u7edf\u670d\u52a1\u3002\u5982\u679c\u5e0c\u671b\u67d0\u4e2a\u670d\u52a1\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u81ea\u52a8\u8fd0\u884c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a\u5982\u679c\u5e0c\u671b\u67d0\u4e2a\u670d\u52a1\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u4e0d\u81ea\u52a8\u8fd0\u884c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a\u8981\u67e5\u770b\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u542f\u52a8\u7684\u670d\u52a1\u5217\u8868\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a\u8981\u67e5\u770b\u7cfb\u7edf\u4e2d\u6240\u6709\u53ef\u7528\u7684\u670d\u52a1\u5217\u8868\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-285350","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/285350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=285350"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/285350\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=285350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=285350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=285350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}