标签:collate mys apache2 this 安装php7 bis front ldap 点击
参考并修正了一些步骤:https://www.php.cn/php-weizijiaocheng-416387.html
https://linux.cn/article-8760-1.html
ubuntu 16.04 # 已添加了163源
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.0
使用官方源进行安装,保持最新
sudo wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
sudo dpkg -i zabbix-release_3.2-1+xenial_all.deb
sudo apt-get update
sudo apt-get install -y zabbix-server-mysql zabbix-frontend-php
sudo apt-get install -y zabbix-agent
sudo mysql -u root -p
MariaDB [(none)]> CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY ‘admin‘; #数据库用户密码
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]> EXIT;
Bye
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix
sudo vim /etc/zabbix/zabbis_server.conf
搜索文件的 DBPassword 部分:
### Option: DBPassword
# Database password. Ignored for SQLite.
# Comment this line if no password is used.
#
# Mandatory: no
# Default:
# DBPassword=
取消注释 DBPassword= 这行,并添加在 MySQL 中创建的密码:
DBPassword=usr_strong_pwd
接下来,查找 DBHost= 这行并取消注释。
保存并退出。
取消注释 date.timezone 并设置正确的时区
sudo vim /etc/zabbix/apache.conf
php_value date.timezone Asia/Shanghai
sudo systemctl restart apache2
sudo systemctl start zabbix-server
sudo systemctl enable zabbix-server
检查 Zabbix 状态:
sudo systemctl status zabbix-server
添加php源
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.0-mysql php7.0-bcmath php7.0-mbstring php7.0-gd php7.0-xml php7.0-ldap
sudo systemctl restart apache2
请注意,在 Zabbix 中,主机的访问权限分配给用户组,而不是单个用户。
标签:collate mys apache2 this 安装php7 bis front ldap 点击
原文地址:https://blog.51cto.com/dldxzjr/2527282