rpm --import http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/RPM-GPG-KEY-EPEL-6
wget http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
yum install graphite-web graphite-web-selinux mysql mysql-server MySQL-python python-carbon
service mysqld start
MySQL の root パスワード等は適宜設定する。
cp /etc/graphite-web/local_settings.py /etc/graphite-web/local_settings.py.bk
cat << EOT >> /etc/graphite-web/local_settings.py
DATABASES = {
'default': {
'NAME': 'graphite',
'ENGINE': 'django.db.backends.mysql',
'USER': '${your_name}',
'PASSWORD': '${your_password}',
'HOST': 'localhost',
'PORT': '3306',
}
}
EOT
mysql -e "CREATE USER 'graphite'@'localhost' IDENTIFIED BY 'complexpassw0rd';" -u root
mysql -e "GRANT ALL PRIVILEGES ON graphite.* TO 'graphite'@'localhost';" -u root
mysql -e "CREATE DATABASE graphite;" -u root
mysql -e 'FLUSH PRIVILEGES;' -u root
/usr/lib/python2.6/site-packages/graphite/manage.py syncdb
/etc/init.d/carbon-cache start
/etc/init.d/httpd start