Forked from tkoeppen/install-graphite-ubuntu-10.04.sh
Created
July 14, 2012 16:36
-
Star
(101)
You must be signed in to star a gist -
Fork
(66)
You must be signed in to fork a gist
-
-
Save jgeurts/3112065 to your computer and use it in GitHub Desktop.
Install Graphite 0.9.10 on Ubuntu 12.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
cd | |
sudo apt-get update | |
sudo apt-get upgrade | |
wget https://launchpad.net/graphite/0.9/0.9.10/+download/graphite-web-0.9.10.tar.gz | |
wget https://launchpad.net/graphite/0.9/0.9.10/+download/carbon-0.9.10.tar.gz | |
wget https://launchpad.net/graphite/0.9/0.9.10/+download/whisper-0.9.10.tar.gz | |
tar -zxvf graphite-web-0.9.10.tar.gz | |
tar -zxvf carbon-0.9.10.tar.gz | |
tar -zxvf whisper-0.9.10.tar.gz | |
mv graphite-web-0.9.10 graphite | |
mv carbon-0.9.10 carbon | |
mv whisper-0.9.10 whisper | |
rm graphite-web-0.9.10.tar.gz | |
rm carbon-0.9.10.tar.gz | |
rm whisper-0.9.10.tar.gz | |
sudo apt-get install --assume-yes apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 build-essential python3.2 python-dev libpython3.2 python3-minimal libapache2-mod-wsgi libaprutil1-ldap memcached python-cairo-dev python-django python-ldap python-memcache python-pysqlite2 sqlite3 erlang-os-mon erlang-snmp rabbitmq-server bzr expect ssh libapache2-mod-python python-setuptools | |
sudo easy_install django-tagging | |
sudo easy_install zope.interface | |
sudo easy_install twisted | |
sudo easy_install txamqp | |
#################################### | |
# INSTALL WHISPER | |
#################################### | |
cd ~/whisper | |
sudo python setup.py install | |
#################################### | |
# INSTALL CARBON | |
#################################### | |
cd ~/carbon | |
sudo python setup.py install | |
cd /opt/graphite/conf | |
sudo cp carbon.conf.example carbon.conf | |
sudo cp storage-schemas.conf.example storage-schemas.conf | |
sudo gedit storage-schemas.conf | |
### Replace contents of storage-schemas.conf to be the following | |
[stats] | |
priority = 110 | |
pattern = .* | |
retentions = 10:2160,60:10080,600:262974 | |
### | |
#################################### | |
# CONFIGURE GRAPHITE (webapp) | |
#################################### | |
cd ~/graphite | |
sudo python check-dependencies.py | |
sudo python setup.py install | |
# CONFIGURE APACHE | |
################### | |
cd ~/graphite/examples | |
sudo cp example-graphite-vhost.conf /etc/apache2/sites-available/default | |
sudo cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi | |
sudo mkdir /etc/httpd | |
sudo mkdir /etc/httpd/wsgi | |
sudo gedit /etc/apache2/sites-available/default | |
##### | |
# Change the line: WSGISocketPrefix run/wsgi | |
# To: WSGISocketPrefix /etc/httpd/wsgi | |
##### | |
sudo /etc/init.d/apache2 reload | |
#################################### | |
# INITIAL DATABASE CREATION | |
#################################### | |
cd /opt/graphite/webapp/graphite/ | |
sudo python manage.py syncdb | |
# follow prompts to setup django admin user | |
sudo chown -R www-data:www-data /opt/graphite/storage/ | |
sudo /etc/init.d/apache2 restart | |
cd /opt/graphite/webapp/graphite | |
sudo cp local_settings.py.example local_settings.py | |
#################################### | |
# START CARBON | |
#################################### | |
cd /opt/graphite/ | |
sudo ./bin/carbon-cache.py start | |
HI shubhada-antapurkar ,
I faced the same problem.
In the official django documentation for ContentTypes, the import statement used for GenericForeignKey is given as -
from django.contrib.contenttypes.fields import GenericForeignKey
This will raise an ImportError. Replace it with the following -
from django.contrib.contenttypes.generic import GenericForeignKey
It worked for me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While running the command python manage.py syncdb I am getting the following error:
Traceback (most recent call last):
File "manage.py", line 13, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 231, in execute
self.validate()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 266, in validate
num_errors = get_validation_errors(s, app)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/validation.py", line 30, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 158, in get_app_errors
self._populate()
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 67, in _populate
self.load_app(app_name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 88, in load_app
models = import_module('.models', app_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/opt/graphite/webapp/graphite/events/models.py", line 6, in
from tagging.managers import ModelTaggedItemManager
File "/usr/local/lib/python2.7/dist-packages/tagging/managers.py", line 7, in
from tagging.models import Tag
File "/usr/local/lib/python2.7/dist-packages/tagging/models.py", line 10, in
from django.contrib.contenttypes.fields import GenericForeignKey
ImportError: No module named fields
Can somebody help?