월요일, 5월 27, 2024
HomeLinuxubuntu zabbix 2.2 installation

ubuntu zabbix 2.2 installation

ubuntu zabbix 2.2 installation

https://www.zabbix.com/documentation/2.2/manual/installation/install

1. apt-get

apt-get install build-essential mysql-server libmysqlclient-dev php5 php5-gd php5-mysql snmp libsnmp-dev snmpd libcurl4-openssl-dev
apt-get install php5-fpm
apt-get install php5-cli php5-mcrypt php5-gd php5-mysql

2. adduser

adduser zabbix
adduser zabbix admin

3. wget

su - zabbix
wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.8/zabbix-2.2.8.tar.gz
tar zxvpf zabbix-2.2.8.tar.gz 

4. mysql database create

mysqladmin -u root -p create zabbix
mysql -uroot -p
 Welcome to the MySQL monitor. Commands end with ; or \g.
 Your MySQL connection id is 50
 Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)

 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

 mysql> GRANT ALL ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'zabbixpassword';
 Query OK, 0 rows affected (0.04 sec)

 mysql> flush privileges;
 Query OK, 0 rows affected (0.00 sec)

 mysql> quit

5. mysql database zabbix schema import

mysql -u root -p zabbix <> zabbix-2.2.8/database/mysql/schema.sql
Enter password: 
mysql -u root -p zabbix <> zabbix-2.2.8/database/mysql/images.sql
Enter password: 
mysql -u root -p zabbix <> zabbix-2.2.8/database/mysql/data.sql
Enter password: 

6. configure

./configure --prefix=/etc/zabbix --with-mysql --with-net-snmp --with-libcurl --enable-server --enable-agent
..........
***********************************************************
*            Now run 'make install'                       *
*                                                         *
*            Thank you for using Zabbix!                  *
*                                  *
***********************************************************

7. make

make install
....
make[2]: Leaving directory `/home/zabbix/zabbix-2.2.8/man'
make[1]: Leaving directory `/home/zabbix/zabbix-2.2.8/man'
Making install in misc
make[1]: Entering directory `/home/zabbix/zabbix-2.2.8/misc'
make[2]: Entering directory `/home/zabbix/zabbix-2.2.8/misc'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/zabbix/zabbix-2.2.8/misc'
make[1]: Leaving directory `/home/zabbix/zabbix-2.2.8/misc'
Making install in upgrades
make[1]: Entering directory `/home/zabbix/zabbix-2.2.8/upgrades'
make[2]: Entering directory `/home/zabbix/zabbix-2.2.8/upgrades'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/zabbix/zabbix-2.2.8/upgrades'
make[1]: Leaving directory `/home/zabbix/zabbix-2.2.8/upgrades'
make[1]: Entering directory `/home/zabbix/zabbix-2.2.8'
make[2]: Entering directory `/home/zabbix/zabbix-2.2.8'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/zabbix/zabbix-2.2.8'
make[1]: Leaving directory `/home/zabbix/zabbix-2.2.8'

8. firewall

vi /etc/services
zabbix_agent 10050/tcp # Zabbix ports
zabbix_trap 10051/tcp

9. zabbix_agentd.conf

vi /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1

10. zabbix_server.conf

vi /etc/zabbix/etc/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=zabbixpassword

11. /etc/init.d/ script create

cp misc/init.d/debian/zabbix-server /etc/init.d/
cp misc/init.d/debian/zabbix-agent /etc/init.d/

12.

vi /etc/init.d/zabbix-server
#DAEMON=/usr/local/sbin/${NAME}
DAEMON=/etc/zabbix/sbin/${NAME}

13.

vi /etc/init.d/zabbix-agent
#DAEMON=/usr/local/sbin/${NAME}
DAEMON=/etc/zabbix/sbin/${NAME}

14. permission

chmod 755 /etc/init.d/zabbix-server
chmod 755 /etc/init.d/zabbix-agent

15. update-rc

update-rc.d zabbix-server defaults
update-rc.d zabbix-agent defaults

16. zabbix server & agentd start

/etc/init.d/zabbix-server start
Starting Zabbix server daemon: zabbix_server

/etc/init.d/zabbix-agent start
Starting Zabbix agent daemon: zabbix_agentd

17. php.ini modify

vi /etc/php5/fpm/php.ini
post_max_size = 16M ;
max_execution_time = 300 ;
max_input_time = 300 ;
date.timezone = "ASIA/SEOUL" ;

18. frontends php copy

mkdir -p /var/www/zabbix
cd frontends/php
cp -r . /var/www/zabbix

19. gettext install

apt-get install gettext

20.locale/make_mo.sh

locale/make_mo.sh

21.template import error php-xml* install

apt-get install php-xml*  #template import error

22.phph5-fpm & nginx restart

php5-fpm restart
nginx restart

23.web UI

http:///zabbix
user Admin has password zabbix

24.Zabbix server is not running alert message error

setsebool -P httpd_can_network_connect on
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Time limit exceeded. Please complete the captcha once again.

Most Popular