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 x86_64, you are using a 64-bit installation.

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
For CentOS  32-Bit, run the following command:
  • sudo rpm -ivh
After installing the Zabbix repository, you can now install the Zabbix server. Do that by running the command:
  • 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'
You can change this to a timezone of your choice. In this example, we are using UTC. For a complete list of PHP timezones, go here.

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;
Make sure you set your own secure password where it says [insert-password-here]
  • grant all privileges on zabbix.* to zabbix@localhost identified by '[insert-password-here]';
  • flush privileges;
  • exit
After creating the database, we need to add the initial Zabbix schema and data. To do that, run the following commands (for the MySQL commands, you will be prompted for the Zabbix password you set when you created the database):
  • 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]
Once the conf file is set, you can now start the Zabbix server and restart Apache.

  • 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 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

Post a Comment

NETWORKSTIP Networking CCNA,Centos,Ubuntu,Sql, © 2013. All Rights Reserved. Shared by NetworksTip Muhammad Nafees