zabbix on lenny
![]()
Here is steps installing zabbix-1.8 on Lenny :
I assume you already have a running apache, mysql and ssh-server, so preparing all needed dependencies should be simple as follows :
1 2 3 4 5 6 7 |
apt-get install build-essential apt-get install fping apt-get install libsnmp-dev apt-get install libcurl4-openssl-dev apt-get install php5-gd apt-get install libiksemel-dev apt-get install libmysqlclient-dev |
Create the zabbix user :
1 2 3 |
sudo adduser zabbix enter the new password confirm once again |
Download and untar the source :
1 2 3 |
su - zabbix wget http://optusnet.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.8.tar.gz tar xfzv zabbix-1.8.tar.gz |
Using mysql as database, create zabbix database and import the prequisite sql :
1 2 3 4 5 6 7 8 |
shell> mysql -u<username> -p<password> mysql> create database zabbix character set utf8; mysql> quit; shell> cd create/schema shell> cat mysql.sql | mysql -u<username> -p<password> zabbix shell> cd ../data shell> cat data.sql | mysql -u<username> -p<password> zabbix shell> cat images_mysql.sql | mysql -u<username> -p<password> zabbix |
Now it’s time to compile the source :
1 2 3 4 5 6 |
cd zabbix-1.8 ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-jabber --prefix=/usr make su # Enter root password make install |
Edit /etc/services with your favourite editor and insert this line at the end :
1 2 3 |
zabbix_agent 10050/tcp # Zabbix ports zabbix_trap 10051/tcp |
Save and exit.
Prepare the zabbix config by editing the default config from them :
1 2 3 |
mkdir /etc/zabbix chown -R zabbix.zabbix /etc/zabbix/ cp misc/conf/zabbix_* /etc/zabbix/ |
and edit the /etc/zabbix/zabbix_agentd.conf:
Make sure that the Server parameter points to the server address, for the agent that runs on the server it is like this and adjust as for your needs :
1 |
Server=127.0.0.1 |
Save and exit.
Edit /etc/zabbix/zabbix_server.conf and adjust to the database user and password :
1 2 3 4 5 |
# Database user DBUser=zabbix # Database password # Comment this line if no password used DBPassword=Secret |
Save and exit.
Copy the pre configure init.d scripts from zabbix and place them to the right spot on debian :
1 2 |
sudo cp misc/init.d/debian/zabbix-server /etc/init.d sudo cp misc/init.d/debian/zabbix-agent /etc/init.d |
I found this should be edited as per 1.8 version for zabbix-server and zabbix-agent :
Edit the /etc/init.d/zabbix-server, and look for this line :
1 |
DAEMON=/home/zabbix/bin/${NAME}
|
and change them to :
1 |
DAEMON=/usr/sbin/${NAME}
|
Save and exit.
Now set the correct permissions and set ZABBIX to start when the machine boots:
1 2 3 4 |
sudo chmod 755 /etc/init.d/zabbix-server sudo update-rc.d zabbix-server defaults sudo chmod 755 /etc/init.d/zabbix-agent sudo update-rc.d zabbix-agent defaults |
And start the server and the agent :
1 2 |
/etc/init.d/zabbix-server start /etc/init.d/zabbix-agent start |
Check the running server using ps aux | grep zabbix and you should see some output telling the zabbix-server were run on some PID.
Done. The server part were already run.
The web interface
Copy the web interface frontend to apache root directory
1 2 3 |
cd /var/www rm index.html cp -R /home/zabbix/zabbix-1.8/frontends/php/* . |
And make sure you adjust the php.ini setting accordingly to this pre-quisite :
1 2 |
max_execution_time = 300 date.timezone = Asia/Jakarta |
Restart the apache, and now you can install using :
http://<servername or ip>/zabbix/
The default username for admin is admin and the password zabbix. Change the admin password immidiately after login, and check for the zabbix server daemon availibility.





