-
CentOS Zabbix Server 4.0 Install (자빅스 설치)Open Source 2019. 4. 1. 13:07
- OS : CentOS 7
- Zabbix : 4.0
1. httpd Install (Web Server)
# yum -y install httpd
# vi /etc/httpd/conf/httpd.conf
ServerName 192.168.x.x
DocumentRoot "/usr/share/zabbix" → 실제 zabbix 설치가 않되면 경로에러가 날 수 있으니 자빅스 설치후 기동# systemctl start httpd
# systemctl enable httpd
2. PHP Install
# yum -y install php
# vi /etc/php.ini
date.timezone = Asia/Seoul
3. MaiaDB Install
# yum -y install mariadb-server mariadb
# systemctl start mariadb
# systemctl enable mariadb
# mysql_secure_installation
[ Enter ]
Set root password? [Y/n] 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
... 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] y
... Success!
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
- 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
... 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!4 ~ 6. STEP
https://www.zabbix.com/download?zabbix=4.0&os_distribution=centos&os_version=7&db=mysql
4. Zabbix Repo
# rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
# yum clean all
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
5. Create initial database
# mysql -u root -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password'; password → zabbixdbpasswd
mysql> quit6. Import initial schema and data.
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
password :
# vi /etc/zabbix/zabbix_server.conf
DBPassword=password
# systemctl restart zabbix-server zabbix-agent httpd
# systemctl enable zabbix-server zabbix-agent httpd6. Web Test
----------------------------------------------------------------------------------------------------------------------------------
zabbix 데몬 기동시 아래와 같이 에러발생시 "selinux 를 disabled" 한다.
[root@localhost ~]# systemctl restart zabbix-server zabbix-agent httpd
Job for zabbix-server.service failed because a configured resource limit was exceeded. See "systemctl status zabbix-server.service" and "journalctl -xe" for details.아마도, semanage 명령어를 이용해 10051 포트를 등록해주면 해결될 듯 하다.
'Open Source' 카테고리의 다른 글
freesshd를 이용한 windows 서버 ssh 접속 (0) 2019.07.12 [ OSS - webknight ] IIS 웹 방화벽 보안 - 1부(설치) (0) 2019.06.24 [ OSS - WinSCP ] FTP 원격지 파일 동기화 2부 - 로깅 (0) 2019.06.05 [ OSS - WinSCP ] 원격지 파일 동기화 1부 - 기본구성 (0) 2019.06.02 winscp와 python을 이용한 FTP 다운로드 (0) 2019.05.03 webknight 웹 방화벽으로 IIS 웹 사이트 보안 - 3부(모니터링) (0) 2018.07.01 webknight 웹 방화벽으로 IIS 웹 사이트 보안 - 4부(로그파싱) (0) 2018.05.12 webknight 웹 방화벽으로 IIS 웹 사이트 보안 - 2부(중앙로그서버 구축) (0) 2018.04.25