Cacti 0.8.7e on debian 5 / ubuntu install shell script

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

Moderators: Developers, Moderators

nationals
Cacti User
Posts: 76
Joined: Wed Aug 27, 2008 5:21 am
Location: China
Contact:

Cacti 0.8.7e on debian 5 / ubuntu install shell script

Post by nationals »

install debian 5 mini.

Update below.
Last edited by nationals on Tue Sep 22, 2009 12:59 am, edited 3 times in total.
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

No offence, but these scripts sound off alarm bells in my head (kinda nice, it blocks out the voices).

There should be no reason to retrieve the cron, etc from a remote server. I can see in your own environment that would be useful, but it opens up the possibility of backdoors being put in.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
nationals
Cacti User
Posts: 76
Joined: Wed Aug 27, 2008 5:21 am
Location: China
Contact:

Post by nationals »

thanks for your advice.

I will and need to update the script for it.
nationals
Cacti User
Posts: 76
Joined: Wed Aug 27, 2008 5:21 am
Location: China
Contact:

Post by nationals »

Update!

Code: Select all

wget http://forums.cacti.net/download.php?id=18355 -O cacti-0.8.7e.sh
sudo sh cacti-0.8.7e.sh
pls must use the password "dbadmin" for mysql root, when promit for the root password of mysql during install the mysql.

or when use any password else, you must change the install script's password for mysql.

spine 0.8.7e for debian 5.0 x86

Code: Select all

wget http://forums.cacti.net/download.php?id=18356 -O spine.zip
unzip spine.zip
cp -R spine /etc/
chmod -R 755 /etc/spine
config:
settings\paths
Image
settings\poller
Image


cacti-0.8.7e.sh :

Code: Select all

#!/bin/sh 
# Install the cacti 0.8.7e on debian linux x86

# install the LAMP on debian
apt-get update
apt-get install ssh patch zip -y
echo 'pls use the password (dbadmin) for mysql to autoinstall below'
apt-get install apache2 -y
apt-get install mysql-server -y
apt-get install php5 php5-gd php5-cli php5-mysql -y
apt-get install rrdtool -y
apt-get install snmp snmpd php5-snmp -y

# install the Cacti 0.8.7e with PA-v2.5 on debian-linux
cd /tmp
wget http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz
tar zxvf cacti-0.8.7e.tar.gz
cp -R ./cacti-0.8.7e/* /var/www/
chown -R www-data:www-data /var/www

# patch the cacti 0.8.7e
cd /var/www
wget http://www.cacti.net/downloads/patches/0.8.7e/cli_add_graph.patch
wget http://www.cacti.net/downloads/patches/0.8.7e/snmp_invalid_response.patch
wget http://www.cacti.net/downloads/patches/0.8.7e/template_duplication.patch
patch -p1 -N < cli_add_graph.patch
patch -p1 -N < snmp_invalid_response.patch
patch -p1 -N < template_duplication.patch
rm cli_add_graph.patch
rm snmp_invalid_response.patch
rm template_duplication.patch
chown -R www-data:www-data /var/www
mv /var/www/index.html /var/www/index.bak

# patch the PA 2.5 for cacti 0.8.7e
cd /tmp
wget http://forums.cacti.net/download.php?id=18354 -O cacti-plugin-0.8.7e-PA-v2.5.zip
unzip cacti-plugin-0.8.7e-PA-v2.5.zip
cd /var/www
patch -p1 -N < /tmp/cacti-plugin-0.8.7e-PA-v2.5.diff
chown -R www-data:www-data /var/www

# create the db and dbuser for cacti
mysql -u root -pdbadmin < /tmp/create_cactidb.sql

# import the data to the cact db
mysql -u cactiuser -pcactiuser cacti < /var/www/cacti.sql

# patch the PA 2.5 for cacti 0.8.7e db
mysql -u cactiuser -pcactiuser cacti < /tmp/pa.sql


# create the crontab
touch /etc/cron.d/cacti
echo "*/5 * * * * www-data php /var/www/poller.php >/dev/null 2>&1" > /etc/cron.d/cacti

# restart the apache2
/etc/init.d/apache2 restart

echo 'pls use http://ip to access the cacti site'
Attachments
01.JPG
01.JPG (9.22 KiB) Viewed 22033 times
02.JPG
02.JPG (6.05 KiB) Viewed 22033 times
spine.zip
spine 0.8.7e for debian 5.0 x86
(89.37 KiB) Downloaded 961 times
cacti-0.8.7e-sec.sh
(1.88 KiB) Downloaded 1101 times
cacti-plugin-0.8.7e-PA-v2.5.zip
(24.81 KiB) Downloaded 1957 times
Last edited by nationals on Tue Sep 22, 2009 1:04 am, edited 2 times in total.
nationals
Cacti User
Posts: 76
Joined: Wed Aug 27, 2008 5:21 am
Location: China
Contact:

