| 1 | Installing Zenoss on Feisty Ubuntu |
|---|
| 2 | |
|---|
| 3 | 1. Install Ubuntu 7.04 Server from an installation CD. |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | 2. Log in as the default user. |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | 3. Install ssh so you can putty (remote terminal) from your desktop: |
|---|
| 10 | |
|---|
| 11 | sudo apt-get install ssh ifconfig | grep cast (to see what your IP is) |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | 4. Either via SSH or on the box itself, become the root user: |
|---|
| 15 | |
|---|
| 16 | sudo su [Enter password] |
|---|
| 17 | |
|---|
| 18 | 5. Several dependencies are in the 'universe' repository, so we'll need to |
|---|
| 19 | modify your sources list (here we'll use vim as an editor): |
|---|
| 20 | |
|---|
| 21 | vim /etc/apt/sources.list |
|---|
| 22 | |
|---|
| 23 | Find these two lines: |
|---|
| 24 | |
|---|
| 25 | deb http://us.archive.ubuntu.com/ubuntu feisty main restricted deb-src |
|---|
| 26 | http://us.archive.ubuntu.com/ubuntu feisty main restricted |
|---|
| 27 | |
|---|
| 28 | And add the 'universe' repository: |
|---|
| 29 | |
|---|
| 30 | deb http://us.archive.ubuntu.com/ubuntu feisty main restricted universe deb-src |
|---|
| 31 | http://us.archive.ubuntu.com/ubuntu feisty main restricted universe |
|---|
| 32 | |
|---|
| 33 | Save the file and close the editor. Then, back at the command line: |
|---|
| 34 | |
|---|
| 35 | apt-get update && apt-get upgrade |
|---|
| 36 | |
|---|
| 37 | 6. Now we can install the dependencies. From the command line: |
|---|
| 38 | |
|---|
| 39 | apt-get install mysql-server mysql-client python-dev python2.4-dev \ |
|---|
| 40 | build-essential subversion libmysqlclient15-dev snmpd autoconf \ snmp swig |
|---|
| 41 | python-setuptools sysv-rc-conf bzip2 |
|---|
| 42 | |
|---|
| 43 | 7. Add the 'zenoss' user that will run the application: |
|---|
| 44 | |
|---|
| 45 | adduser zenoss |
|---|
| 46 | |
|---|
| 47 | If security isn't an issue, use the password 'zenoss'. Use defaults for |
|---|
| 48 | everything else. |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | 8. Zenoss requires some environment variables to be set, so we need to add them |
|---|
| 52 | to the 'zenoss' user's bash startup script. Enter the command: |
|---|
| 53 | |
|---|
| 54 | vim /home/zenoss/.bashrc |
|---|
| 55 | |
|---|
| 56 | And add these lines to the end: |
|---|
| 57 | |
|---|
| 58 | export ZENHOME=/usr/local/zenoss export PYTHONPATH=$ZENHOME/lib/python export |
|---|
| 59 | PATH=$ZENHOME/bin:$PATH |
|---|
| 60 | |
|---|
| 61 | Save the file and close the editor. |
|---|
| 62 | |
|---|
| 63 | 9. Now we'll make the directory into which Zenoss will install. Run: |
|---|
| 64 | |
|---|
| 65 | mkdir /usr/local/zenoss chown zenoss /usr/local/zenoss |
|---|
| 66 | |
|---|
| 67 | 10. Feisty Fawn ships with Python 2.5, but certain dependencies of Zenoss are |
|---|
| 68 | unable to build properly with this version. Once Zenoss has been installed, it |
|---|
| 69 | will run just fine under 2.5, but we'll need to change the symlink for the |
|---|
| 70 | installation. Run: |
|---|
| 71 | |
|---|
| 72 | unlink /usr/bin/python && ln -s /usr/bin/python2.4 /usr/bin/python |
|---|
| 73 | |
|---|
| 74 | 11. Now it's time to install. First, become the zenoss user: |
|---|
| 75 | |
|---|
| 76 | su zenoss cd |
|---|
| 77 | |
|---|
| 78 | You're in the zenoss user's home directory. Download the latest version of |
|---|
| 79 | Zenoss here. If you want to use svn to download it, run: |
|---|
| 80 | |
|---|
| 81 | svn co http://dev.zenoss.org/svn/trunk/inst zenoss-install |
|---|
| 82 | |
|---|
| 83 | If you want to use a tarball, download it to this directory and run: |
|---|
| 84 | |
|---|
| 85 | tar xzf zenoss-[X.XX].tar.gz |
|---|
| 86 | |
|---|
| 87 | Replacing the [X.XX] with the version you've downloaded. Now that you've got |
|---|
| 88 | Zenoss, cd to the directory that was just created. All that's left to do is: |
|---|
| 89 | |
|---|
| 90 | ./install.sh |
|---|
| 91 | |
|---|
| 92 | The installation script will ask you a few questions, then install Zenoss. If |
|---|
| 93 | you run into any problems and need to run the installation again, clean up |
|---|
| 94 | what's already been done with: |
|---|
| 95 | |
|---|
| 96 | make clean |
|---|
| 97 | |
|---|
| 98 | 12. Once Zenoss has been installed successfully, become root again by typing: |
|---|
| 99 | |
|---|
| 100 | exit |
|---|
| 101 | |
|---|
| 102 | Or hitting Ctrl-D. Set zensocket to setuid: |
|---|
| 103 | |
|---|
| 104 | chown root:zenoss /usr/local/zenoss/bin/zensocket chmod 04750 |
|---|
| 105 | /usr/local/zenoss/bin/zensocket |
|---|
| 106 | |
|---|
| 107 | Switch back the Python symlinks: |
|---|
| 108 | |
|---|
| 109 | unlink /usr/bin/python && ln -s /usr/bin/python2.5 /usr/bin/python |
|---|
| 110 | |
|---|
| 111 | And have Zenoss run on system startup: |
|---|
| 112 | |
|---|
| 113 | ln -s /usr/local/zenoss/bin/zenoss /etc/init.d sysv-rc-conf |
|---|
| 114 | |
|---|
| 115 | Add Zenoss to runlevels 2, 3, 4 and 5. Reboot, and check that Zenoss started |
|---|
| 116 | properly with: |
|---|
| 117 | |
|---|
| 118 | /usr/local/zenoss/bin/zenoss status |
|---|
| 119 | |
|---|
| 120 | 13. To monitor your Zenoss server, install SNMP agent: |
|---|
| 121 | |
|---|
| 122 | apt-get install snmpd |
|---|
| 123 | |
|---|
| 124 | You need to configure it to allow 'public' to read all OIDs (default is to read |
|---|
| 125 | very few OIDs): |
|---|
| 126 | |
|---|
| 127 | cp /etc/snmp/snmpd.conf{,.bak} snmpconf (configure snmpd agent to allow |
|---|
| 128 | public read) cp snmpd.conf /etc/snmp/ /etc/init.d/snmpd restart |
|---|
| 129 | |
|---|
| 130 | |
|---|
| 131 | 14. Default ubuntu mail agent (MTA) is exim4, which may need to be setup if you |
|---|
| 132 | want email alerts to work with a remote mail server (mail.mydomain.inc): |
|---|
| 133 | |
|---|
| 134 | dpkg-reconfigure exim4-config |
|---|
| 135 | |
|---|
| 136 | Select default options, except: |
|---|
| 137 | |
|---|
| 138 | mail sent by smarthost; received via SMTP or fetchmail mail.mydomain.inc |
|---|
| 139 | |
|---|
| 140 | |
|---|
| 141 | 15. To test mail agent, need to install a frontend (MUA - mail) to exim4: |
|---|
| 142 | |
|---|
| 143 | apt-get install mailutils mail youremail@yourdomain.inc (press enter for Cc:, |
|---|
| 144 | type in subject, press enter) (type in body of message, then enter) . (type in |
|---|
| 145 | single period, then enter, to end composing and email is queued) mailq (to see |
|---|
| 146 | if mail is sent or still in queue) |
|---|
| 147 | |
|---|
| 148 | |
|---|
| 149 | 16. For Windows monitoring, install SNMP from add/remove Windows monitoring |
|---|
| 150 | components, then install SNMP-Informant: |
|---|
| 151 | |
|---|
| 152 | www.snmp-informant.com - download the free SNMP for Windows. |
|---|
| 153 | |
|---|
| 154 | |
|---|
| 155 | 17. Read the Admin guide at http://www.zenoss.com/download/ |
|---|
| 156 | |
|---|