SaltyCrane Blog — Notes on JavaScript and web development

Notes on installing Scalr on Ubuntu Jaunty

Here are my notes on installing Scalr. I am using an Alestic Ubuntu 9.04-jaunty-base-20091011 image. Here are my references:

Install prerequisites

apt-get update
apt-get upgrade
apt-get install php5
apt-get install php5-mysql
apt-get install php5-mcrypt
apt-get install php5-mhash
apt-get install php5-snmp
# apt-get install bind9

Install php ssh2 extension

apt-get install php5-dev php5-cli php-pear build-essential
apt-get install libssh2-1-dev
pecl install -f ssh2
echo ‘’ > /etc/php5/conf.d/ssh2.ini

Install snmp

apt-get install snmp
# apt-get install snmpd

Test environment (optional)

/etc/init.d/apache2 restart
cd /var/www

Visit in your browser. You should get the follwing error:

Warning: require_once(/var/www/../src/ [function.require-once]: failed to open stream: No such file or directory in /var/www/testenvironment.php on line 93

Fatal error: require_once() [function.require]: Failed opening required '/var/www/../src/' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/testenvironment.php on line 93

This error means extensions were set up correctly.

Install Scalr code

cd /var
tar zxvf scalr-1.1.0.tar.gz
chown -R www-data:www-data /var/scalr/app/cache /var/scalr/app/cron/ /var/scalr/app/etc/.passwd
chmod 700 -R /var/scalr/app/cache /var/scalr/app/cron/ /var/scalr/app/etc/.passwd
mv www www_old
ln -s /var/scalr/app/www /var/www
# chmod a+rX -R /var/www

Setup MySQL database

apt-get install mysql-server
mysqladmin -p create scalr
mysql -p scalr < /var/scalr/sql/database.sql

Edit /var/scalr/app/etc/config.ini with your database settings.

Configure account

Set up cron jobs

To do. See other references.