We love Scalr and there’s a great set of instructions for install on CentOS 6.4 but we found there were a number of additional steps that we wanted to share.
Here’s the starting point:
http://wiki.scalr.com/display/docs/Scalr+4.1+on+CentOS+6.4
And here are the changes and additions that we found to be necessary when building on a RackSpace Cloud Server:
In step 1 addded:
1 |
yum install git |
In step 2.3, added:
1 |
yum install php-pear gcc make php-pecl-ssh2 php-pecl-yaml |
In step 3.1, added:
1 |
/sbin/chkconfig --level 345 mysqld on |
Also in 3.1, secured mysql logins and added .my.cnf file according to these instructions:
http://blogs.reliablepenguin.com/2012/10/09/secure-mysql-installation
http://blogs.reliablepenguin.com/2012/10/09/create-my-cnf-file-for-mysql-authentication
In step 3.2, added:
1 |
mysql> flush privileges; |
In step 4, should be config.yml instead of config.ini as indicated in the docs.
1 |
cp config.yml-sample config.yml |
Also in step 4, when editing config.yml set the:
1 |
endpoint -> host |
record to:
1 |
scalr.yourdomain.com |
And change:
1 |
stats_poller -> graphics_url |
record to:
1 |
http://scalar.yourdomain.com/graphics |
In step 6, put the vhost config in /etc/httpd/conf.d/vhosts.conf
The default version of rrdtool is too old …. we need at least 1.4:
1 2 3 4 5 6 |
cd /root yum erase rrdtool rrdtool-devel yum install gettext ruby perl-Time-HiRes wget http://packages.express.org/rrdtool/rrdtool-perl-1.4.7-1.el6.wrl.x86_64.rpm wget http://packages.express.org/rrdtool/rrdtool-1.4.7-1.el6.wrl.x86_64.rpm rpm -i rrdtool-1.4.7-1.el6.wrl.x86_64.rpm rrdtool-perl-1.4.7-1.el6.wrl.x86_64.rpm |
Now setup rrdcached:
1 2 3 4 5 6 7 |
mkdir /var/lib/rrdcached/journal chown rrdcache.rrdcache /var/lib/rrdcached/journal/ mkdir -p /var/www/scalr/rrd/x1x6/ mkdir -p /var/www/scalr/rrd/x2x7/ mkdir -p /var/www/scalr/rrd/x3x8/ mkdir -p /var/www/scalr/rrd/x4x9/ mkdir -p /var/www/scalr/rrd/x5x0/ |
Edit /etc/rc.local and add:
1 2 |
/usr/sbin/rrdcached -t 5 -w 120 -j /var/lib/rrdcached/journal -F \ -l unix:/var/run/rrdcached.sock -p /var/run/rrdcached.pid |
Added following rules to /etc/sysconfig/iptables after the existing ssh rule:
1 2 3 4 |
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 8010 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 8013 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 8014 -j ACCEPT |
Restart iptables:
1 |
/sbin/service iptables restart |
Set Apache to start on boot:
1 |
/sbin/chkconfig --level 345 httpd on |
Start apache:
1 |
/sbin/service httpd start |
Open web browser and go to:
1 |
http://x.x.x.x/ |
Login as user “admin” with password “admin”.
Go to:
1 |
Admins -> admin -> Actions -> Edit |
Set new password and Save.