Install 1.0.3 on Fresh Ubuntu Install

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

joesyuh
Posts: 8
Joined: Wed Feb 22, 2017 1:07 pm

Install 1.0.3 on Fresh Ubuntu Install

Post by joesyuh »

Hopefully I dont get laughed out of the forums, but I need some help. Is there a definitive guide on installing the newest version of cacti to Ubuntu Server? I have followed a few guides step by step and just end in errors each time.

Here are the guides I have followed:

http://linoxide.com/ubuntu-how-to/insta ... ntu-16-04/ (ended up being old version of cacti)
http://www.cacti.net/downloads/docs/htm ... cacti.html (Official guide with little detail)
https://logch.blogspot.hk/2017/02/insta ... -with.html (good guide but does not work)
http://docs.cacti.net/manual:088:1_inst ... s.1_ubuntu (Again does not work)

I have reinstalled Ubuntu several times. I have tried it with the default LAMP stack that Ubuntu installs and I have built the LAMP stack myself. I get the most vague errors after following these guides. Can any one provide a step by step to get this up and running?

Also, I tried searching the forums but it did not like my search terms and would not return results.
User avatar
camerabob
Cacti User
Posts: 386
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by camerabob »

I'm no Cacti pro, but I did install it about a dozen times on CentOS 7. Not sure Ubuntu is similar, but try this for a guide. Commands may be different, but the route to the end of the race should be about the same.

http://www.camerabob.com:5190/camerabob ... 1.0.x.html
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
cjolly3053
Posts: 48
Joined: Thu Jan 06, 2011 9:30 am
Location: Nashville, TN
Contact:

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by cjolly3053 »

I just decided to do a new install myself to cleanup my install I have been using since 2012.

I installed Ubuntu 16.10 and then installed Cacti 1.0.1.

I know the BIGGEST issue I had following the instructions was, I was not getting all the needed packages installed that cacti needed.

I also did NOT install the LAMP when installing Ubuntu and got it working just fine after searching a number of posts and getting all the packages I needed installed.

So what is the issue exactly you are having... Are you not getting to the point you can get to the webpage for the final install step or are you failing at that point???

I might be able to help a little. I could even upload my text file of installed packages that you could compare to if you like????
joesyuh
Posts: 8
Joined: Wed Feb 22, 2017 1:07 pm

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by joesyuh »

Appreciate the help guys.
camerabob wrote:I'm no Cacti pro, but I did install it about a dozen times on CentOS 7. Not sure Ubuntu is similar, but try this for a guide. Commands may be different, but the route to the end of the race should be about the same.

http://www.camerabob.com:5190/camerabob ... 1.0.x.html
EDIT: That link does not work for me.

I will try that guide with Ubuntu and possibly even try CentOS instead. I have heard that Cacti was developed and tested on CentOS so that may make the install a bit easier.
cjolly3053 wrote:I just decided to do a new install myself to cleanup my install I have been using since 2012.

I installed Ubuntu 16.10 and then installed Cacti 1.0.1.

I know the BIGGEST issue I had following the instructions was, I was not getting all the needed packages installed that cacti needed.

I also did NOT install the LAMP when installing Ubuntu and got it working just fine after searching a number of posts and getting all the packages I needed installed.

So what is the issue exactly you are having... Are you not getting to the point you can get to the webpage for the final install step or are you failing at that point???

I might be able to help a little. I could even upload my text file of installed packages that you could compare to if you like????
I think my issue is coming down to permissions with the database. I cant be 100% sure though. I have not been able to get the Website to show up at all. I have gotten two different errors from the website. 500 error and a connection refused error. With the 500 error I checked the Apache error log and was getting this error: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS'
Which there is a post on here about that error but it did not end up being useful. Their suggestion was to upgrade php. I already had the latest version of PHP.
With the second error there was nothing at all in the Apache logs. Does not even seem like the site was able to be contacted.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by phalek »

It still sounds like you're using an older PHP version or didn't install all requirements. Which PHP version did you install ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
joesyuh
Posts: 8
Joined: Wed Feb 22, 2017 1:07 pm

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by joesyuh »

To install PHP I have been getting it straight from apt-get and each time it has said I had version 7 installed. I believe that is the latest version?

Not installing all requirements could be a very real possibility. Here is what I have installed almost every time: (on one occasion I let Ubuntu installation process install the LAMP stack)

apache2
mysql-server-5.7
php
libapache2-mod-php
snmp
snmpd
rrdtool
cjolly3053
Posts: 48
Joined: Thu Jan 06, 2011 9:30 am
Location: Nashville, TN
Contact:

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by cjolly3053 »

One thing I did first thing before trying to install Cacti was I installed and configured Webmin to monitor the server since I installed 16.10 server.

I'm sure this installed some common packages so I'm sure this probably helped a little.

