Preparing CentOS for stackd.io installation¶
The steps below were written using CentOS 6.4 from a CentOS-provided AMI
on Amazon Web Services (AWS). The exact AMI we used is
and you should be able to easily launch an EC2 instance using this AMI from the
All of the CentOS-provided AMIs have SELinux and iptables enabled. We disabled both of these to be as straight forward as possible during this guide. SELinux causes issues that are beyond the scope of the guide, and we disabled iptables because we leverage EC2’s security groups for firewall access.
Let’s just turn it off for now. Please note, if you’re using EC2 or some other cloud provider that has firewall rules enabled by default, you will need to configure the particular firewall rules to gain access to the web server we’ll start in the guide. The default port for the webserver is 8000, so open this port up at a minimum. (Port 22 for SSH will obviously be needed as well.)
sudo service iptables stop
Getting things working using SELinux could be an entirely separate guide. For our purposes, it’s completely out of scope, so we’re going to disable it.
You will be required to restart the machine during this step.
# Edit /etc/sysconfig/selinux and make sure the line beginning # with SELINUX looks like: SELINUX=disabled # If it was already disabled you can skip the following, however # if you switched the policy from anything other than 'disabled' # you need to relabel the filesystem to remove the garbage that # SELinux has added. This *requires* a restart to take effect. touch /.autorelabel reboot # When the machine is back up, you can confirm SELinux is not # running >>> selinuxenabled >>> echo $? >>> 1 # If the output is 1 you're good to go.
sudo rpm -Uvh http://mirror.steadfast.net/epel/6/i386/epel-release-6-8.noarch.rpm
Please skip this section if you are using a different database or already have a supported database server running elsewhere.
Install MySQL server:
sudo yum install mysql-server
Start MySQL server:
sudo service mysqld start
Below we’ll create a
stackdio database and grant permissions to the
stackdio user for that database.
We’re not focusing on security here, so the default MySQL setup definitely needs to be tweaked, passwords changed, etc., but for a quick-start guide this is out of scope. Please, don’t run this as-is in production :)
echo "create database stackdio; \ grant all on stackdio.* to stackdio@'localhost' identified by 'password';" | \ mysql -h localhost -u root
# install the package sudo yum install python-virtualenvwrapper # Update the user's ~/.bash_profile to enable virtualenvwrapper # You're using the stackdio user, right? :) echo "source /usr/bin/virtualenvwrapper.sh" >> ~/.bash_profile # re-source the .bash_profile . ~/.bash_profile
- gcc and other development tools
To quickly get up and running, you can run the following to install the required packages.
# Install the development tools group sudo yum groupinstall "Development Tools" # Install the other requirements needed to install stackd.io sudo yum install git mysql-devel swig python-devel rabbitmq-server nginx nodejs npm