Jeff Smith

Text

Installing Simplelog on A Small Orange

Having recently installed Simplelog on my A Small Orange hosting account, I thought I’d go through the install process here for the benefit of those that might be running into problems getting it set up. I’ll also throw in a few other general tips and tricks for those that may be setting it up on a similar setup. First things first, you’ll need to download the latest version of Simplelog from the Simplelog website: or, if you’re feeling adventurous you can download the latest development version from Simplelog SVN: using the username and password ‘anonymous’. Next, you’ll want to set up a new database for Simplelog by logging into cPanel and creating a new database in the MySQL area. Make sure to take note of your DB name, username, and password, we’ll need these a little later on. Now we’re going to set the chmod (permissions) for a few files and configure Simplelog. Personally, I like to do both of these steps before I upload Simplelog to my server even though I have SSH access. If you have SSH access or now how to set permissions using your FTP program of choice, you could do it after uploading Simplog. For setting permissions, I’m going to use Terminal (since I’m using OSX) and navigate to the folder that I’ve downloaded/unzipped Simplelog on my local machine. Computer:~/Downloads/simplelog_2.0.2 username$ chmod 755 log/
Computer:~/Downloads/simplelog_2.0.2 username$ chmod 755 theme_backup/
Computer:~/Downloads/simplelog_2.0.2 username$ chmod 755 public/dispatch.fcgi
Input the above commands into Terminal (or your command line tool of choice) while in the unzipped Simplelog directory. Next we’re going to set up our database and configuration settings. First, open config/database.yml and edit it to match your database details (using the DB name, username, and password we set up earlier). For those that are setting up Simplelog on a host other than A Small Orange (or those wanting to use a PostgresSQL DB) there are a couple of other example database.yml files in the config directory. If your MySQL server address is anything other than ‘localhost’, you’ll want to use the database_dreamhost.yml for your example. It contains a ‘host’ field that will allow you to type in a named MySQL address for your server (i.e. mysql.mydomain.com). One last thing before we upload everything to our A Small Orange server, since ASO is running Rails through FCGI, we’ll need to force Simplelog to run in production mode. Running in production mode will speed things up for us and will put a lot less strain on our shared server (Rails apps should always be run in production mode on your shared server, development should be done locally or on your own development server). So to force production mode, we’re going to open up the environment.rb file in the config directory and add this line to it around line 39: ENV['RAILS_ENV'] ||= 'production'. Another step that you’ll notice that I’ve skipped (that you would normally have to take care of for most Rails apps) is opening the .htaccess file in the public folder of Simplelog to point to dispatch.fcgi instead of dispatch.cgi. The reason that I’ve skipped over this is because Simplelog is already configured this way when downloaded, so you don’t have to worry about it. Now that we’ve done all this, we’ll upload Simplelog to our server. Since this isn’t a normal HTML/PHP/etc. application, we’re going to be uploading it to our main user directory (/home/username/). I prefer to keep all my Rails applications in one directory by themselves, so I’ve created a rails folder in my home directory. Change to that folder and upload the Simplelog folder from your local machine. Once everything is finished uploading, we’re going to SSH into the server to bootstrap our database (bootstrapping includes importing the database schema and a bit of sample data). To bootstrap our database we’ll want to run these commands once we’re logged in to our server: username@Server [~]# cd rails/simplelog_2.0.2
username@Server [~]# rake simplelog:install
You should now get a message that rake tasks have been completed if the install was successful. Just one last step before we can start blogging using Simplelog. Since we’ve put Simplelog somewhere other than in our public_html folder, we need to create a symbolic link to the public folder of Simplelog so that visitors will see something when they reach our website. This next step will delete all of the data that currently resides in your public_html directory. Make sure to make a complete backup of public_html before continuing with the next step! While still logged in to our server via SSH, we’re going to cd back to our home directory: username@Server [~]# cd ../.. After making a complete backup of our public_html folder we’ll run the following commands: rm -rf ~/public_html
ln -sf ~/rails/simplelog/public ~/public_html
There, now we can log out of our server and visit our website (http://yourdomain.com/) to make sure that everything went as it should. The first time that you visit your Simplelog install, it will take a little longer than normal for your site to load. This is because Simplelog is running through FCGI, so the extra load time is to wait for the dispatch.fcgi process to start up. After a brief wait you should see the default template for Simplelog show up and now you can visit http://yourdomain.com/admin and log in using the default email/password for Simplelog: Email: temp@email.com/Password: !@gonow (make sure to change this when you log in for the first time). Now we’re all set to start blogging!

This article is merely a guide. If you’re having problems getting Simplelog installed properly, please visit the Simplelog Wiki or the Simplelog Forums for more help and support.

  • Simplelog Version: 2.0.2
  • Last Updated: March 26, 2007
View comments
Posted on Monday, March 26 2007.
1
Notes
  1. jeffsmith posted this

Jeff Smith This is the home of Jeff Smith, a web developer, designer, and craft beer connoisseur living in Amherst, Nova Scotia. This blog was formerly known as "From Away".

You can find out more about me by viewing my work, following my tweets, or by following my growing photography skills. Feel free to get in touch if you'd like to chat about anything.
PortfolioPhotosContact
Previous Next