filmov
tv
ZABBIX Сервер 3.0, Пошаговая установка на Linux CentOS 7
Показать описание
1. OS
a. Linux CentOS 7
b. Update it
c. Prerequisites
d. Database
e. Secure it
2. Zabbix 3.0 using MySQL database, MariaDB
a. install Zabbix
b. connect to database
c. configure front-end
d. secure server
e. finish configuration
# Install basic server and configure it
# Set IP and activate adapters if required
nmtui
#connect using SSH/Telnet
# Change time zone if not done jet
ln -s /usr/share/zoneinfo/Europe/Riga /etc/localtime
#Check swap file
free -m
#Create swap file
dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
chown root:root /swapfile1
chmod 0600 /swapfile1
mkswap /swapfile1
swapon /swapfile1
free -m
# To activate /swapfile1 after Linux system reboot
vi /etc/fstab
#Append the following line:
/swapfile1 none swap sw 0 0
# Update CentOS - take some ~5-10 minutes..
yum update -y
# Install some useful packages
yum install vim -y
#Install MySQL fork Mariadb
yum install mariadb-server -y
# Edit MySQL config file and add innodb_file_per_table under [mysqld] section
innodb_file_per_table
#Start MySQL and secure it (by default database root has no password)
systemctl start mariadb
mysql_secure_installation
#create zabbix database and user
mysql -p
CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
flush privileges;
exit
#Installation of Firewall
yum install firewalld -y
systemctl unmask firewalld
systemctl enable firewalld
systemctl start firewalld
# allow connections to ports 10051 (Zabbix server), 10050 (Zabix agent), 80 (HTTP) 443 (HTTPS) in firewalld
firewall-cmd --permanent --zone=public --add-port=10051/tcp
firewall-cmd --permanent --zone=public --add-port=10050/tcp
firewall-cmd --permanent --zone=public --add-port=80/tcp
firewall-cmd --permanent --zone=public --add-port=443/tcp
firewall-cmd --reload
==========================================
# Install Zabbix packages on CentOS/RHEL 7
# Download Zabbix 3.0 configuration package
# Install Zabbix packages
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get zabbix-sender zabbix-java-gateway -y
# Import initial DB schema and data (Zabbix version can be different, so check folder name)
cd /usr/share/doc/zabbix-server-mysql-3.0.3
DBHost=localhost (better change to IP)
DBName=zabbix
DBUser=zabbix
DBPassword=your password for DB user "zabbix"
# Edit PHP timezone
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 always_populate_raw_post_data -1
# After changing the configuration file restart the apache web server.
systemctl start httpd
# Start Zabbix server process
systemctl start zabbix-server
#check the status
systemctl status zabbix-server -l
# Start Zabbix agent process.
systemctl start zabbix-agent
# Set SELinux settings - recommended, but can make trouble if not configured))
getenforce
setsebool -P httpd_can_network_connect=1
setsebool -P httpd_can_connect_zabbix=1
setsebool -P zabbix_can_network=1
getsebool -a | grep zabbix
getsebool -a | grep httpd_can_network_connect
# Add all Zabbix services to server startup
systemctl list-unit-files
systemctl enable mariadb
Default user: Admin
password: zabbix
Thank's for watching!
Please, subscribe!
Br, Alexander
a. Linux CentOS 7
b. Update it
c. Prerequisites
d. Database
e. Secure it
2. Zabbix 3.0 using MySQL database, MariaDB
a. install Zabbix
b. connect to database
c. configure front-end
d. secure server
e. finish configuration
# Install basic server and configure it
# Set IP and activate adapters if required
nmtui
#connect using SSH/Telnet
# Change time zone if not done jet
ln -s /usr/share/zoneinfo/Europe/Riga /etc/localtime
#Check swap file
free -m
#Create swap file
dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
chown root:root /swapfile1
chmod 0600 /swapfile1
mkswap /swapfile1
swapon /swapfile1
free -m
# To activate /swapfile1 after Linux system reboot
vi /etc/fstab
#Append the following line:
/swapfile1 none swap sw 0 0
# Update CentOS - take some ~5-10 minutes..
yum update -y
# Install some useful packages
yum install vim -y
#Install MySQL fork Mariadb
yum install mariadb-server -y
# Edit MySQL config file and add innodb_file_per_table under [mysqld] section
innodb_file_per_table
#Start MySQL and secure it (by default database root has no password)
systemctl start mariadb
mysql_secure_installation
#create zabbix database and user
mysql -p
CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
flush privileges;
exit
#Installation of Firewall
yum install firewalld -y
systemctl unmask firewalld
systemctl enable firewalld
systemctl start firewalld
# allow connections to ports 10051 (Zabbix server), 10050 (Zabix agent), 80 (HTTP) 443 (HTTPS) in firewalld
firewall-cmd --permanent --zone=public --add-port=10051/tcp
firewall-cmd --permanent --zone=public --add-port=10050/tcp
firewall-cmd --permanent --zone=public --add-port=80/tcp
firewall-cmd --permanent --zone=public --add-port=443/tcp
firewall-cmd --reload
==========================================
# Install Zabbix packages on CentOS/RHEL 7
# Download Zabbix 3.0 configuration package
# Install Zabbix packages
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get zabbix-sender zabbix-java-gateway -y
# Import initial DB schema and data (Zabbix version can be different, so check folder name)
cd /usr/share/doc/zabbix-server-mysql-3.0.3
DBHost=localhost (better change to IP)
DBName=zabbix
DBUser=zabbix
DBPassword=your password for DB user "zabbix"
# Edit PHP timezone
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 always_populate_raw_post_data -1
# After changing the configuration file restart the apache web server.
systemctl start httpd
# Start Zabbix server process
systemctl start zabbix-server
#check the status
systemctl status zabbix-server -l
# Start Zabbix agent process.
systemctl start zabbix-agent
# Set SELinux settings - recommended, but can make trouble if not configured))
getenforce
setsebool -P httpd_can_network_connect=1
setsebool -P httpd_can_connect_zabbix=1
setsebool -P zabbix_can_network=1
getsebool -a | grep zabbix
getsebool -a | grep httpd_can_network_connect
# Add all Zabbix services to server startup
systemctl list-unit-files
systemctl enable mariadb
Default user: Admin
password: zabbix
Thank's for watching!
Please, subscribe!
Br, Alexander