Comparing version 2 and version 1
Here’s a guide on how to set up RadiantCMS in a few minutes on "Site 5":http://site5.com. I changed my shell from the default jailshell to bash by simply toggling shell access off and then back on again. I don't know if this is required for the following (I don't think it should, but it's nice to be able to see the whole server). This guide assumes you: * Know how to use the shell * Know how to use ssh h2. Install Your Own Gems First, you need to tell RubyGems where to install your own custom gems since Radiant is not preinstalled on Site5's servers. We'll use the folder gems. SSH into your site and create the folder. Then, create the file ~/.gemrc with the following content (with, of course, your username in place of username):Ensure that your changes took effect:gemhome: /home/username/gems gempath: - /home/username/gems - /usr/lib/ruby/gems/1.8Although not required for the basic installation, some of the rake tasks depend upon the shell variables $GEM_HOME and $GEM_PATH. It's not a bad idea to add them to your .bash_profile like so:$ gem env RubyGems Environment: - VERSION: 0.9.2 (0.9.2) - INSTALLATION DIRECTORY: /home/username/gems - GEM PATH: - /home/username/gems - /usr/lib/ruby/gems/1.8 - REMOTE SOURCES: - http://gems.rubyforge.orgh2. Install the Radiant Gem and Unpack the App Great! Now this is very simple:export GEM_PATH=/home/username/gems:/usr/lib/ruby/gems/1.8 export GEM_HOME=/home/username/gemsJust one note here: Every time I tried this (and it was several), I needed to do it twice. The first time it would always fail, claiming it couldn't find the Radiant Gem. But the second time it would find it and work install without trouble. Unpack the application using the$ gem install --include-dependencies radiant"radiant"radiant command into the directory"radapp"radapp (it will create the directory if it does not exist).h2. Configuration Now, you should have the new folder$ ~/gems/bin/radiant --database mysql radapp‘radapp’radapp in your current directory. Using Site5's!SiteAdminSiteAdmin on your domain (located at yourdomain.com/siteadmin), create the databasesradiantdev,radiantdev,radianttest,radianttest, and radiantlive (note that your username_ is prepended to all those table and user names). Create a new MySQL user"radiant",radiant, and give it access to all functions on all those databases (watch out -- those checkboxes to give privileges on the MySQL user page don't mirror your current settings. To see that, you need to go to the databases page.) Once that is all completed, edit radapp/config/database.yml with those settings; the file should look something like this:Now edit the filedevelopment: adapter: mysql database: username_radiantdev username: username_radiant password: pword host: localhost test: adapter: mysql database: username_radianttest username: username_radiant password: pword host: localhost production: adapter: mysql database: username_radiantlive username: username_radiant password: pword host: localhost’radapp/config/environment.rb’.radapp/config/environment.rb. You need to uncomment a line and add one more, so the following line (should be the 8th line down):# ENV['RAILS_ENV'] ||= 'production'...becomes...becomes...h2. Bootstrap your Database Okay! All of the config files are setup. Now in the radiant application folder, run the rake task to bootstrap the database. Answer the prompts to your liking.ENV['RAILS_ENV'] ||= 'production' ENV['GEM_PATH'] = '/home/username/gems:/usr/lib/ruby/gems/1.8'h2. Setup the Symbolic Link Just create the symlink and you’re done! From your home directory, just do this:$ cd radapp/ $ rake production db:bootstrapNow point your browser to http://your.website.com/. It should be RadiantCMS! To edit pages, go to http://your.website.com/admin. It should be possible to place that symbolic link inside your public_html folder (instead of replacing it), but in my quick testing it, I can't seem to setup Radiant to recognize that it's in a subdirectory. If you figure it out, add that information here.$ mv public_html public_html_bak $ ln -s ~/radapp/public ~/public_html
