ZABBIX-4.4 yum安装

一、选择Zabbix版本

1、打开zabbix官网地址<<https://www.zabbix.com/>>

二、部署zabbix4.4服务器

1、安装zabbix的yum源

[root@zhangxin ~]# ll /etc/yum.repos.d/
total 28
-rw-r--r--. 1 root root 1664 Dec  9  2015 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Dec  9  2015 CentOS-CR.repo
-rw-r--r--. 1 root root  649 Dec  9  2015 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  290 Dec  9  2015 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 Dec  9  2015 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Dec  9  2015 CentOS-Sources.repo
-rw-r--r--. 1 root root 1952 Dec  9  2015 CentOS-Vault.repo
[root@zhangxin ~]# 
[root@zhangxin ~]# 
[root@zhangxin ~]# rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
Retrieving https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
warning: /var/tmp/rpm-tmp.CJNNNd: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:zabbix-release-4.0-1.el7         ################################# [100%]
[root@zhangxin ~]# 
[root@zhangxin ~]# 
[root@zhangxin ~]# ll /etc/yum.repos.d/
total 32
-rw-r--r--. 1 root root 1664 Dec  9  2015 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Dec  9  2015 CentOS-CR.repo
-rw-r--r--. 1 root root  649 Dec  9  2015 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  290 Dec  9  2015 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 Dec  9  2015 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Dec  9  2015 CentOS-Sources.repo
-rw-r--r--. 1 root root 1952 Dec  9  2015 CentOS-Vault.repo
-rw-r--r--. 1 root root  410 Oct  2 00:34 zabbix.repo        #发现没有,就是多出来这个yum配置文件!
[root@zhangxin ~]# 
[root@zhangxin ~]# 

[root@zhangxin ~]# rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm

