首页 > 系统相关 >centos6.4 安装graphite

centos6.4 安装graphite

时间:2022-12-11 23:37:46浏览次数:57  
标签:install python devel graphite conf pip centos6.4 安装


一、升级python2.7:
 0、准备:
  1)需要先安装openssl:(解决Python ImportError: cannot import name HTTPSHandler)
  yum install openssl openssl-devel -y
  2)安装sqlite-devel:
  解决在安装graphite-web时报错:Error loading either pysqlite2 or sqlite3 modules
  需要安装sqlite-devel之后,重新编译安装Python即可。
yum install sqlite-devel
重新编译安装Python:
./configure
make
make install
  3)安装zlib:
  yum install zlib zlib-devel openssl  openssl-devel readline readline-devel -y
  
  
  
 1、安装python2.7.3
  1)下载、编译
  wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2  
  tar -jxvf Python-2.7.3.tar.bz2  
  cd Python-2.7.3
  ./configure  
  make         
  make install  
  #make clean  
  #make distclean 
  2)建立软连接,使系统默认的 python指向 python2.7
  mv /usr/bin/python /usr/bin/python2.6.6 
  ln -s /usr/local/bin/python2.7 /usr/bin/python  
  3)修改yum
   vi /usr/bin/yum 
   #!/usr/bin/python
改成
#!/usr/bin/python2.6.6




2、安装2.7.3的easy_install、pip
1)easy_install:
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.zip --no-check-certificate
unzip setuptools-7.0.zip
cd setuptools-7.0
python setup.py install






2)pip:
wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz
tar zvxf 1.5.5    #解压文件
cd pip-1.5.5/
python setup.py install





检验:(需要重新登录)
# pip -V
pip 1.5.5 from /usr/local/lib/python2.7/site-packages/pip-1.5.5-py2.7.egg (python 2.7)
# easy_install --version
setuptools 7.0


3、坑
 1)安装2.7.3对应的django
 django-admin.py syncdb --settings=graphite.settings
pip install Django==1.8


 2)pip install django-tagging


 3)ImportError: No module named cairocffi
pip install cairocffi






 4)CompressionError: bz2 module is not available
wget https://pypi.python.org/packages/source/T/Twisted/Twisted-14.0.0.tar.bz2#md5=9625c094e0a18da77faa4627b98c9815 --no-check-certificate
tar -jxf  Twisted-14.0.0.tar.bz2
cd Twisted-14.0.0;
python setup.py install


http://www.ithao123.cn/content-1273730.html




5)error: command 'gcc' failed with exit status 1
yum install libffi-devel
yum -y install gcc*












二、安装、配置graphite:
1、安装:
1)pip安装:(默认安装到了/opt下面)
pip install https://github.com/graphite-project/ceres/tarball/master
pip install whisper
pip install carbon  
#可能会报错CompressionError: bz2 module is not available
pip install graphite-web


2)修改配置文件:
cd /opt/graphite/conf
# cp aggregation-rules.conf.example aggregation-rules.conf
# cp blacklist.conf.example blacklist.conf
# cp carbon.conf.example carbon.conf
# cp carbon.amqp.conf.example carbon.amqp.conf
# cp relay-rules.conf.example relay-rules.conf
# cp rewrite-rules.conf.example rewrite-rules.conf
# cp storage-schemas.conf.example storage-schemas.conf
# cp storage-aggregation.conf.example storage-aggregation.conf
# cp whitelist.conf.example whitelist.conf
3)启动carbon-cache:
#cd /opt/graphite/bin
#./carbon-cache.py start
#netstat -nap | grep 2003
4)安装graphite-web:
cd /opt/graphite/webapp/graphite
cp local_settings.py.example local_settings.py


cd /opt/graphite/webapp/graphite/
python manage.py syncdb
#可能会报错:Django==1.8
pip install Django==1.8
#可能会报错: Error loading either pysqlite2 or sqlite3 modules
yum install sqlite-devel
# 可能会报错:No module named tagging
pip install django-tagging




5)启动:
cd /opt/graphite
# PYTHONPATH=`pwd`/storage/whisper ./bin/run-graphite-devel-server.py --port=8085 --libs=`pwd`/webapp /opt/graphite 1>/opt/graphite/storage/log/webapp/process.log 2>&1 &
# tail -f /opt/graphite/storage/log/webapp/process.log


可能会没有图片,报错:ImportError: No module named cairocffi
pip install cairocffi
#安装cairocffi时可能报错:error: command 'gcc' failed with exit status 1
yum install libffi-devel



标签:install,python,devel,graphite,conf,pip,centos6.4,安装
From: https://blog.51cto.com/u_5650011/5928892

相关文章

  • Nuxt.js IIS部署,Nuxt.js 发布部署vue-cli 安装 2020最新 vue 4.0安装
    第一步:服务器安装node.js环境1、安装node.js下载地址​​http://nodejs.cn/download/​​我是全部默认下一步的,安装成功之后运行命令查看是否安装成功如果没有出现版本号,......
  • Tomcat 安装
    1、Toncat下载通过访问Tomcat官方网站下载Tomcat文件。下载地址:http://tomcat.apache.org/Tomcat提供了压缩版和安装版,还区分32位和64位系统版。下载的时候注意分......
  • 0798-7.1.2-如何在Redhat7.8中安装CDP DC
    文档编写目的CDPDC是Cloudera与Hortonworks合并后,第一个融合CDH和HDP所有组件的on-premise版本,CDPDataCenter主要由ClouderaRuntime构成,ClouderaRuntime由超过35个开源......
  • SNMPWALK 安装与使用详解
     简介snmpwalk是SNMP的一个工具,它使用SNMP的GETNEXT请求查询指定OID(SNMP协议中的对象标识)入口的所有OID树信息,并显示给用户。通过snmpwalk也可以查看支持SNMP协议(可网管)......
  • 安装Sublime Text 3插件的方法:
    安装SublimeText3插件的方法:直接安装安装Sublimetext3插件很方便,可以直接下载安装包解压缩到Packages目录(菜单->preferences->packages)。使用PackageControl组件安装也......
  • Linux系统下安装JDK8和Maven3.8.5
    一、下载JDK8Linux版本官网下载太慢了,小编这里为大家下载好了:二、下载Maven三、使用xftp上传到linux上四、解压1.解压maventar-zxvfapache-maven-3.8.5-bin.tar.gz2.重......
  • [Chrome]CenOS7安装Chrome
    1.下载地址wgethttps://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm2.安装yuminstallgoogle-chrome-stable_current_x86_64.rpm-y3.......
  • Rocky9 编译安装 Nginx Mariadb Asp.net Core6 (实测 笔记)
    一、查看硬件信息查看物理cpu个数、核心数量、线程数grep'physicalid'/proc/cpuinfo|sort-u|wc-lgrep'coreid'/proc/cpuinfo|sort-u|wc-lgrep'process......
  • Ubuntu20.04安装python3-pip后安装sqlalchemy报错AttributeError: module 'platform'
    解决方法如下:1.首先卸载已经安装python3-pipsudoaptremovepython3-pip2.安装python3.8-pipsudopython3.8-measy_installpip3.安装sqlalchemywang@wang:~$sudopip3.......
  • mysql安装
    1.要看linux中有没有安装,如果有就删除rpm-qa|grepmysqlrpm-qa|grepmariadb  (自带的会和mysql冲突)rpm-e--nodeps 软件名称    (卸载软件)2.安装r......