Basic Installation

eriksundelof edited this page Jan 3, 2011 · 11 revisions

Installing Simple Blog is really simple.

Just follow these steps:

Step 1: Get the Simple Blog codebase

Checkout the code from github using:

git clone git@github.com:eriksundelof/Simple-Blog.git

Step 2: Install the mandatory gems

Make sure you include all their dependencies when you install them.

      sudo gem install memcached
      sudo gem install rmagick 
      sudo gem install will_paginate
      sudo gem install aws-s3

Comment: If you have already followed the installation steps under Requirements: Installation you do not need to install rmagick again.

Step 3: Basic configuration of your site

  1. Rename settings.yml.example to settings.yml

  2. Edit the block marked as :site:,

    :name: ""
    :tagline: ""
    :description: ""
    :keywords: ""
    :host: "www.domain.com"
    :locale: 'en'
    :noreply: 'noreply@domain.com'
    :email: 'sender@domain.com'
    :salt: "Use a long MD5 hash of a hard-to-guess string to assure sufficient security"
    :prepend_status_update: "Simple Blog RoR"
    :info_account_user_name: '(optional, but if you specify this username make sure you have control of it)'
    
  3. Delete all optional fields, which you do not want.

    1. You can leave all optional entries inside settings.yml, but make sure they are empty strings.
    2. You can find detailed instructions for how you add the optional installations inside the tutorial Optional Installations

Comments:

  • It is strongly suggested that the noreply@domain.com is a blackhole email!
  • Spend some time thinking of the keywords as they are important for SEO
  • You can at any time edit settings.yml but you will need to restart your server to make any change active

Step 4: Signup and add your credentials for ReCAPTCHA

  1. Signup at http://recaptcha.net
  2. Follow their instructions to get a private and public key
  3. Add these credentials to the settings.yml file

Step 5: Setup the support for Hoptoad

  1. Signup for a free account here https://hoptoadapp.com/account/new/Egg
  2. Add your API key to the settings.yml

Why is this required?

  • Simple Blog is a young product why this will be very helpful for track down potential issues and also helps me troubleshoot if something goes wrong with your Simple Blog installation.
  • If you strongly feel this you do not want to have this service enabled, contact me at webmaster@sundelof.com and I can guide you how to turn this off.

Step 6: Doublecheck the settings.yml file

Look through the settings.yml file to make sure you have all the settings you want. You can of course at any time change entries in the file and restart your server to make your edits active.

Step 7: Setup the support for Amazon S3

Simple Blog makes use of Amazon S3 for storing images and other assets to improve page load.

  1. Go to the url to signup for Amazon S3 at http://aws.amazon.com/s3/
  2. Rename s3.yml.example to s3.yml
  3. Add your access key and secret access key to s3.yml!
  4. Create a bucket on S3 and make sure it is writable
  5. Add that bucket name to settings.yml at s3_bucket_name

Comment: You can turn this support off. If you would like to do so contact me at webmaster@sundelof.com

Step 8: Signup for Defensio Spam protection

Simple Blog contains efficient countermeasures for spam comments, and makes use of the Defensio platform.

  1. Signup at http://www.defensio.com
  2. Follow the instructions to obtain an API key
  3. Rename the file defensio.yml.example to defensio.yml
  4. Add your Defensio API credentials to defensio.yml!

Step 9: Setup the database

  1. Rename database.yml.example to database.yml
  2. Create a database using your database administration tool
  3. OPTIONAL: Create a database user
  4. OPTIONAL: Add the database user
  5. Add your database credentials
  6. Run rake db:create or rake db:migrate

Step 10: Provide your outgoing email settings

SimpleBlog uses ActionMailer to send emails, but as the SMTP server is not always local you will need to provide those settings.

  1. Rename the file email.yml.example to email.yml.example

  2. Edit the email.yml file to provide your SMTP settings:

      :address: mail.domain.com
      :port: 25
      :authentication: plain
      :user_name: user@domain.com
      :password: password
    

Step 11: Restart your server!

Step 12: Add a scheduled job to calculate the view count

Simple Blog comes with a built-in view mechanism. In order for you to take advantage of that you need to add a scheduled job to make sure the view counts update. Adding this is really simple. For development and test servers, you can disregard this step.

Just add the following cronjob: cd PROJECT_ROOT; export RAILS_ENV=production; /usr/bin/ruby script/process_clickstream >> log/process_clickstream.log

Comment: Substitute PROJECT_ROOT for your full path to your Rails project.

Step 13: Register as a new user using the normal registration

Step 14: Make sure this user gets admin privileges

  1. In your project root: script/console >> p = Profile.find_by_email('PUT YOUR EMAIL HERE') >> p.update_attributes({:password => p.password, :confirm_password => p.password, :is_admin => true})

  2. OPTIONAL: If you want this to be your info account for the site, add this user name to settings.yml as the info_account_user_name

Comment: info_account_user_name is the username which will post all site wide actions to Twitter and/or Facebook if such an integration exists.

Step 15: OPTIONAL

Simple Blog contains a lot of other features, which you may want to turn on. You will find detailed instructions for how to turn these on under the tutorial Optional Installations