Building Graphite & dependencies from source without pip, yum, CPAN and other automation tools
This is not a question - it is a howto guide for building Graphite without automated package tools.
How to build Graphite and its dependencies from source without pip, yum, CPAN and other automation tools.
I work in a development environment that is very limited in connectivity and requires that linux software packages be as contained as possible off of /opt. I can't just upgrade existing or install new perl and python modules into the system perl and python directories because that may cause other software on the server to break. Also, we have very locked down proxied internet access that requires authentication and pretty much works for desktop web browsers only. Because of these restrictions, using automated package management tools like pip, yum, and "perl -MCPAN -e shell" to obtain and install packages just plain doesn't work on my linux servers. I wanted to try out Graphite, so I spent many hours figuring out what versions of each source package I needed and how to configure/
My base system is RHEL6 but these instructions should work reasonably well on most up to date linux systems.
As root, create /opt/graphite and give the ownership of the dir to the userid that will own/maintain/run graphite. In this example, my graphite userid is called nmsuser.
cd /opt
mkdir graphite
chown nmsuser.users graphite
Exit your root shell and switch over to the nmsuser id and create a tgz dir for all of your source packages.
su - nmsuser
mkdir /opt/graphite/tgz
Create a file named 00-build-vars.sh in /opt/graphite/tgz with the following lines in it:
#
#
#### 00-build-vars.sh – helpful env vars for building graphite and its dependencies
PYTHONPATH=
export PYTHONPATH
BUILD_DIR=
export BUILD_DIR
INSTALL_
export INSTALL_DIR
PATH=/opt/
export PATH=$INSTALL_
export LDFLAGS=
export CPPFLAGS=
export MAKE=make
export PKG_CONFIG=
#### end of 00-build-vars.sh
Save that file, and source it by typing…
. /opt/graphite/
…on a line by itself. There will be no output from this command.
Now you are ready to download and build all the source packages. The list of source packages below is what worked for me and I strongly suggest you stick to these versions of these packages. I spent a considerable amount of time fooling around with other (usually more recent) versions of some of these packages and beat my head against problems that turned out to be version specific issues that lead to dependency breakage.
It is also very important to build these packages in the order listed below because many of the later source packages require libraries, header files, etc. from the earlier packages.
So download each tar.gz or zip file below and execute configure/
tar –zxvf pkg-config-
cd pkg-config-0.28
./configure --prefix=
make
make install
cd ..
tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=
make
make install
cd ..
tar -zxvf libpng-
cd libpng-1.6.21
./configure --prefix=
make
make install
cd ..
tar -zxvf pixman-
cd pixman-0.34.0
./configure --prefix=
make
make install
cd ..
tar -zxvf freetype-
cd freetype-2.3.5
./configure --prefix=
make
make install
cd ..
tar –zxvf libxml2-
cd libxml2-2.6.32
./configure --prefix=
make
make install
cd ..
tar –zxvf fontconfig-
cd fontconfig-2.4.2
./configure --prefix=
make
make install
cd ..
tar –zxvf cairo-1.14.6.tar.gz
cd cairo-1.14.6
./configure --prefix=
make
make install
cd ..
tar –zxvf httpd-2.2.31.tar.gz
cd httpd-2.2.31
./configure --prefix=
make
make install
cd ..
tar –zxvf perl-5.22.1.tar.gz
cd perl-5.22.1
CFLAGS='-m64 -mtune=nocona' ./Configure -des -Dusershrplib -Dprefix=
make
make install
cd ..
tar –zxvf Python-2.6.6.tgz
cd Python-2.6.6
./configure --prefix=
make
make install
cd ..
tar –zxvf mod_wsgi-3.4.tar.gz
cd mod_wsgi-3.4
./configure --prefix=
make
make install
cd ..
tar –zxvf django-
cd django-1.4.22
python setup.py install --prefix=
cd ..
tar –zxvf libevent-
cd libevent-
./configure --prefix=
make
make install
cd ..
tar –zxvf memcached-
cd memcached-1.4.25
./configure --prefix=
make
make install
cd ..
tar –zxvf zope.interface-
cd zope.interface-
python setup.py install --prefix=
cd ..
tar –zxvf setuptools-
cd setup-tools-20.2.2
python setup.py install –prefix=
cd ..
tar –zxvf Twisted-
cd Twisted-12.0.0
python setup.py install --prefix=
cd ..
tar –zxvf py2cairo-
cd py2cairo-1.10.0
./waf configure --prefix=
./waf build
./waf build install
cd ..
tar –zxvf django-
cd django-
python setup.py install --prefix=
cd ..
tar –zxvf sqlite_
cd sqlite_2.8.17.orig
./configure --prefix=
make
make install
cd ..
tar –zxvf sqlite-
cd sqlite-
./configure --prefix=
make
make install
cd ..
tar –zxvf whitenoise-
cd whitenoise-2.0.6
python setup.py install --prefix=
cd ..
tar –zxvf pysqlite-
cd pysqlite-2.6.3
python setup.py install --prefix=
cd ..
tar –zxvf txAMQP-0.6.2.tar.gz
cd txAMQP-0.6.2
python setup.py install --prefix=
cd ..
tar –zxvf six-1.9.0.tar.gz
cd six-1.9.0.tar
python setup.py install --prefix=
cd ..
tar –zxvf python-
cd python-
python setup.py install --prefix=
cd ..
tar –zxvf argparse-
cd argparse-1.4.0
python setup.py install --prefix=
cd ..
unzip net-snmp-5.7.3.zip
cd net-snmp-5.7.3
./configure --prefix=
You will now be asked for some info by the net-snmp configure script. Just take the defaults. We aren't going to actually run the system's SNMP daemon from /opt/graphite/bin, we just need net-snmp libraries to build the perl SNMP modules.
make
make install
cd ..
tar –zxvf SNMP-Multi-
cd SNMP-Multi-2.1
perl Makefile.PL
make
make install
cd ..
tar –zxvf YAML-1.15.tar.gz
cd YAML-1.15
perl Makefile.PL
make
make install
cd ..
tar –zxvf Log-Log4perl-
cd Log-Log4perl-1.46
perl Makefile.PL
make
make install
cd ..
tar –zxvf Parallel-
cd Parallel-
perl Makefile.PL
make
make install
cd ..
tar –zxvf Module-
cd Module-Build-0.4216
perl Makefile.PL
make
make install
cd ..
tar –zxvf Python-
cd Python-
perl Makefile.PL
make
make install
cd ..
tar –zxvf carbon-
cd carbon-0.9.15
python setup.py install --prefix=
cd ..
tar –zxvf graphite-
cd graphite-web-0.9.15
python check-dependenc
At this stage you should pass all of the dependency checks except LDAP. If you want LDAP authentication support you will have to deal with python-ldap and its dependencies. LDAP has a fairly lengthy chain of dependencies like OpenLDAP and GNUTLS which each have even more dependencies. For now I don't want to deal with all that so I'm skipping LDAP support.
If you are happy with the dependency check results, make sure you are still in the graphite-web-0.9.15 dir and execute…
python setup.py install --prefix=
cd ..
tar –zxvf whisper-
cd whisper-0.9.15
python setup.py install --prefix=
cd ..
Now, go here…
http://
…to configure the components, start up the system, view log files, etc.
Happy Graphit'ing and I hope this info is helpful and time saving to someone.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Graphite Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: