Difference between revisions of "Monitorix Install cPanel"
(Created page with "==Installing Monitorix on a cPanel box== ===Enable extras if it is diabled and comment out excludes=== vim /etc/yum.conf Cent5: yum install yum-priorities Cent4: yum install yu...") |
|||
| Line 5: | Line 5: | ||
Cent5: yum install yum-priorities | Cent5: yum install yum-priorities | ||
| + | |||
Cent4: yum install yum-plugin-priorities | Cent4: yum install yum-plugin-priorities | ||
===Add priority line=== | ===Add priority line=== | ||
vim /etc/yum.repos.d/yum.system.repo | vim /etc/yum.repos.d/yum.system.repo | ||
| + | |||
priority=1 | priority=1 | ||
===Install RPMForge repo=== | ===Install RPMForge repo=== | ||
CentOS 4: | CentOS 4: | ||
| + | |||
i386 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el4.rf.i386.rpm | i386 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el4.rf.i386.rpm | ||
| + | |||
x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el4.rf.x86_64.rpm | x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el4.rf.x86_64.rpm | ||
| + | |||
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt | rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt | ||
| + | |||
rpm -i rpmforge-release-0.5.2-2.el4.rf.*.rpm | rpm -i rpmforge-release-0.5.2-2.el4.rf.*.rpm | ||
| + | |||
CentOS 5: | CentOS 5: | ||
| + | |||
i386 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm | i386 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm | ||
| + | |||
x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm | x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm | ||
| + | |||
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt | rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt | ||
| + | |||
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm | rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm | ||
===Add priority line to rpmforge=== | ===Add priority line to rpmforge=== | ||
vim /etc/yum.repos.d/rpmforge.repo | vim /etc/yum.repos.d/rpmforge.repo | ||
| + | |||
priority=15 | priority=15 | ||
===Add plugins line to yum.conf and renable excludes=== | ===Add plugins line to yum.conf and renable excludes=== | ||
vim /etc/yum.conf | vim /etc/yum.conf | ||
| + | |||
plugins=1 | plugins=1 | ||
| Line 36: | Line 49: | ||
===Comment out excludes line in yum.conf=== | ===Comment out excludes line in yum.conf=== | ||
vim /etc/yum.conf | vim /etc/yum.conf | ||
| − | |||
yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI | yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI | ||
| Line 57: | Line 69: | ||
===Add site to http.conf=== | ===Add site to http.conf=== | ||
vim /usr/local/apache/conf/includes/post_virtualhost_global.conf | vim /usr/local/apache/conf/includes/post_virtualhost_global.conf | ||
| + | |||
Include "/usr/local/apache/conf.d/monitorix.conf" | Include "/usr/local/apache/conf.d/monitorix.conf" | ||
===Edit monitorix apache config=== | ===Edit monitorix apache config=== | ||
vim /usr/local/apache/conf.d/monitorix.conf | vim /usr/local/apache/conf.d/monitorix.conf | ||
| + | |||
Comment out: | Comment out: | ||
| + | |||
order deny,allow | order deny,allow | ||
| + | |||
deny from all | deny from all | ||
| + | |||
allow from 127.0.0.1 | allow from 127.0.0.1 | ||
| + | |||
Uncomment: | Uncomment: | ||
| + | |||
Options | Options | ||
| + | |||
AllowOverride | AllowOverride | ||
| + | |||
AuthUserFile | AuthUserFile | ||
| + | |||
AuthName | AuthName | ||
| + | |||
AuthType | AuthType | ||
| + | |||
Require User | Require User | ||
| + | |||
Change: | Change: | ||
| + | |||
AllowOverride AuthConfig | AllowOverride AuthConfig | ||
| + | |||
AuthUserFile /usr/local/apache/conf.d/.monitorix | AuthUserFile /usr/local/apache/conf.d/.monitorix | ||
| + | |||
Require valid-user | Require valid-user | ||
| + | |||
service httpd restart | service httpd restart | ||
| Line 84: | Line 113: | ||
vim /usr/share/monitorix/cgi-bin/monitorix.cgi | vim /usr/share/monitorix/cgi-bin/monitorix.cgi | ||
| + | |||
vim /usr/bin/monitorix | vim /usr/bin/monitorix | ||
| + | |||
x64 | x64 | ||
| + | |||
BEGIN { | BEGIN { | ||
| + | |||
unshift(@INC, '/usr/local/cpanel/3rdparty/lib/perl/5.8.8/x86_64-linux/'); | unshift(@INC, '/usr/local/cpanel/3rdparty/lib/perl/5.8.8/x86_64-linux/'); | ||
| + | |||
} | } | ||
| + | |||
x32 | x32 | ||
| + | |||
BEGIN { | BEGIN { | ||
| + | |||
unshift(@INC, '/usr/local/cpanel/3rdparty/lib/perl/5.8.8/i686-linux/'); | unshift(@INC, '/usr/local/cpanel/3rdparty/lib/perl/5.8.8/i686-linux/'); | ||
| + | |||
} | } | ||
| + | |||
===Start Monitorix=== | ===Start Monitorix=== | ||
| Line 109: | Line 148: | ||
our $MULTIHOST = "Y"; | our $MULTIHOST = "Y"; | ||
| + | |||
our @REMOTEHOST_LIST = | our @REMOTEHOST_LIST = | ||
This list contains the remote servers that it can call up. | This list contains the remote servers that it can call up. | ||
| + | |||
If it is a cPanel server with suexec you should use the full host name | If it is a cPanel server with suexec you should use the full host name | ||
| + | |||
| + | Any changes to /etc/monitorix.conf will require the service to be restarted | ||
| + | |||
| + | service monitorix restart | ||
Revision as of 19:24, 10 March 2011
Contents
- 1 Installing Monitorix on a cPanel box
- 1.1 Enable extras if it is diabled and comment out excludes
- 1.2 Add priority line
- 1.3 Install RPMForge repo
- 1.4 Add priority line to rpmforge
- 1.5 Add plugins line to yum.conf and renable excludes
- 1.6 yum update to ensure priorities are working correctly.
- 1.7 Comment out excludes line in yum.conf
- 1.8 Re-enable excludes in yum.conf
- 1.9 Download and install Monitorix
- 1.10 Create users
- 1.11 Add site to http.conf
- 1.12 Edit monitorix apache config
- 1.13 Include perl path for RRD
- 1.14 Start Monitorix
- 1.15 Test
- 2 Additional Stuff
Installing Monitorix on a cPanel box
Enable extras if it is diabled and comment out excludes
vim /etc/yum.conf
Cent5: yum install yum-priorities
Cent4: yum install yum-plugin-priorities
Add priority line
vim /etc/yum.repos.d/yum.system.repo
priority=1
Install RPMForge repo
CentOS 4:
i386 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el4.rf.i386.rpm
x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el4.rf.x86_64.rpm
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
rpm -i rpmforge-release-0.5.2-2.el4.rf.*.rpm
CentOS 5:
i386 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
Add priority line to rpmforge
vim /etc/yum.repos.d/rpmforge.repo
priority=15
Add plugins line to yum.conf and renable excludes
vim /etc/yum.conf
plugins=1
yum update to ensure priorities are working correctly.
Comment out excludes line in yum.conf
vim /etc/yum.conf
yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI
Re-enable excludes in yum.conf
vim /etc/yum.conf
Download and install Monitorix
wget http://www.monitorix.org/monitorix-2.1.0-1.noarch.rpm
vim monitorix-2.1.0-1.noarch.rpm
change apache:apache to nobody:nobody otherwise it will die on cPanel
rpm -ivh --nosignature --nodigest monitorix-2.1.0-1.noarch.rpm
Create users
/usr/local/apache/bin/htpasswd -c /usr/local/apache/conf.d/.monitorix <user>
Add site to http.conf
vim /usr/local/apache/conf/includes/post_virtualhost_global.conf
Include "/usr/local/apache/conf.d/monitorix.conf"
Edit monitorix apache config
vim /usr/local/apache/conf.d/monitorix.conf
Comment out:
order deny,allow
deny from all
allow from 127.0.0.1
Uncomment:
Options
AllowOverride
AuthUserFile
AuthName
AuthType
Require User
Change:
AllowOverride AuthConfig
AuthUserFile /usr/local/apache/conf.d/.monitorix
Require valid-user
service httpd restart
Include perl path for RRD
vim /usr/share/monitorix/cgi-bin/monitorix.cgi
vim /usr/bin/monitorix
x64
BEGIN {
unshift(@INC, '/usr/local/cpanel/3rdparty/lib/perl/5.8.8/x86_64-linux/');
}
x32
BEGIN {
unshift(@INC, '/usr/local/cpanel/3rdparty/lib/perl/5.8.8/i686-linux/');
}
Start Monitorix
service monitorix start
Test
Login to http://server/monitorix ensure that you can actually view graphs
Additional Stuff
Multi server mode
The central server will need to have its config changed
vim /etc/monitorix.conf
search for Multihost and change:
our $MULTIHOST = "Y";
our @REMOTEHOST_LIST =
This list contains the remote servers that it can call up.
If it is a cPanel server with suexec you should use the full host name
Any changes to /etc/monitorix.conf will require the service to be restarted
service monitorix restart