To install Zabbix server, you will need to find out if your CentOS installation is 32-bit or 64-bit.
To do this run the command
- uname -i
If it says i368, you are using a 32-bit installation.
We will then need to install the Zabbix repository from Zabbix.
For CentOS 64-Bit, run the following command:
- sudo rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
- sudo rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/i386/zabbix-release-2.4-1.el6.noarch.rpm
- sudo yum install zabbix-server-mysql zabbix zabbix-agent zabbix-web
Now, we need to make some configuration changes before going through the web installation.
Edit /etc/php.ini with your favorite editor and change the following:
Under Resource limits
- max_execution_time = 600
- max_input_time = 600
- memory_limit= 256M
- post_max_size = 32M
- upload_max_filesize = 16M
- date.timezone = 'UTC'
Once done with the php.ini configurations, we can set up the database.
- mysql -u root -p
When prompted, enter your MySQL root password that you set up when installing MySQL.
In MySQL, enter the following commands:
- create database zabbix character set utf8 collate utf8_bin;
- grant all privileges on zabbix.* to zabbix@localhost identified by '[insert-password-here]';
- flush privileges;
- exit
- cd /usr/share/doc/zabbix-server-mysql-2.4.7/create/
- mysql -u zabbix -p zabbix < schema.sql
- mysql -u zabbix -p zabbix < images.sql
- mysql -u zabbix -p zabbix < data.sql
Once schema and data have been added to the database, we need to edit the Zabbix configuration file.
Use a text editor to edit /etc/zabbix/zabbix_server.conf and make sure the following are set:
- DBHost=localhost
- DBName=zabbix
- DBUser=zabbix
- DBPassword=[insert-password-here]
- sudo service zabbix-server start
- sudo service httpd restart
Now, we can go to the web installation. In your browser, go to http://yourhostname-or-ipaddress/zabbix
If you are unsure what you IP address is, run the following:
- ifconfig
In our example, we would put http://192.68.0.2/zabbix in the address bar and get the following page. Click Next
Make sure everything says OK. If not, look at your php.ini file and make the appropriate changes.
Click next if everything is OK.
Input your database information that you set up earlier and click test connection.
If it says OK click next, if not check your database information again to see if it is accurate.
For most installations, you can keep the defaults. If you would like, you can set a name for the installation. Once done, click next.
Verify your installation and click next.
Click finished to go to the login page.
You can then log into Zabbix with the default logins.
Username: Admin
Password: zabbix
No comments:
Post a Comment