centos 7部署graphite(nginx+uwsgi)
http://www.debugrun.com/a/o5qyP9W.html
http://blog.csdn.net/tsingfu1986/article/details/44239503
https://www.digitalocean.com/community/tutorials/how-to-keep-effective-historical-logs-with-graphite-carbon-and-collectd-on-centos-7
https://www.howtoing.com/how-to-keep-effective-historical-logs-with-graphite-carbon-and-collectd-on-centos-7/
http://www.tuicool.com/articles/3uAney
安装grafana
http://trudgian.net/posts/graphite-grafana-with-gunicorn-and-nginx/
pip install -r requirement.txt
报错
解决方案
# yum install centos-release-SCL
yum install python27-python-devel.x86_64
yum install gcc libffi-devel openssl-devel
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb
解决方案:http://stackoverflow.com/questions/15312732/django-core-exceptions-improperlyconfigured-error-loading-mysqldb-module-no-mo?rq=1
[root@10-19-135-196 graphite]# pip install mysql-python
Collecting mysql-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-Q7rB8u/mysql-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Q7rB8u/mysql-python/
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
解决方案:
https://my.oschina.net/liuyuantao/blog/746541
yum install mysql-devel
这里在我初始化数据库的时候
[root@10-19-135-196 graphite]# PYTHONPATH=/opt/graphite/webapp django-admin.py migrate --settings=graphite.settings --run-syncdb
出现的报错有
django.db.utils.OperationalError: (1049, "Unknown database 'graphite'")
这个我在数据库上create一下就好
还有一个报错
django.db.utils.IntegrityError: (1215, 'Cannot add foreign key constraint')
但是再次初始化一下就好了
这里在检查的时候发现说有三个python的模块没有暗转
python check-dependencies.py
[OPTIONAL] Unable to import the 'ldap' module, do you have python-ldap installed for python 2.7.5? Without python-ldap, you will not be able to use LDAP authentication in the graphite webapp.
[OPTIONAL] Unable to import the 'python-rrdtool' module, this is required for reading RRD.
[OPTIONAL] Unable to import the 'pyhash' module. This is useful for fnv1_ch hashing support.
3 optional dependencies not met. Please consider the optional items before proceeding.
yum install rrdtool rrdtool-devel
pip install rrdtool
yum install openldap
yum install openldap24-libs
yum install openldap-clients
yum install openldap-devel
yum install openssl-devel
pip install Python-ldap
etag:W/"59080155-1436f"