\u6ce8\u610f\u6587\u4ef6\u8def\u5f84<\/strong><\/p>\n\n\n\nvim \/lib\/systemd\/system\/nginx.service<\/p>\n\n\n\n
[Unit]<\/p>\n\n\n\n
Description=nginx<\/p>\n\n\n\n
After=network.target<\/p>\n\n\n\n
[Service]<\/p>\n\n\n\n
Type=forking<\/p>\n\n\n\n
ExecStart=\/itops\/nginx\/sbin\/nginx -c \/itops\/nginx\/conf\/nginx.conf<\/p>\n\n\n\n
ExecReload=\/itops\/nginx\/sbin\/nginx -s reload<\/p>\n\n\n\n
ExecStop=\/itops\/nginx\/sbin\/nginx -s quit<\/p>\n\n\n\n
PrivateTmp=true<\/p>\n\n\n\n
[Install]<\/p>\n\n\n\n
WantedBy=multi-user.target<\/p>\n\n\n\n
\u7136\u540e\u7ed9\u811a\u672c\u6267\u884c\u6743\u9650\uff0cchmod 755
\/lib\/systemd\/system\/nginx.service<\/p>\n\n\n\n
\u81ea\u542f systemctl enable nginx.service \u6216 chkconfig nginx on<\/p>\n\n\n\n
\u6587\u7b2c\u4e8c\u6b65\uff1a\u914d\u7f6e\u6587\u4ef6\u8def\u5f84<\/h3>\n\n\n\n
\u5728\u914d\u7f6e\u6587\u4ef6nginx.conf\u914d\u7f6e\u4ee5\u4e0b\u6587\u4ef6\u5b58\u653e\u8def\u5f84\uff0c\u56fe\u4e0b\u610f\u601d\u662f\u5728\/\u76ee\u5f55\u65b0\u589e\u4e00\u4e2aagent\u6587\u4ef6\u5939\uff0c\u4e4b\u540e\u9700\u8981\u628a\u6587\u4ef6\u653e\u5230\u8fd9\u4e2a\u6587\u4ef6\u4e0b<\/p>\n\n\n\n
<\/figure>\n\n\n\n\u4fdd\u5b58\u540e\uff0c\u9700\u8981\u91cd\u542fnginx\u624d\u80fd\u751f\u6548\uff0c\u5728\u91cd\u542f\u524d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6d4b\u8bd5\u4e00\u4e0b\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u6b63\u5e38\uff0c\u5982\u6709\u62a5\u9519\uff0c\u4f1a\u63d0\u793a\u5728\u7b2c\u51e0\u884c\u7684\u914d\u7f6e\u6709\u8bef\uff01<\/p>\n\n\n\n
\/itops\/nginx\/sbin\/nginx -t<\/p>\n\n\n\n
nginx: the configuration file \/itops\/nginx\/conf\/nginx.conf syntax is ok<\/p>\n\n\n\n
nginx: configuration file \/itops\/nginx\/conf\/nginx.conf test is successful<\/p>\n\n\n\n
\u7b2c\u4e09\u6b65\uff1a\u6d4b\u8bd5\u5b89\u88c5<\/strong><\/p>\n\n\n\n\u628a\u9700\u8981\u6267\u884c\u7684\u6587\u4ef6\u653e\u5230\u7b2c\u4e8c\u6b65\u914d\u7f6e\/agent\u76ee\u5f55<\/p>\n\n\n\n
<\/span>
\n
<\/p>\n<\/div><\/div>\n\n\n\n
\u6587\u4ef6\u53ef\u4ee5\u662f\u6267\u884c\u811a\u672c\uff0c\u4e5f\u53ef\u4ee5\u662f\u538b\u7f29\u5305\u6216\u8005\u662frpm\u5305\uff0c\u8fd9\u91cc\u4e3e\u4f8b\u4e3a\u5b89\u88c5zabbix_agentd<\/strong>\u514d\u7f16\u8bd1\u7248\uff0c\u5229\u7528\u5236\u4f5c\u7684zabbix_agent\u5b89\u88c5\u76f8\u5173\u6587\u4ef6\u53ca\u914d\u7f6e\u5b89\u88c5\u3002<\/p>\n\n\n\n\u5982\u679c\u4e0d\u662f\u76f4\u63a5\u7684\u811a\u672c\u6587\u4ef6\uff0c\u786e\u4fdd\u538b\u7f29\u5305\u91cc\u9762\u6709\u5b89\u88c5\u6267\u884c\u7684shell\u6587\u4ef6<\/p>\n\n\n\n
<\/figure>\n\n\n\n\u7136\u540e\u5230\u4efb\u610f\u7684linux\u4e3b\u673a\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6267\u884c\u5b89\u88c5\uff1a<\/p>\n\n\n\n
curl -O http:\/\/nginx\u4e3b\u673aip\/agent\/linux_agent.tar && tar -xf linux_agent.tar && cd linux_agent && sh install_agent.sh install<\/p>\n\n\n\n
<\/figure>\n\n\n\n\u5b89\u88c5\u5b8c\u6210<\/h2>\n\n\n\n
<\/figure>\n\n\n\n\u68c0\u67e5\u7aef\u53e3<\/h2>\n\n\n\n
<\/figure>\n\n\n\n\u68c0\u67e5\u8fdb\u7a0b<\/h2>\n\n\n\n
<\/figure>\n\n\n\n\u6d4b\u8bd5\u6210\u529f\uff01<\/h2>\n\n\n\n
\u66f4\u591azabbix\u6280\u672f\u6587\u7ae0\uff0c\u8bf7\u5173\u6ce8\u4e50\u7ef4\u793e\u533a\uff1ahttps:\/\/forum.lwops.cn\/<\/p>\n","protected":false},"excerpt":{"rendered":"
\u5229\u7528Nginx\u5b9e\u73b0\u514d\u4e0a\u4f20\u5b89\u88c5zabbix agent<\/p>\n","protected":false},"author":1,"featured_media":12758,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"themepark_post_bcolor":"#f5f5f5","themepark_post_width":"1022px","themepark_post_img":"","themepark_post_img_po":"left","themepark_post_img_re":false,"themepark_post_img_cover":false,"themepark_post_img_fixed":false,"themepark_post_hide_title":false,"themepark_post_main_b":"","themepark_post_main_p":100,"themepark_paddingblock":false,"footnotes":""},"categories":[21,1],"tags":[32,196,197],"class_list":["post-10431","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","category-uncategorized","tag-zabbix","tag-zabbixaz","tag-zmazzabbixagent"],"metadata":{"_edit_lock":["1663296030:1"],"_edit_last":["1"],"catce":["sidebar-widgets4"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_yoast_wpseo_wordproof_timestamp":[""],"views":["6797"],"_thumbnail_id":["12758"],"ig_es_is_post_notified":["1"],"themepark_seo_title":["zabbix agent\u600e\u4e48\u514d\u4e0a\u4f20\u5b89\u88c5"],"themepark_seo_description":["\u5229\u7528Nginx\u5b9e\u73b0\u514d\u4e0a\u4f20\u5b89\u88c5zabbix agent"],"themepark_seo_keyword":["zabbix,zabbix\u5b89\u88c5,zabbix agent\u5b89\u88c5\r\n"],"_yoast_wpseo_primary_category":["21"],"_yoast_wpseo_focuskw":["zabbix agent\u5b89\u88c5"],"_yoast_wpseo_linkdex":["43"]},"yoast_head":"\n
\u5229\u7528Nginx\u5b9e\u73b0\u514d\u4e0a\u4f20\u5b89\u88c5zabbix agent - \u4e50\u7ef4\u5b98\u7f51<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n