spine 0.8.7e for debian 5.0 x64

Post by nationals »

spine 0.8.7e for debian 5.0 x64

the default location:

/usr/local/spine
Attachments
spinex64.zip
spine 0.8.7e for debian 5.0 x64
(94.5 KiB) Downloaded 368 times
nationals
Cacti User
Posts: 76
Joined: Wed Aug 27, 2008 5:21 am
Location: China
Contact:

Post by nationals »

if you don't trust the PA that is been modify and post on this forums,

so,
and I found that, if you install the pa (orig file) first and then patch that 3 patch for cacti, this does not need to modify any file.

Code: Select all

# install the Cacti 0.8.7e with PA-v2.5 on debian-linux
cd /tmp
wget http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz
tar zxvf cacti-0.8.7e.tar.gz
cp -R ./cacti-0.8.7e/* /var/www/
chown -R www-data:www-data /var/www

# patch the PA 2.5 for cacti 0.8.7e
cd /tmp
wget http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7e-PA-v2.5.zip -O cacti-plugin-0.8.7e-PA-v2.5.zip
unzip cacti-plugin-0.8.7e-PA-v2.5.zip
cd /var/www
patch -p1 -N < /tmp/cacti-plugin-0.8.7e-PA-v2.5.diff
chown -R www-data:www-data /var/www

# patch the cacti 0.8.7e
cd /var/www
wget http://www.cacti.net/downloads/patches/0.8.7e/cli_add_graph.patch
wget http://www.cacti.net/downloads/patches/0.8.7e/snmp_invalid_response.patch
wget http://www.cacti.net/downloads/patches/0.8.7e/template_duplication.patch
patch -p1 -N < cli_add_graph.patch
patch -p1 -N < snmp_invalid_response.patch
patch -p1 -N < template_duplication.patch
rm cli_add_graph.patch
rm snmp_invalid_response.patch
rm template_duplication.patch
chown -R www-data:www-data /var/www
mv /var/www/index.html /var/www/index.bak
hzlypan
Posts: 1
Joined: Tue Sep 22, 2009 2:38 am
Location: China

debian 4.0

Post by hzlypan »

can the shell run under debian 4.0 ?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Spine should go into /usr/sbin IMHO.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
hatiras
Posts: 25
Joined: Mon Oct 10, 2005 4:55 pm
Location: Mexico, Puebla

Post by hatiras »

ok, this works ok, but i dont know how to install spine, cacti and p.a is ok.

i was to download spine of this link and install just like this way::

wget http://www.cacti.net/downloads/spine/ca ... .7e.tar.gz
tar xvzf cacti-spine-0.8.7.tar.gz
cd spine-0.8.7
./configure
make

i just do it like i read in the page but in the command "" ./configure "" happened this:
# ./configure
configure: error: cannot run /bin/sh config/config.sub

excuse me but i am some confusee :o , thanks.
thanks a lot....
[b]___________________[/b]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did you run the bootstrap script?
R.
hatiras
Posts: 25
Joined: Mon Oct 10, 2005 4:55 pm
Location: Mexico, Puebla

yes

Post by hatiras »

yes gandalf, i put "" ./bootstrap "", but the output is:

MonitorSrv:/usr/src/cacti-spine-0.8.7e# ./bootstrap
FATAL: Unable to locate dos2unix utility

i think that maybe i need to install something in this case.
:-?
[b]___________________[/b]
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Install the 'dos2unix' package. This gets rid of Windows return characters (damn you Larry...).

With those Windows return characters present, you get the 'cannot run /bin/sh config/config.sub' error.

So in short, install 'dos2unix', rerun bootstrap, then do ./configure.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
hatiras
Posts: 25
Joined: Mon Oct 10, 2005 4:55 pm
Location: Mexico, Puebla

Post by hatiras »

thnks linegod, :oops: i have a problem, i try to install dos2unix but my debian distro dont permit connect to internet with synaptics, i change mirrors servers but any one permit the download of synaptics, i search on the internet and some pages says, is a problem with the mirrors servers of debian, i´m fried LoL, excuse me for this topic out of place, is just an explanion for my problem with the installation of spine...

im fried, dont can to use the command ./install, make for any app. , and synaptics dont permit connect with his servers..
[b]___________________[/b]
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Find an ftp mirror, download the dos2unix deb, install from the command line.

Beyond that, I can't help. I avoid Debian based distros like the plague.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Linegod wrote:Install the 'dos2unix' package. This gets rid of Windows return characters (damn you Larry...).

With those Windows return characters present, you get the 'cannot run /bin/sh config/config.sub' error.

So in short, install 'dos2unix', rerun bootstrap, then do ./configure.
Hey, you got to cut down on that Strongbow or invite me to the great white north so I can enjoy some too. My SVN client config removes all that crap now. Windows is a curse.

http://en.wikipedia.org/wiki/Strongbow_Cider

YKW
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests