|
本帖最后由 openwrt-w 于 2020-3-3 14:53 编辑
效果展示
玩客云应用第三篇
一、安装准备
二、安装过程
- apt update && apt upgrade
复制代码 2.安装zabbix源
- # wget https://repo.zabbix.com/zabbix/4.4/raspbian/pool/main/z/zabbix-release/zabbix-release_4.4-1+stretch_all.deb
- # dpkg -i zabbix-release_4.4-1+stretch_all.deb
- # apt update
复制代码 3.安装zabbix server、zaabix-agent等软件
- #apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-agent -y
复制代码 4.安装数据库
- #apt install mariadb-server -y
- #systemctl enable mysql
- #systemctl start mysql
复制代码 5.数据库初始化
- root@zabbix:~# mysql_secure_installation
- NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
- SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
- In order to log into MariaDB to secure it, we'll need the current
- password for the root user. If you've just installed MariaDB, and
- you haven't set the root password yet, the password will be blank,
- so you should just press enter here.
- Enter current password for root (enter for none):
- OK, successfully used password, moving on...
- Setting the root password ensures that nobody can log into the MariaDB
- root user without the proper authorisation.
- Set root password? [Y/n] y #设置数据库密码选(Y)
- New password:
- Re-enter new password:
- Password updated successfully!
- Reloading privilege tables..
- ... Success!
- By default, a MariaDB installation has an anonymous user, allowing anyone
- to log into MariaDB without having to have a user account created for
- them. This is intended only for testing, and to make the installation
- go a bit smoother. You should remove them before moving into a
- production environment.
- Remove anonymous users? [Y/n] y #删除匿名用户(Y)
- ... Success!
- Normally, root should only be allowed to connect from 'localhost'. This
- ensures that someone cannot guess at the root password from the network.
- Disallow root login remotely? [Y/n] n #禁止root用户登录 (N)
- ... skipping.
- By default, MariaDB comes with a database named 'test' that anyone can
- access. This is also intended only for testing, and should be removed
- before moving into a production environment.
- Remove test database and access to it? [Y/n] y #删除测试数据库(Y)
- - Dropping test database...
- ... Success!
- - Removing privileges on test database...
- ... Success!
- Reloading the privilege tables will ensure that all changes made so far
- will take effect immediately.
- Reload privilege tables now? [Y/n] y #重新加载特权表(Y)
- ... Success!
- Cleaning up...
- All done! If you've completed all of the above steps, your MariaDB
- installation should now be secure.
- Thanks for using MariaDB!
复制代码 6.创建初始数据库- # mysql -uroot -p
- password #输入密码上一步设置的root密码
- mysql> create database zabbix character set utf8 collate utf8_bin;
- mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password'; #设置普通数据库用户zabbix的密码
- mysql> quit;
复制代码 7.导入数据库文件
- # zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
复制代码 8.配置zabbix数据库用户名密码
- nano /etc/zabbix/zabbix_server.conf
复制代码 9.配置Nginx文件- nano /etc/zabbix/nginx.conf
复制代码 10.配置PHP文件
- nano /etc/zabbix/php-fpm.conf
复制代码 11.配置zabbix server等软件启动服务
- # systemctl restart zabbix-server zabbix-agent nginx php7.0-fpm
- # systemctl enable zabbix-server zabbix-agent nginx php7.0-fpm
复制代码 12.访问web管理安装界面
三、zabbix安装web管理
1.安装界面
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|