Top Nav

Archive | Scalr

Scalr 4.5 Install Notes For Cento 6.4

Last year we published an article on installing the open-source version of Scalr:

Now there’s a new 4.5 release of Scalr available so it’s time for an update.

We’re installing on Cento 6.4 hosted on a RackSpace Performance 1 Cloud Server.

The installation instructions have improved since the last time around but Scalr is till a complex install:

Follow these instructions one section at a time and make sure you’ve got the section complete and working before moving to the next section. We’ve provided notes below about each section.

Before you start, select a hostname for the server and add a DNS A record. For this article we’ll use:

You’ll have problems later on if you don’t get the hostname setup in advance.

Also I like to add some swap to the server:

 Create UNIX Users and Group for Scalr

I setup a script at /root/ with the environment variable as follows:

This makes it easy to get the environment right.

Notice that we’re using user “apache” instead of “www-data” since this is CentOS instead of Ubuntu.

Configure your firewall

Edit /etc/sysconfig/iptables and add lines shown:

And restart the service:

Install Scalr’s PHP Dependencies

The PHP dependencies are tricky. Tried using the IUS repository but kept having problems with errors like this:

So I started over with the Remi repository:

Now edit /etc/yum.repos.d/remi.repo and enable the “remi” and “remi-php55” repositories.

The instructions say to install the php-pecl-rrd extension now but it’s better to wait due to dependency issues that we’ll see later.

Also notice that we’re installing php-pecl-http1 instead of php-pecl-http. This is critical.

Install Scalr’s Python Dependencies

Python is installed by default so just a couple of additional packages to install:

As with PHP, we’ll defer installing the python-rrdtool package until a later step.

Configure PHP for Scalr

Edit /etc/php.ini and (a) enable “short_open_tags” and (b) set the “date.timezone” setting.

Update System SNMP MIBs

For CentOS there is no “snmp-mibs-downloader”. I ended up doing nothing for this step.

Download and Install Scalr 4.5

I choose to install Scalr in /opt/scalr with the following steps:

Notice that back in the first step, I set the SCALR_INSTALL environment variable. No run the installer:

Install and Configure MySQL

Install MySQL server and set to start on boot:

Set the mysql root login and secure:

I like to add a .my.cnf file:

Edit the /etc/my.cnf file and add this line to the “[mysqld]” section:

Now create the database and user for Scalr:

And load the database structure and data:

Create the Scalr Cache folder

Install and Configure rrdtool and rrdcached

The default version of rrdtool is too old …. we need at least 1.4:

And now we can get the PHP and Python dependencies that we skipped earlier:

Set rrdcached to start on boot:

Edit /etc/sysconfig/rrdcached and change the “RRDCACHED_USER” to “root” and add the following line:

Now create the graphics and data directories:

And start the service:

Install and Configure Apache

Install Apache “httpd” package and SSL support:

Edit /etc/httpd/conf.d/vhosts.conf and add:

Set Apache to start on boot and start it now:

Configure Scalr

Copy the sample config file:

Now edit the config file at /opt/scalr/app/etc/config.yml and set the following parameters:

Leave the other parameters at default settings.

Configure the Scalr Cronjobs

Edit “apache” cronjobs:

and add the following:

 Configure the Scalr Daemons

Edit /etc/init.d/scalr and copy/paste the following contents:

Now set the service to start on boot and start it for the first time:

Validate your Scalr installation

 Now run the validation script:

Log in to Scalr

Open a browser and go to:

Login with user “admin” and password “admin”.

Go to the Admin -> admin -> edit and change the admin password.

All Done!

Scalr install is now complete. You can get started using Scalr by adding a user and building an environment.



Scalr Install Notes

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:

And here are the changes and additions that we found to be necessary when building on a RackSpace Cloud Server:

In step 1 addded:

In step 2.3, added:

In step 3.1, added:

Also in 3.1, secured mysql logins and added .my.cnf file according to these instructions:

In step 3.2, added:

In step 4, should be config.yml instead of config.ini as indicated in the docs.

Also in step 4, when editing config.yml set the:

record to:

And change:

record to:

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:

Now setup rrdcached:

Edit /etc/rc.local and add:

Added following rules to /etc/sysconfig/iptables after the existing ssh rule:

Restart iptables:

Set Apache to start on boot:

Start apache:

Open web browser and go to:

Login as user “admin” with password “admin”.

Go to:

Set new password and Save.