2、把原有的yum源更新成阿里云的源

 1 cd /etc/yum.repos.d/
 2 mkdir    /bak
 3 mv ./* bak
 4 #安装下载yum源
 5 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
 6 #下载epel源
 7 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
 8 #清空原本yum缓存
 9 yum clean all 
10 #生成新的阿里云的yum缓存,加速下载预热数据
11 yum makecache
12 [root@zhangxin yum.repos.d]# cat zabbix.repo.bak 
13 #这个源是官方地址,服务器在国外存放者,下载的时候速度可能会有点慢!
14 [zabbix]
15 name=Zabbix Official Repository - $basearch
16 baseurl=http://repo.zabbix.com/zabbix/4.4/rhel/7/$basearch/
17 enabled=1
18 gpgcheck=1
19 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
20 
21 [zabbix-non-supported]
22 name=Zabbix Official Repository non-supported - $basearch 
23 baseurl=http://repo.zabbix.com/non-supported/rhel/7/$basearch/
24 enabled=1
25 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
26 gpgcheck=1
27 [root@zhangxin yum.repos.d]# 
28 [root@zhangxin yum.repos.d]# 
29 [root@zhangxin yum.repos.d]# 
30 [root@zhangxin yum.repos.d]# 
31 [root@zhangxin yum.repos.d]# cat zabbix.repo
32 #这里我们换成阿里云的镜像,目的就是为了在下载的时候速度稍微快一点
33 [zabbix]
34 name=Zabbix Official Repository - $basearch
35 baseurl=https://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/7/$basearch/
36 enabled=1
37 gpgcheck=1
38 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
39 #换了上面的zabbix安装源地址,其组件地址也要记得换哟!
40 [zabbix-non-supported]
41 name=Zabbix Official Repository non-supported - $basearch 
42 baseurl=https://mirrors.aliyun.com/zabbix/non-supported/rhel/7/$basearch/
43 enabled=1
44 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
45 gpgcheck=1
46 [root@zhangxin yum.repos.d]#
47 [root@zhangxin yum.repos.d]# yum list | grep zabbix
48 zabbix-agent.x86_64                     4.4.0-0.5rc1.el7               @zabbix  
49 zabbix-get.x86_64                       4.4.0-0.5rc1.el7               @zabbix  
50 zabbix-release.noarch                   4.0-1.el7                      installed
51 zabbix-server-mysql.x86_64              4.4.0-0.5rc1.el7               @zabbix  
52 zabbix-web.noarch                       4.4.0-0.5rc1.el7               @zabbix  
53 zabbix-web-mysql.noarch                 4.4.0-0.5rc1.el7               @zabbix  
54 iksemel.x86_64                          1.4-2.el7.centos               zabbix-non-supported
55 iksemel-devel.x86_64                    1.4-2.el7.centos               zabbix-non-supported
56 iksemel-utils.x86_64                    1.4-2.el7.centos               zabbix-non-supported
57 pcp-export-pcp2zabbix.x86_64            4.3.2-3.el7_7                  updates  
58 pcp-export-zabbix-agent.x86_64          4.3.2-3.el7_7                  updates  
59 python-pyzabbix.noarch                  0.7.3-2.el7                    epel     
60 python2-zabbix-api-erigones.noarch      1.2.4-3.el7                    epel     
61 python36-zabbix-api-erigones.noarch     1.2.4-3.el7                    epel     
62 uwsgi-stats-pusher-zabbix.x86_64        2.0.17.1-2.el7                 epel     
63 zabbix-apache-conf.noarch               4.4.0-0.1alpha1.el7            zabbix   
64 zabbix-java-gateway.x86_64              4.4.0-0.5rc1.el7               zabbix   
65 zabbix-nginx-conf.noarch                4.4.0-0.5rc1.el7               zabbix   
66 zabbix-proxy-mysql.x86_64               4.4.0-0.5rc1.el7               zabbix   
67 zabbix-proxy-pgsql.x86_64               4.4.0-0.5rc1.el7               zabbix   
68 zabbix-proxy-sqlite3.x86_64             4.4.0-0.5rc1.el7               zabbix   
69 zabbix-release.noarch                   4.3-3.el7                      zabbix   
70 zabbix-sender.x86_64                    4.4.0-0.5rc1.el7               zabbix   
71 zabbix-server-pgsql.x86_64              4.4.0-0.5rc1.el7               zabbix   
72 zabbix-web-japanese.noarch              4.4.0-0.5rc1.el7               zabbix   
73 zabbix-web-pgsql.noarch                 4.4.0-0.5rc1.el7               zabbix 
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3、安装Zabbix服务器,前端,代理

yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

4、导入Zabbix数据到Mysql数据库

#创建用户:
mysql> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye

[root@zhangxin ~]# rpm -ql zabbix-server-mysql
/etc/logrotate.d/zabbix-server
/etc/zabbix/zabbix_server.conf
/usr/lib/systemd/system/zabbix-server.service
/usr/lib/tmpfiles.d/zabbix-server.conf
/usr/lib/zabbix/alertscripts
/usr/lib/zabbix/externalscripts
/usr/sbin/zabbix_server_mysql
/usr/share/doc/zabbix-server-mysql-4.4.0
/usr/share/doc/zabbix-server-mysql-4.4.0/AUTHORS
/usr/share/doc/zabbix-server-mysql-4.4.0/COPYING
/usr/share/doc/zabbix-server-mysql-4.4.0/ChangeLog
/usr/share/doc/zabbix-server-mysql-4.4.0/NEWS
/usr/share/doc/zabbix-server-mysql-4.4.0/README
/usr/share/doc/zabbix-server-mysql-4.4.0/create.sql.gz
/usr/share/man/man8/zabbix_server.8.gz
/var/log/zabbix
/var/run/zabbix
[root@zhangxin ~]# 
[root@zhangxin zabbix-server-mysql-4.4.0]# ll
总用量 9104
-rw-r--r-- 1 root root      98 10月  3 23:22 AUTHORS
-rw-r--r-- 1 root root 1040143 10月  3 23:22 ChangeLog
-rw-r--r-- 1 root root   17990 10月  3 23:22 COPYING
-rw-r--r-- 1 root root 8247402 10月  3 23:27 create.sql
-rw-r--r-- 1 root root      52 10月  3 23:22 NEWS
-rw-r--r-- 1 root root    1317 10月  3 23:22 README
[root@zhangxin zabbix-server-mysql-4.4.0]#  mysql -u zabbix -pzabbix -D zabbix < create.sql
[root@zhangxin ~]#
mysql -u zabbix -pzabbix -D zabbix < create.sql
  1 [root@zhangxin ~]# mysql -uroot -p
  2 Enter password: 
  3 Welcome to the MySQL monitor.  Commands end with ; or g.
  4 Your MySQL connection id is 169512
  5 Server version: 5.7.28 MySQL Community Server (GPL)
  6 
  7 Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
  8 
  9 Oracle is a registered trademark of Oracle Corporation and/or its
 10 affiliates. Other names may be trademarks of their respective
 11 owners.
 12 
 13 Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
 14 
 15 mysql> show databases;
 16 +--------------------+
 17 | Database           |
 18 +--------------------+
 19 | information_schema |
 20 | jumpserver         |
 21 | log                |
 22 | mysql              |
 23 | performance_schema |
 24 | sys                |
 25 | test               |
 26 | test2              |
 27 | webcron            |
 28 | zabbix             |
 29 +--------------------+
 30 10 rows in set (0.12 sec)
 31 
 32 mysql> use zabbix
 33 Reading table information for completion of table and column names
 34 You can turn off this feature to get a quicker startup with -A
 35 
 36 Database changed
 37 mysql> show tables;
 38 +----------------------------+
 39 | Tables_in_zabbix           |
 40 +----------------------------+
 41 | acknowledges               |
 42 | actions                    |
 43 | alerts                     |
 44 | application_discovery      |
 45 | application_prototype      |
 46 | application_template       |
 47 | applications               |
 48 | auditlog                   |
 49 | auditlog_details           |
 50 | autoreg_host               |
 51 | conditions                 |
 52 | config                     |
 53 | config_autoreg_tls         |
 54 | corr_condition             |
 55 | corr_condition_group       |
 56 | corr_condition_tag         |
 57 | corr_condition_tagpair     |
 58 | corr_condition_tagvalue    |
 59 | corr_operation             |
 60 | correlation                |
 61 | dashboard                  |
 62 | dashboard_user             |
 63 | dashboard_usrgrp           |
 64 | dbversion                  |
 65 | dchecks                    |
 66 | dhosts                     |
 67 | drules                     |
 68 | dservices                  |
 69 | escalations                |
 70 | event_recovery             |
 71 | event_suppress             |
 72 | event_tag                  |
 73 | events                     |
 74 | expressions                |
 75 | functions                  |
 76 | globalmacro                |
 77 | globalvars                 |
 78 | graph_discovery            |
 79 | graph_theme                |
 80 | graphs                     |
 81 | graphs_items               |
 82 | group_discovery            |
 83 | group_prototype            |
 84 | history                    |
 85 | history_log                |
 86 | history_str                |
 87 | history_text               |
 88 | history_uint               |
 89 | host_discovery             |
 90 | host_inventory             |
 91 | host_tag                   |
 92 | hostmacro                  |
 93 | hosts                      |
 94 | hosts_groups               |
 95 | hosts_templates            |
 96 | housekeeper                |
 97 | hstgrp                     |
 98 | httpstep                   |
 99 | httpstep_field             |
100 | httpstepitem               |
101 | httptest                   |
102 | httptest_field             |
103 | httptestitem               |
104 | icon_map                   |
105 | icon_mapping               |
106 | ids                        |
107 | images                     |
108 | interface                  |
109 | interface_discovery        |
110 | item_application_prototype |
111 | item_condition             |
112 | item_discovery             |
113 | item_preproc               |
114 | item_rtdata                |
115 | items                      |
116 | items_applications         |
117 | lld_macro_path             |
118 | maintenance_tag            |
119 | maintenances               |
120 | maintenances_groups        |
121 | maintenances_hosts         |
122 | maintenances_windows       |
123 | mappings                   |
124 | media                      |
125 | media_type                 |
126 | media_type_param           |
127 | opcommand                  |
128 | opcommand_grp              |
129 | opcommand_hst              |
130 | opconditions               |
131 | operations                 |
132 | opgroup                    |
133 | opinventory                |
134 | opmessage                  |
135 | opmessage_grp              |
136 | opmessage_usr              |
137 | optemplate                 |
138 | problem                    |
139 | problem_tag                |
140 | profiles                   |
141 | proxy_autoreg_host         |
142 | proxy_dhistory             |
143 | proxy_history              |
144 | regexps                    |
145 | rights                     |
146 | screen_user                |
147 | screen_usrgrp              |
148 | screens                    |
149 | screens_items              |
150 | scripts                    |
151 | service_alarms             |
152 | services                   |
153 | services_links             |
154 | services_times             |
155 | sessions                   |
156 | slides                     |
157 | slideshow_user             |
158 | slideshow_usrgrp           |
159 | slideshows                 |
160 | sysmap_element_trigger     |
161 | sysmap_element_url         |
162 | sysmap_shape               |
163 | sysmap_url                 |
164 | sysmap_user                |
165 | sysmap_usrgrp              |
166 | sysmaps                    |
167 | sysmaps_elements           |
168 | sysmaps_link_triggers      |
169 | sysmaps_links              |
170 | tag_filter                 |
171 | task                       |
172 | task_acknowledge           |
173 | task_check_now             |
174 | task_close_problem         |
175 | task_remote_command        |
176 | task_remote_command_result |
177 | timeperiods                |
178 | trends                     |
179 | trends_uint                |
180 | trigger_depends            |
181 | trigger_discovery          |
182 | trigger_tag                |
183 | triggers                   |
184 | users                      |
185 | users_groups               |
186 | usrgrp                     |
187 | valuemaps                  |
188 | widget                     |
189 | widget_field               |
190 +----------------------------+
191 149 rows in set (0.00 sec)
192 
193 mysql> 
登录MySQL服务器查看zabbix数据库是否生成了相应的表结构[root@zhangxin ~]# mysql -uroot -p

5、修改Zabbix-server配置文件

sed -i 's@#ServerName www.example.com:80@ServerName 127.0.0.1:80@' /etc/httpd/conf/httpd.conf
@设置时区
[root@zhangxin ~]# vim /etc/httpd/conf.d/zabbix.conf 
#
# Zabbix monitoring system php web frontend
#

Alias /zabbix /usr/share/zabbix

<Directory "/usr/share/zabbix">
    Options FollowSymLinks
    AllowOverride None
    Require all granted

    <IfModule mod_php5.c>
        php_value max_execution_time 300
        php_value memory_limit 128M
        php_value post_max_size 16M
        php_value upload_max_filesize 2M
        php_value max_input_time 300
        php_value max_input_vars 10000
        php_value always_populate_raw_post_data -1
        php_value date.timezone Asia/Shanghai             #注意,我修改了这一行内容,我把时区改成了亚洲/上海
    </IfModule>
</Directory>

<Directory "/usr/share/zabbix/conf">
    Require all denied
</Directory>

<Directory "/usr/share/zabbix/app">
    Require all denied
</Directory>

<Directory "/usr/share/zabbix/include">
    Require all denied
</Directory>

<Directory "/usr/share/zabbix/local">
    Require all denied
</Directory>
[root@zhangxin ~]# 
vim /etc/httpd/conf.d/zabbix.conf
@配置zabbix-server连接数据库
[root@zhangxin ~]# cp /etc/zabbix/zabbix_server.conf /etc/zabbix/zabbix_server.conf.`date +%F`
[root@zhangxin ~]# 
[root@zhangxin ~]# grep DBHost /etc/zabbix/zabbix_server.conf                    #这个是数据库的主机地址,默认是本机,咱们可以不修改。
### Option: DBHost
# DBHost=localhost
[root@zhangxin ~]#
[root@zhangxin ~]# grep DBName /etc/zabbix/zabbix_server.conf | grep -v ^#             #修改zabbix的数据库
DBName=zabbix
[root@zhangxin ~]# 
[root@zhangxin ~]# grep 'DBUser' /etc/zabbix/zabbix_server.conf | grep -v ^#            #修改数据库的用户名
DBUser=zabbix
[root@zhangxin ~]# 
[root@zhangxin ~]# grep 'DBPassword' /etc/zabbix/zabbix_server.conf | grep -v ^#          #修改数据库的密码
DBPassword=zabbix
[root@zhangxin ~]#
grep DBHost /etc/zabbix/zabbix_server.conf

6、配置Zabbix-agent

[root@zhangxin ~]# cp /etc/zabbix/zabbix_agentd.conf  /etc/zabbix/zabbix_agentd.conf.`date +%F`
[root@zhangxin ~]#
[root@zhangxin ~]# grep Server= /etc/zabbix/zabbix_agentd.conf |  grep -v ^#              #这里指定谁可以来这台agent获取数据
Server=127.0.0.1
[root@zhangxin ~]#
[root@zhangxin ~]# grep ServerActive= /etc/zabbix/zabbix_agentd.conf |  grep -v ^#           #和上面的功能类似,这里可以指定多台服务器来本地取数据
ServerActive=127.0.0.1
[root@zhangxin ~]# 
[root@zhangxin ~]# grep Hostname /etc/zabbix/zabbix_agentd.conf |  grep -v ^#              #指定服务器的主机名,我们可以不指定,如果没有指定的话默认就会用系统的主机名称。
Hostname=Zabbix server
[root@zhangxin ~]#
vim /etc/zabbix/zabbix_agentd.conf

7、启动服务

@启动zabbix-server
[root@zhangxin ~]# systemctl start zabbix-server.service 
[root@zhangxin ~]# systemctl status zabbix-server.service 
● zabbix-server.service - Zabbix Server
   Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
   Active: active (running) since 四 2019-10-31 09:10:19 CST; 4 days ago
  Process: 1275 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
 Main PID: 1436 (zabbix_server)
    Tasks: 38
   Memory: 41.8M
   CGroup: /system.slice/zabbix-server.service
           ├─1436 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
           ├─2208 /usr/sbin/zabbix_server: configuration syncer [synced configuration in 0.022851 sec, idle 60 sec]
           ├─2209 /usr/sbin/zabbix_server: housekeeper [deleted 60 hist/trends, 0 items/triggers, 0 events, 0 sessions, 0 alarms, 0 audit items, 0 records in 0.004162 se...
           ├─2210 /usr/sbin/zabbix_server: timer #1 [updated 0 hosts, suppressed 0 events in 0.000255 sec, idle 59 sec]
           ├─2211 /usr/sbin/zabbix_server: http poller #1 [got 0 values in 0.000377 sec, idle 5 sec]
           ├─2212 /usr/sbin/zabbix_server: discoverer #1 [processed 0 rules in 0.000378 sec, idle 60 sec]
           ├─2213 /usr/sbin/zabbix_server: history syncer #1 [processed 1 values, 2 triggers in 0.002452 sec, idle 1 sec]
           ├─2214 /usr/sbin/zabbix_server: history syncer #2 [processed 0 values, 0 triggers in 0.000020 sec, idle 1 sec]
           ├─2215 /usr/sbin/zabbix_server: history syncer #3 [processed 0 values, 0 triggers in 0.000016 sec, idle 1 sec]
           ├─2216 /usr/sbin/zabbix_server: history syncer #4 [processed 0 values, 0 triggers in 0.000022 sec, idle 1 sec]
           ├─2217 /usr/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000521 sec, idle 3 sec]
           ├─2218 /usr/sbin/zabbix_server: proxy poller #1 [exchanged data with 0 proxies in 0.000020 sec, idle 5 sec]
           ├─2219 /usr/sbin/zabbix_server: self-monitoring [processed data in 0.000017 sec, idle 1 sec]
           ├─2220 /usr/sbin/zabbix_server: task manager [processed 0 task(s) in 0.000208 sec, idle 5 sec]
           ├─2221 /usr/sbin/zabbix_server: poller #1 [got 0 values in 0.000010 sec, idle 1 sec]
           ├─2222 /usr/sbin/zabbix_server: poller #2 [got 1 values in 0.001175 sec, idle 1 sec]
           ├─2223 /usr/sbin/zabbix_server: poller #3 [got 0 values in 0.000009 sec, idle 1 sec]
           ├─2224 /usr/sbin/zabbix_server: poller #4 [got 0 values in 0.000010 sec, idle 1 sec]
           ├─2225 /usr/sbin/zabbix_server: poller #5 [got 0 values in 0.000009 sec, idle 1 sec]
           ├─2226 /usr/sbin/zabbix_server: unreachable poller #1 [got 0 values in 0.000021 sec, idle 5 sec]
           ├─2228 /usr/sbin/zabbix_server: trapper #1 [processed data in 0.000179 sec, waiting for connection]
           ├─2229 /usr/sbin/zabbix_server: trapper #2 [processed data in 0.000082 sec, waiting for connection]
           ├─2230 /usr/sbin/zabbix_server: trapper #3 [processed data in 0.000165 sec, waiting for connection]
           ├─2231 /usr/sbin/zabbix_server: trapper #4 [processed data in 0.000178 sec, waiting for connection]
           ├─2232 /usr/sbin/zabbix_server: trapper #5 [processed data in 0.000165 sec, waiting for connection]
           ├─2233 /usr/sbin/zabbix_server: icmp pinger #1 [got 0 values in 0.000044 sec, idle 5 sec]
           ├─2234 /usr/sbin/zabbix_server: alert manager #1 [sent 0, failed 0 alerts, idle 5.005917 sec during 5.005960 sec]
           ├─2235 /usr/sbin/zabbix_server: alerter #1 [sent 0, failed 0 alerts, idle 93376.635401 sec during 93376.946344 sec]
           ├─2236 /usr/sbin/zabbix_server: alerter #2 [sent 0, failed 0 alerts, idle 98.865338 sec during 99.202800 sec]
           ├─2239 /usr/sbin/zabbix_server: alerter #3 [sent 0, failed 0 alerts, idle 93474.792468 sec during 93475.148610 sec]
           ├─2241 /usr/sbin/zabbix_server: preprocessing manager #1 [queued 0, processed 18 values, idle 5.010685 sec during 5.010825 sec]
           ├─2242 /usr/sbin/zabbix_server: preprocessing worker #1 started
           ├─2243 /usr/sbin/zabbix_server: preprocessing worker #2 started
           ├─2244 /usr/sbin/zabbix_server: preprocessing worker #3 started
           ├─2247 /usr/sbin/zabbix_server: lld manager #1 [processed 0 LLD rules during 5.007690 sec]
           ├─2248 /usr/sbin/zabbix_server: lld worker #1 [processed 1 LLD rules, idle 3445.682791 sec during 3445.694944 sec]
           ├─2250 /usr/sbin/zabbix_server: lld worker #2 [processed 1 LLD rules, idle 156.559386 sec during 156.567613 sec]
           └─2251 /usr/sbin/zabbix_server: alert syncer [queued 0 alerts(s), flushed 0 result(s) in 0.000456 sec, idle 1 sec]

10月 31 09:10:16 zhangxin systemd[1]: Starting Zabbix Server...
10月 31 09:10:19 zhangxin systemd[1]: Started Zabbix Server.
[root@zhangxin ~]# 
systemctl start zabbix-server.service
@启动zabbix-agent
[root@zhangxin ~]# systemctl start zabbix-agent.service  
[root@zhangxin ~]# systemctl status zabbix-agent.service  
● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
   Active: active (running) since 四 2019-10-31 09:10:17 CST; 4 days ago
  Process: 1273 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
 Main PID: 1313 (zabbix_agentd)
    Tasks: 6
   Memory: 93.7M
   CGroup: /system.slice/zabbix-agent.service
           ├─1313 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
           ├─1330 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
           ├─1331 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
           ├─1332 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
           ├─1333 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
           └─1334 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]

10月 31 09:10:16 zhangxin systemd[1]: Starting Zabbix Agent...
10月 31 09:10:17 zhangxin systemd[1]: Started Zabbix Agent.
[root@zhangxin ~]# 
systemctl start zabbix-agent.service
@启动http服务
[root@zhangxin ~]# systemctl start httpd.service 
[root@zhangxin ~]# systemctl status httpd.service 
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since 四 2019-10-31 09:08:37 CST; 4 days ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 46820 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
 Main PID: 1277 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
    Tasks: 11
   Memory: 154.6M
   CGroup: /system.slice/httpd.service
           ├─ 1277 /usr/sbin/httpd -DFOREGROUND
           ├─46860 /usr/sbin/httpd -DFOREGROUND
           ├─46862 /usr/sbin/httpd -DFOREGROUND
           ├─46863 /usr/sbin/httpd -DFOREGROUND
           ├─46864 /usr/sbin/httpd -DFOREGROUND
           ├─46871 /usr/sbin/httpd -DFOREGROUND
           ├─46877 /usr/sbin/httpd -DFOREGROUND
           ├─52115 /usr/sbin/httpd -DFOREGROUND
           ├─52232 /usr/sbin/httpd -DFOREGROUND
           ├─59506 /usr/sbin/httpd -DFOREGROUND
           └─63971 /usr/sbin/httpd -DFOREGROUND

10月 31 09:10:16 zhangxin systemd[1]: Starting The Apache HTTP Server...
10月 31 09:08:37 zhangxin systemd[1]: Started The Apache HTTP Server.
11月 03 03:16:01 zhangxin systemd[1]: Reloading The Apache HTTP Server.
11月 03 03:16:02 zhangxin systemd[1]: Reloaded The Apache HTTP Server.
[root@zhangxin ~]# 
[root@zhangxin ~]# systemctl start httpd.service

原文地址:https://www.cnblogs.com/Mr-Axin/p/11792789.html