Deploying Cerb5 on a Linode virtual server in about 5 minutes
If you're having trouble meeting the server requirements for installing Cerb5 on your own hardware, consider a virtual server as a convenient alternative. Virtual servers are generally part of a much larger infrastructure (e.g. cloud computing), and each instance has a dedicated amount of storage, memory, and computing power.
Virtualization has many advantages:
You can isolate each best-of-breed application in a virtual server that provides its ideal environment (e.g. OS, programming language, server applications), even if that differs from your standard corporate tools. For example, Cerb5 requires PHP/MySQL. Other applications may require Ruby/Nginx/PostgreSQL, or Python/CouchDB, or Windows/IIS/C#/SQL-Server. You're able to utilize the best applications for a particular job rather than being limited to the tools of a specific platform. (This is even more of a benefit in web-based software that you subscribe to rather than install.)
A virtual server can be isolated from the failure of specific hardware. Virtualization combines the resources of many computers and they are capable of automatically routing virtual machines to new hardware in the event of failure.
You can scale up the resources of a virtual machine. With a physical server, you generally have to purchase new equipment (e.g. memory, hard drives) and install them, along with migrating your data. You often have to pay for all your capacity (memory, storage, processing) in advance. With a virtual server you can upgrade the memory, storage, and computing power with a couple of mouse clicks.
You can scale down the resources of a virtual machine. When you're decommissioning a rented server (e.g. migrating customers to different hardware), you can end up in a situation where you're paying full price for despite utilizing only 10% of the server's resources. A virtual machine can downsized so you're only paying for what you're using.
- You can have root (full) access on a virtual server. Compared to a shared hosting account, this is one of the main advantages of upgrading to a virtual server.
Our preferred vendor for Linux-based virtual servers is Linode. Here are our favorite things about them:
Their virtual server plans are fair and inexpensive. The cost for increments of memory and storage scales linearly. Their smallest virtual server provides 512MB RAM / 20GB storage for $19.95/month. On the higher end, a 4GB RAM / 160GB storage server is $159.95/month.
They cater to a technical audience. They provide a load balancer service, private IP networks w/ failover, DNS hosting, automation through "StackScripts", and a web-based API.
They provide geographically diverse facilities in the United States (California, Texas, Georgia, New Jersey), as well as London and Tokyo.
- They provide an automated backups service.
In particular, the StackScripts feature of Linode has allowed us to create a fully automated Cerb5 installation. This script can be used to deploy a new Linode virtual server, and it will:
- Install Debian or Ubuntu as the operating system
- Install Apache2, PHP5, MySQL5, Postfix, and Git as infrastructure
- Install Cerb5 and all of its system requirements (including the tricky 'mailparse' extension)
- Create a new virtual host in Apache for Cerb5
- Configure a cronjob for Cerb5's scheduler (to check for mail and perform nightly maintenance)
- Install and configure both Memcached and XCache for fast performance
Sign up at Linode
First, you will need a Linode account to create a new virtual server.
Sign up for a Linode account if you don't have one already. The creation of a new account requires a valid credit card. The cost for a new virtual server is prorated to the next 1st of the month. The least expensive server (Linode 512) is $19.95 per month with a 10% discount for annual prepayment.
(Full disclosure: The signup link above includes our referral number which will credit our own Linode account with $20 if you stay signed up for more than 90 days. We recommend Linode based on its product offering and not the referral rewards. If you object to the commission policy you can delete our referral number during the signup form).
During the signup process you'll be given the option to select the plan for your first Linode. You can upgrade your plan at any time, so we recommend starting with the first Linode 512 plan, which provides a virtual server with 512MB RAM and 20GB storage for $19.95/month (as of November 15th 2011). There's nothing wrong with choosing a larger plan if you anticipate needing more storage or computing resources.
When you first log in to the Linode Manager you should see your virtual server in the Linodes tab along with its dedicated public IP. We recommend setting up a DNS "A" record for this IP on the new hostname where you plan to access Cerb5; e.g.
Click Dashboard next to the virtual machine name.
If you plan to send mail from the virtual machine instead of using an existing SMTP server (like Exchange or Google Apps) then you should set up the Reverse DNS record to reduce the likelihood that your mail is marked as spam. Click the Remote Access tab near the top of the page. Click the Reverse DNS link under Public Network and enter the hostname you selected above.
Deploy a Cerb5 automated installation
Now that you have a virtual server we can deploy a fully automated installation of Cerb5 and all of its requirements.
Click the Rebuild tab and select the Deploying using StackScripts option.
Search for "cerb5" and select the jstanden / Cerb5 result.
Enter your desired settings to automatically configure the server and Cerb5. When selecting a Distribution, a 32-bit OS like Ubuntu 11.10 is preferred because it will use less RAM on smaller virtual machines. Click the Rebuild button at the bottom of the page when finished.
When the Host Job Queue finishes and every job says "Success" to the left, it's time to start up the virtual server.
Click the Boot button near the top of the page.
Connecting to your virtual server
You can now connect to your new virtual server by IP or hostname using SSH.
On a Unix-based OS like Linux or Mac OS X, type:
If you're a Windows user, download PuTTY or run your favorite SSH client.
- At the server command line, type:
tail -f stackscript.log
You should now see a scrolling list of text as the server is automatically configured for you. Wait for a few minutes until you see the text "All set!". Type CTRL+C to return to the command line.
Logging in to Cerb5
If you configured your DNS properly above, you should be able to access Cerb5 from your web browser.
Open your web browser to http://helpdesk.example.com/cerb5/
(Be sure to replace
helpdesk.example.comwith your own hostname)
Enter the Cerb5 login details you created when deploying the server.
Welcome to your fully configured virtual server fine-tuned for Cerb5!
Linode offers an inexpensive, automated backup service. You can enable it from the Backups tab in the Linode Manager. Although this service makes consistent snapshots of your virtual server, you should still create a database backup using
mysqldump for reliability. See: http://www.cerberusweb.com/book/#backups
Customize the deployment script
If you have specific deployment needs you can create your own version of the Cerb5 StackScript. You can also port it to different cloud services that have a similar feature. See: http://www.linode.com/stackscripts/view/?StackScriptID=3591