Linux serverNETWORK ADMINISTRATIONS EP.119-Install Zabbix 6.0 Centos 8 STREAM- Mysql December 10, 2023 Install Zabbix 6.0 Centos 8 STREAM- Mysql source centos 8
//close filewall#hostnamectl set-hostname zabbix-server2#sudo systemctl disable firewalld #sudo systemctl status firewalld //Checking the SELinux Mode#sestatus#nano /etc/selinux/config เปลี่ยนค่าตามนี้ SELINUX=disabled #sudo shutdown -r now //verrify #sestatus//**config server ha1** //Install Zabbix repository #rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-4.el8.noarch.rpm #sudo dnf clean all //nstall Zabbix server, frontend, agent #dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent//Create initial database #curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup #sudo bash mariadb_repo_setup –mariadb-server-version=10.6 # #sudo dnf install boost-program-options -y #sudo dnf module reset mariadb -y #sudo yum install MariaDB-server MariaDB-client MariaDB-backup #sudo systemctl enable –now mariadb #rpm -qi MariaDB-server #sudo systemctl status mariadb //Secure MariaDB Database Server #sudo mariadb-secure-installation #sudo mysql -uroot -p #create database zabbix character set utf8mb4 collate utf8mb4_bin; #create user zabbix@localhost identified by 'password'; #grant all privileges on zabbix.* to zabbix@localhost; #FLUSH PRIVILEGES; #quit; //On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password. #sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql –default-character-set=utf8mb4 -uzabbix -p zabbix ใส่ password =password of ของ database ที่ชื่อ zabbix //edit the Zabbix server confiuration #sudo nano /etc/zabbix/zabbix_server.conf DBPassword=password line number=129 #systemctl restart zabbix-server zabbix-agent httpd php-fpm #systemctl enable zabbix-server zabbix-agent httpd php-fpm //test php# echo "<?php phpinfo();?>" > /var/www/html/phpinfo.php
//close filewall
#hostnamectl set-hostname zabbix-server2
#sudo systemctl disable firewalld
#sudo systemctl status firewalld
//Checking the SELinux Mode
#sestatus
#nano /etc/selinux/config
เปลี่ยนค่าตามนี้
SELINUX=disabled
#sudo shutdown -r now
//verrify
#sestatus
//**config server ha1**
//Install Zabbix repository
#rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-4.el8.noarch.rpm
#sudo dnf clean all
//nstall Zabbix server, frontend, agent
#dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
//Create initial database
#curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
#sudo bash mariadb_repo_setup –mariadb-server-version=10.6
#
#sudo dnf install boost-program-options -y
#sudo dnf module reset mariadb -y
#sudo yum install MariaDB-server MariaDB-client MariaDB-backup
#sudo systemctl enable –now mariadb
#rpm -qi MariaDB-server
#sudo systemctl status mariadb
//Secure MariaDB Database Server
#sudo mariadb-secure-installation
#sudo mysql -uroot -p
#create database zabbix character set utf8mb4 collate utf8mb4_bin;
#create user zabbix@localhost identified by 'password';
#grant all privileges on zabbix.* to zabbix@localhost;
#FLUSH PRIVILEGES;
#quit;
//On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
#sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql –default-character-set=utf8mb4 -uzabbix -p zabbix
ใส่ password =password of ของ database ที่ชื่อ zabbix
//edit the Zabbix server confiuration
#sudo nano /etc/zabbix/zabbix_server.conf
DBPassword=password line number=129
#systemctl restart zabbix-server zabbix-agent httpd php-fpm
#systemctl enable zabbix-server zabbix-agent httpd php-fpm
//test php
# echo "<?php phpinfo();?>" > /var/www/html/phpinfo.php
ขอบคุณครับพี่ริน 👍