{"id":213,"date":"2010-01-31T04:22:55","date_gmt":"2010-01-30T21:22:55","guid":{"rendered":"http:\/\/www.jfdesignnet.com\/?p=213"},"modified":"2010-01-31T04:22:55","modified_gmt":"2010-01-30T21:22:55","slug":"zabbix-on-lenny","status":"publish","type":"post","link":"https:\/\/www.jfdesignnet.com\/?p=213","title":{"rendered":"zabbix on lenny"},"content":{"rendered":"<p><img decoding=\"async\" loading=\"lazy\" class=\"alignright\" title=\"Zabbix\" src=\"http:\/\/www.zabbix.com\/img\/zabbix1.png\" alt=\"\" width=\"118\" height=\"31\" \/><br \/>\nHere is steps installing zabbix-1.8 on Lenny :<\/p>\n<p>I assume you already have a running apache, mysql and ssh-server, so preparing all needed dependencies should be simple as follows :<\/p>\n<p>{code}apt-get install build-essential<br \/>\napt-get install fping<br \/>\napt-get install libsnmp-dev<br \/>\napt-get install libcurl4-openssl-dev<br \/>\napt-get install php5-gd<br \/>\napt-get install libiksemel-dev<br \/>\napt-get install libmysqlclient-dev{\/code}<\/p>\n<p>Create the zabbix user :<br \/>\n{code}sudo adduser zabbix<br \/>\nenter the new password<br \/>\nconfirm once again{\/code}<\/p>\n<p>Download and untar the source :<br \/>\n{code}su &#8211; zabbix<br \/>\nwget http:\/\/optusnet.dl.sourceforge.net\/sourceforge\/zabbix\/zabbix-1.8.tar.gz<br \/>\ntar xfzv zabbix-1.8.tar.gz{\/code}<\/p>\n<p>Using mysql as database, create zabbix database and import the prequisite sql :<br \/>\n{code}shell&gt; mysql -u&lt;username&gt; -p&lt;password&gt;<br \/>\nmysql&gt; create database zabbix character set utf8;<br \/>\nmysql&gt; quit;<br \/>\nshell&gt; cd create\/schema<br \/>\nshell&gt; cat mysql.sql | mysql -u&lt;username&gt; -p&lt;password&gt; zabbix<br \/>\nshell&gt; cd ..\/data<br \/>\nshell&gt; cat data.sql | mysql -u&lt;username&gt; -p&lt;password&gt; zabbix<br \/>\nshell&gt; cat images_mysql.sql | mysql -u&lt;username&gt; -p&lt;password&gt; zabbix{\/code}<\/p>\n<p>Now it&#8217;s time to compile the source :<br \/>\n{code}cd zabbix-1.8<br \/>\n.\/configure &#8211;enable-server &#8211;enable-agent &#8211;with-mysql &#8211;with-net-snmp &#8211;with-libcurl &#8211;with-jabber &#8211;prefix=\/usr<br \/>\nmake<br \/>\nsu<br \/>\n# Enter root password<br \/>\nmake install{\/code}<\/p>\n<p>Edit \/etc\/services with your favourite editor and insert this line at the end :<br \/>\n{code}zabbix_agent 10050\/tcp # Zabbix ports<\/p>\n<p>zabbix_trap 10051\/tcp{\/code}<br \/>\nSave and exit.<\/p>\n<p>Prepare the zabbix config by editing the default config from them :<br \/>\n{code}mkdir \/etc\/zabbix<br \/>\nchown -R zabbix.zabbix \/etc\/zabbix\/<br \/>\ncp misc\/conf\/zabbix_* \/etc\/zabbix\/{\/code}<\/p>\n<p>and edit the \/etc\/zabbix\/zabbix_agentd.conf:<\/p>\n<p>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 :<br \/>\n{code}Server=127.0.0.1{\/code}<br \/>\nSave and exit.<\/p>\n<p>Edit \/etc\/zabbix\/zabbix_server.conf and adjust to the database user and password :<br \/>\n{code}# Database user<br \/>\nDBUser=zabbix<br \/>\n# Database password<br \/>\n# Comment this line if no password used<br \/>\nDBPassword=Secret{\/code}<br \/>\nSave and exit.<\/p>\n<p>Copy the pre configure init.d scripts from zabbix and place them to the right spot on debian :<br \/>\n{code}sudo cp misc\/init.d\/debian\/zabbix-server \/etc\/init.d<br \/>\nsudo cp misc\/init.d\/debian\/zabbix-agent \/etc\/init.d{\/code}<\/p>\n<p><strong><span style=\"text-decoration: underline;\">I found this should be edited as per 1.8 version for zabbix-server and zabbix-agent :<\/span><\/strong><\/p>\n<p>Edit the \/etc\/init.d\/zabbix-server, and look for this line :<br \/>\n{code}DAEMON=\/home\/zabbix\/bin\/${NAME}{\/code}<br \/>\nand change them to :<br \/>\n{code}DAEMON=\/usr\/sbin\/${NAME}{\/code}<br \/>\nSave and exit.<\/p>\n<p>Now set the correct permissions and set ZABBIX to start when the machine boots:<br \/>\n{code}sudo chmod 755 \/etc\/init.d\/zabbix-server<br \/>\nsudo update-rc.d zabbix-server defaults<br \/>\nsudo chmod 755 \/etc\/init.d\/zabbix-agent<br \/>\nsudo update-rc.d zabbix-agent defaults{\/code}<\/p>\n<p>And start the server and the agent :<br \/>\n{code}\/etc\/init.d\/zabbix-server start<br \/>\n\/etc\/init.d\/zabbix-agent start{\/code}<\/p>\n<p>Check the running server using ps aux | grep zabbix and you should see some output telling the zabbix-server were run on some PID.<\/p>\n<p>Done. The server part were already run.<\/p>\n<p><strong>The web interface<\/strong><\/p>\n<p>Copy the web interface frontend to apache root directory<\/p>\n<p>{code}<br \/>\ncd \/var\/www<br \/>\nrm index.html<br \/>\ncp -R \/home\/zabbix\/zabbix-1.8\/frontends\/php\/* .<br \/>\n{\/code}<\/p>\n<p>And make sure you adjust the php.ini setting accordingly to this pre-quisite :<br \/>\n{code}max_execution_time = 300<br \/>\ndate.timezone = Asia\/Jakarta{\/code}<\/p>\n<p>Restart the apache, and now you can install using :<\/p>\n<pre>http:\/\/&lt;servername or ip&gt;\/zabbix\/<\/pre>\n<p>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.<\/p>\n<p><a href=\"http:\/\/www.jfdesignnet.com\/wp-content\/uploads\/2010\/01\/zabbix.jpg\" rel=\"lightbox[213]\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-233\" title=\"zabbix\" src=\"http:\/\/www.jfdesignnet.com\/wp-content\/uploads\/2010\/01\/zabbix.jpg\" alt=\"\" width=\"777\" height=\"695\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 : {code}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{\/code} Create the zabbix user [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/posts\/213"}],"collection":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=213"}],"version-history":[{"count":0,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/posts\/213\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}