Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cacti 0.8 Beginner's Guide

You're reading from   Cacti 0.8 Beginner's Guide Learn Cacti and design a robust Network Operations Center

Arrow left icon
Product type Paperback
Published in Mar 2011
Publisher Packt
ISBN-13 9781849513920
Length 348 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Thomas Urban Thomas Urban
Author Profile Icon Thomas Urban
Thomas Urban
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Cacti 0.8Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Installing Cacti FREE CHAPTER 2. Using Graphs to Monitor Networks and Devices 3. Creating and Using Templates 4. User Management 5. Data Management 6. Cacti Maintenance 7. Network and Server Monitoring 8. Plugin Architecture 9. Plugins 10. Threshold Monitoring with Thold 11. Enterprise Reporting 12. Cacti Automation for NOC Mobile Access / Administration Online Resources Further Information Pop Quiz Answers
Index

Time for action – installing Spine


  1. You now need to prepare the development environment for Spine. On CentOS you can do this by issuing the following command:

    yum install gcc mysql-devel net-snmp-devel autoconf automake libtool
    
  2. Download the spine source code. For this, go to http://www.cacti.net and click on Download under the Spine (Cactid) section. Right-click on Spine Source in the tar.gz format and copy the link address.

  3. Navigate to /tmp/ and issue the following command:

    wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.7g.tar.gz
    
  4. Extract the file:

    tar –xzvf cacti-spine-0.8.7g.tar.gz
    
  5. Navigate to the newly created cacti-spine-0.8.7g directory.

  6. Prepare the directory for compilation. Please note that this step may not work on other distributions, or additional steps need to be taken to accomplish it:

    ./bootstrap
    
  7. Configure the compiling environment:

    ./configure
    
  8. Compile Spine:

    make
    
  9. Once the make command finishes, install Spine:

    make install
    
  10. You now have Spine installed, but it needs to be configured. Therefore, copy the sample configuration file to a location where Spine will find it:

    cp /usr/local/spine/etc/spine.conf.dist /etc/spine.conf
    
  11. Edit the file in vi:

    vi /etc/spine.conf
    
  12. Change the database configuration to match the settings from earlier.

  13. Create a symbolic link in /sbin to the spine binary:

    ln -s /usr/local/spine/bin/spine /sbin/spine
    

What just happened?

You just set up a basic development environment for compiling Spine, compiled it, and then installed it. You also configured Spine to use the correct database information.

Tip

Compiling Spine on other Linux distributions

When compiling Spine on other Linux distributions such as Ubuntu, you will have to go through some additional steps. Look at the following URL for more information on how to do so:

http://docs.cacti.net/manual:087:1_installation.1_install_unix.6_install_and_configure_spine.

Differences between source and APT/Yum installations

The main difference between installing Cacti from source and using APT/Yum-based installations is the location of configuration files and availability of patches. Cacti, by default, does not follow the Filesystem Hierarchy Standard (FHS) defined for the Linux operating systems. The FHS defines directories where applications should add their configuration or log files. APT/Yum-based installations usually follow this standard. Due to this, add-ons such as the Plugin Architecture may not be available on all platforms using APT/Yum.

The main advantage of using APT/Yum-based installations is the ease of installation but as we've just seen, installing Cacti isn't very difficult.

However, the disadvantage of using APT or Yum is the availability of newer Cacti versions. Source-based Cacti installations can be upgraded to the latest version as soon as it is available on the Cacti website, while APT/Yum-based installations might need to wait until the package maintainers update their repositories.

Have a go hero – remote server for database hosting

Here is a little challenge for you. It's not difficult but it will allow you to alter the installation to suit your needs. What if you want to use a remote database server? Maybe you want to use an existing dedicated MySQL server, instead of hosting the database on the same system as Cacti, or you want to separate the roles to allow more growth. Can you figure out what to change?

Solution: Create the MySQL database on the remote system using the same command as if you were installing it locally, but this time use the -h <hostname> option to specify the remote server. When creating the user and granting it permissions, use the following command, assuming the Cacti server has the IP '192.168.0.10':

GRANT ALL ON cacti.* TO cactiuser@'192.168.0.10' IDENTIFIED BY 'MyV3ryStr0ngPassword'; 
flush privileges; 
exit

This will allow the Cacti user access to the database from the Cacti server. Now change $database_hostname in config.php and DB_Host in spine.conf on the Cacti server to point to your remote database server.

You have been reading a chapter from
Cacti 0.8 Beginner's Guide
Published in: Mar 2011
Publisher: Packt
ISBN-13: 9781849513920
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image