Okay, so now the server is up and running, it is time to install Zenoss.
First let’s go through the Zenoss requirements once again.
- SELinux is disabled.
# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
SELinux is enabled by default and will have to be disabled manually. This is done by modifying the line ‘SELINUX=enforcing’ to ‘SELINUX=disabled’ in /etc/sysconfig/selinux and then rebooting the server.
# sestatus
SELinux status: disabled
- Directory /opt/zenoss is not a symlink to another location.
# ls -al /opt | grep zenoss
drwxr-xr-x. 3 root root 4096 May 12 11:06 zenoss
- umask is set to 022
# umask
0022
- /home directory is writable by root (or /home/zenoss exists as user zenoss’s home directory)
# ls -al /home
total 24
drwxr-xr-x. 3 root root 4096 Sep 23 2011 .
dr-xr-xr-x. 22 root root 4096 May 12 23:49 ..
drwx------. 2 root root 16384 May 12 11:06 lost+found
- connected to the internet
- DNS is available
# wget google.com
-bash: wget: command not found
# yum install wget
...
Complete!
# wget google.com
(successfully downloaded index.html)
Let’s start installing Zenoss proper.
# wget --no-check-certificate https://github.com/zenoss/core-autodeploy/tarball/4.2.3 -O auto.tar.gz
(successfully downloaded auto.tar.gz)
# tar xvf auto.tar.gz
zenoss-core-autodeploy-3200e76/
zenoss-core-autodeploy-3200e76/README.rst
zenoss-core-autodeploy-3200e76/core-autodeploy.sh
zenoss-core-autodeploy-3200e76/secure_zenoss.sh
zenoss-core-autodeploy-3200e76/zenpack_actions.txt
Now let’s check the contents of zenpack_actions.txt and core-autodeploy.sh.
zenpack_actions.txt contains the list of zenpacks to be installed by default. I am going to leave it unmodified.
core-autodeploy.sh will do the following:
- Set umask to 022
- Check if /opt/zenoss is a symlink, and exit if it is.
- Check if MySQL has already been installed and exit if it has.
- Disable SELinux (I guess I did not have to disable it manually).
- Install Zenoss, MySQL, RabbitMQ, JRE, and rrdtool.
Let’s see it in action!
# ./core-autodeploy.sh
It appears that the distro-supplied version of MySQL is at least partially installed,
or a prior installation attempt failed.
Please remove these packages, as well as their dependencies (often postfix), and then
retry this script:
mysql-libs-5.1.69-1.el6_4.x86_64
It looks like the minimal CentOS 6.4 installation did include mysql-libs, and it has to be removed before running the Zenoss auto-deploy script.
# rpm -e mysql-libs-5.1.69-1.el6_4.x86_64
error: Failed dependencies:
libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
mysql-libs is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
I guess postfix will have to be removed as well.
# rpm -e mysql-libs-5.1.69-1.el6_4.x86_64 postfix-2.6.6-2.2.el6_1.x86_64
error: Failed dependencies:
/usr/sbin/sendmail is needed by (installed) cronie-1.4.4-7.el6.x86_64
Ok this is getting annoying. Let’s use yum.
# yum remove mysql-libs
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.69-1.el6_4 will be erased
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Running transaction check
---> Package postfix.x86_64 2:2.6.6-2.2.el6_1 will be erased
--> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-7.el6.x86_64
--> Running transaction check
---> Package cronie.x86_64 0:1.4.4-7.el6 will be erased
--> Processing Dependency: cronie = 1.4.4-7.el6 for package: cronie-anacron-1.4.4-7.el6.x86_64
--> Running transaction check
---> Package cronie-anacron.x86_64 0:1.4.4-7.el6 will be erased
--> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package crontabs.noarch 0:1.10-33.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================================
Removing:
mysql-libs x86_64 5.1.69-1.el6_4 @updates 4.0 M
Removing for dependencies:
cronie x86_64 1.4.4-7.el6 @anaconda-CentOS-201303020151.x86_64/6.4 166 k
cronie-anacron x86_64 1.4.4-7.el6 @anaconda-CentOS-201303020151.x86_64/6.4 43 k
crontabs noarch 1.10-33.el6 @anaconda-CentOS-201303020151.x86_64/6.4 2.4 k
postfix x86_64 2:2.6.6-2.2.el6_1 @anaconda-CentOS-201303020151.x86_64/6.4 9.7 M
Transaction Summary
=================================================================================================================================================================================
Remove 5 Package(s)
Installed size: 14 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : cronie-anacron-1.4.4-7.el6.x86_64 1/5
Erasing : crontabs-1.10-33.el6.noarch 2/5
Erasing : cronie-1.4.4-7.el6.x86_64 3/5
Erasing : 2:postfix-2.6.6-2.2.el6_1.x86_64 4/5
Erasing : mysql-libs-5.1.69-1.el6_4.x86_64 5/5
Verifying : crontabs-1.10-33.el6.noarch 1/5
Verifying : cronie-1.4.4-7.el6.x86_64 2/5
Verifying : cronie-anacron-1.4.4-7.el6.x86_64 3/5
Verifying : 2:postfix-2.6.6-2.2.el6_1.x86_64 4/5
Verifying : mysql-libs-5.1.69-1.el6_4.x86_64 5/5
Removed:
mysql-libs.x86_64 0:5.1.69-1.el6_4
Dependency Removed:
cronie.x86_64 0:1.4.4-7.el6 cronie-anacron.x86_64 0:1.4.4-7.el6 crontabs.noarch 0:1.10-33.el6 postfix.x86_64 2:2.6.6-2.2.el6_1
Complete!
Ok now that’s settled, let’s run the auto-deploy script again.
# ./core-autodeploy.sh
...
(a whole lot of downloading and installing)
...
MySQL is configured with a blank root password.
Configure a secure MySQL root password? [Yn]:Y
Enter new MySQL root password:
Confirm new MySQL root password:
...
(more installation..)
...
Zenoss installation completed.
Securing configuration files...
Zenoss Core 4.2.3 install completed successfully!
Please visit http://127.0.0.1:8080 in your favorite Web browser to complete
setup.
NOTE: You may need to disable or modify this server's firewall to access port
8080. To disable this system's firewall, type:
# service iptables save
# service iptables stop
# chkconfig iptables off
Alternatively, you can modify your firewall to enable incoming connections to
port 8080. Here is a full list of all the ports Zenoss accepts incoming
connections from, and their purpose:
8080 (TCP) Web user interface
11211 (TCP and UDP) memcached
514 (UDP) syslog
162 (UDP) SNMP traps
If you encounter problems with this script, please report them on the
following wiki page:
http://wiki.zenoss.org/index.php?title=Talk:Install_Zenoss
Thank you for using Zenoss. Happy monitoring!
I am quite surprised that the auto-deploy script worked so well.
Now let’s modify the firewall as per the advice at the end of the installation.
# iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
357K 410M ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
1 64 ACCEPT icmp -- any any anywhere anywhere
148 8880 ACCEPT all -- lo any anywhere anywhere
1 52 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:ssh
977 118K REJECT all -- any any anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 269K packets, 60M bytes)
pkts bytes target prot opt in out source destination
# iptables -I INPUT 5 -p tcp --dport 8080 -j ACCEPT
# iptables -I INPUT 6 -p tcp --dport 11211 -j ACCEPT
# iptables -I INPUT 7 -p udp --dport 11211 -j ACCEPT
# iptables -I INPUT 8 -p udp --dport 514 -j ACCEPT
# iptables -I INPUT 9 -p udp --dport 162 -j ACCEPT
# iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
441K 439M ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
1 64 ACCEPT icmp -- any any anywhere anywhere
165 9868 ACCEPT all -- lo any anywhere anywhere
1 52 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:ssh
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:webcache
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:memcache
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:memcache
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:syslog
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:snmptrap
1991 244K REJECT all -- any any anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 166 packets, 41427 bytes)
pkts bytes target prot opt in out source destination
# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
Now the Zenoss web interface should be available via http://hostname:8080.
Let’s click Get Started! The next page asks to specify a password for the admin user, as well as creating a new user.
Next comes the page where you can start adding devices. I add devices later so I’ll just click Finish.
The next screen is the Zenoss dashboard.
That concludes the Zenoss Core 4 installation on CentOS 6.4.