I just my next project should be create a guide for installing Cacti 1.0.3 on Ubuntu 16.10 Server.

I honestly had no issues from the guide I found but can't find the link for you. My biggest problem was getting Spine working and getting the SQL tweaks working.

I did this over a weekend so was not too complicated if you wanted me to I could help you with a fresh install??? Not sure how determined to get the one you've got working?

** Also side note... Are you doing this on a physical server or VM? I'm running hyper-v **
cjolly3053
Posts: 48
Joined: Thu Jan 06, 2011 9:30 am
Location: Nashville, TN
Contact:

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by cjolly3053 »

So if you are willing to re-install I can include the steps I took here to get it running fast and dirty....lol (since I just got it running from a scratch install)

If you want to try and fix your installation I can give you the packages needed which is probably your hangup.

It's really simple when the correct packages are installed from the start BUT I have always had a hard time since there seems to be no "complete" documentation out there for Ubuntu.

Just let me know what you need and I will post here... In the mean time I will work on getting a doc up somewhere for everybody to see and hopefully help out some people.
joesyuh
Posts: 8
Joined: Wed Feb 22, 2017 1:07 pm

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by joesyuh »

I am going to try another fresh install today. I am not using a physical device this is on a VM (VMware).

I will try to install Webmin first and see if that helps. Also, if you include what packages you installed first that would be a great help too. The documentation is definitely lacking for a clean Cacti install.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by paulgevers »

In Ubuntu it is custom to just use the package provide in the Ubuntu archives. Please see my signature for a link to the differences in the Debian/Ubuntu package with respect to the cacti installation you get from the cacti web-site.

If you install the Ubuntu package, stuff works out of the box, so you don't need installation guides, that is why you hardly find those on the web.

I haven't finished packaging the new version because it requires a lot of work to make it Debian/Ubuntu compliant. Once I am finished, I'll also make it available in my ppa.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
joesyuh
Posts: 8
Joined: Wed Feb 22, 2017 1:07 pm

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by joesyuh »

Quick Update: I did finally get it working. I am doing a quick write up of what eventually worked for me. Webmin was a great suggestions because it helped me manipulate the DB rights, which is what I was having trouble with.
paulgevers wrote:In Ubuntu it is custom to just use the package provide in the Ubuntu archives. Please see my signature for a link to the differences in the Debian/Ubuntu package with respect to the cacti installation you get from the cacti web-site.

If you install the Ubuntu package, stuff works out of the box, so you don't need installation guides, that is why you hardly find those on the web.

I haven't finished packaging the new version because it requires a lot of work to make it Debian/Ubuntu compliant. Once I am finished, I'll also make it available in my ppa.
Thanks, I appreciate the info and advice. I did an install once from the Ubuntu package only to find out it is an older version. I already have a version of cacti running and I wanted the newest update.
cjolly3053
Posts: 48
Joined: Thu Jan 06, 2011 9:30 am
Location: Nashville, TN
Contact:

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by cjolly3053 »

Yes that was one of the problems I was having too and Webmin helped that.

Now try installing Spine...LOL
joesyuh
Posts: 8
Joined: Wed Feb 22, 2017 1:07 pm

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by joesyuh »

Yeah, I am happy I was able to get it up and running. Took way too long to do.
I think I am still running in to permissions problems though. All of my graphs show
The RRD file does not exist
I turn on debug mode for the graph and see this error:

Code: Select all

ERROR: opening '/var/www/html/cacti/rra/DEVICENAME_traffic_in_7.rrd': No such file or directory
Going to that file location on the server shows that there are zero files in that folder. That makes me believe there is a permission issue. I am trying to figure out what account should have permission to that folder.
The official cacti guide says this:
Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.

shell> chown -R cactiuser rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)
I am not sure if I should use the root user or the user created for the mysql database or some other user like www-data. I am so confused at this point. May be a problem for another week.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by paulgevers »

joesyuh wrote:I am not sure if I should use the root user or the user created for the mysql database or some other user like www-data. I am so confused at this point. May be a problem for another week.
It is the user that runs the cron job than needs the write access, so check your crontab.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
joesyuh
Posts: 8
Joined: Wed Feb 22, 2017 1:07 pm

Re: Install 1.0.3 on Fresh Ubuntu Install

Post by joesyuh »

paulgevers wrote:
joesyuh wrote:I am not sure if I should use the root user or the user created for the mysql database or some other user like www-data. I am so confused at this point. May be a problem for another week.
It is the user that runs the cron job than needs the write access, so check your crontab.
That was helpful thank you. I updated those folders with permissions for www-data and also set the crontab job to be by user www-data and that fixed the issue.

I know most of this stuff is fairly obvious for people who understand Linux well, but for me its like walking around in a pitch black room trying to put together a jigsaw puzzle.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests