<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Ruby Asylum: Tag dedicated</title>
    <link>http://www.rubyasylum.com/articles_controller.rb/tag?tag=dedicated</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>A place for those crazy about Ruby</description>
    <item>
      <title>Beast Forum Installation (Dedicated cPanel server)</title>
      <description>&lt;p&gt;&lt;em&gt;This version of Beast forum requires Ruby, Rails and FastCGI with MySQL 4.1 series.  If your dedicated server does not already have Ruby and Rails installed on it, you can contact &lt;a href="mailto:dedicated@lunarpages.com"&gt;dedicated@lunarpages.com&lt;/a&gt; to request an installation.  Please provide the last 4 digits of your card on file for ownership confirmation along with your dedicated server domain name or account username. Managed addon customers have 1 free script installation available to them.  Non-managed addon customers would pay $75 per hour for the script.  Ruby and Rails with FastCGI support takes approximately 1 hour to install.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A. Beast forum requires redcloth gem.  This gem can be installed by the following in shell if you do not already have it:&lt;br /&gt;
&lt;code&gt;gem install redcloth&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;B. Creating your database for Beast forum:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Log into cPanel and click on &lt;strong&gt;MySQL Databases&lt;/strong&gt; icon:&lt;/li&gt;
&lt;center&gt;&lt;img src="http://rubyasylum.com/images/mysqldatabases.gif" alt="MySQL Databases" /&gt;&lt;/center&gt;
&lt;li&gt;As per the example below, enter &lt;span style="color:red"&gt;forum&lt;/span&gt; in the "New Database" field under &lt;em&gt;Current Databases&lt;/em&gt; area, then click "Create Database" button.  Your full database name will then show as &lt;span style="color:red"&gt;cPaneluser_forum&lt;/span&gt;.&lt;/li&gt;
&lt;center&gt;&lt;img src="http://rubyasylum.com/images/currentdatabases-forum.gif" alt="Curent Databases" /&gt;&lt;/center&gt;
&lt;li&gt;Under &lt;em&gt;Current Users&lt;/em&gt; area as seen in the example below, enter &lt;span style="color:red"&gt;forum&lt;/span&gt; for the "Username" field and enter a password that you write in your notes for the "Password" field, then click "Create User" button.  Your full database user's name will then show as &lt;span style="color:red"&gt;cPaneluser_forum&lt;/span&gt;.&lt;/li&gt;
&lt;center&gt;&lt;img src="http://rubyasylum.com/images/currentusers-forum.gif" alt="Curent Users" /&gt;&lt;/center&gt;
&lt;li&gt;Under &lt;em&gt;Add Users to Your Database&lt;/em&gt; area as shown below, select in the "User" dropdown &lt;span style="color:red"&gt;cPaneluser_forum&lt;/span&gt; and select in the "Database" dropdown &lt;span style="color:red"&gt;cPaneluser_forum&lt;/span&gt;, then click "Add User to Database" button.&lt;/li&gt;
&lt;center&gt;&lt;img src="http://rubyasylum.com/images/adduserstoyourdatabases-forum.gif" alt="Add Users to Your Databases" /&gt;&lt;/center&gt;
&lt;/ol&gt;
&lt;/p&gt;

&lt;p&gt;C. Installing Beast forum:&lt;br /&gt;
&lt;code&gt;cd /home/user&lt;br /&gt;
svn checkout http://svn.techno-weenie.net/projects/beast/trunk forum&lt;br /&gt;
cd forum&lt;br /&gt;
rake freeze_edge&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Please replace &lt;span style="color:red"&gt;user&lt;/span&gt; with your cPanel username whenever user is noted.&lt;/p&gt;

&lt;p&gt;D. Edit dispatch.fcgi to fix path to Ruby:&lt;br /&gt;
&lt;code&gt;cd /home/user/forum/public&lt;br /&gt;
vi dispatch.fcgi&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Change the top variable:&lt;br /&gt;
&lt;code&gt;#!/opt/usr/bin/ruby&lt;/code&gt;&lt;br /&gt;
to&lt;br /&gt;
&lt;code&gt;#!/usr/local/bin/ruby&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Save the file, then check the file has 755 file permissions:&lt;br /&gt;
&lt;code&gt;ls -l&lt;br /&gt;
chmod 755 dispatch.fcgi&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;E. Ensure .htaccess has right dispatch.fcgi entry:&lt;br /&gt;
&lt;code&gt;vi .htaccess&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Change:&lt;br /&gt;
&lt;code&gt;RewriteRule ^(.*)$ dispatch.cgi [QSA,L]&lt;/code&gt;&lt;br /&gt;
to&lt;br /&gt;
&lt;code&gt;RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Save the file.&lt;/p&gt;

&lt;p&gt;F. Edit dispatch.rb file to fix path to Ruby:&lt;br /&gt;
&lt;code&gt;cd /home/user/forum/public&lt;br /&gt;
vi dispatch.rb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Change the top variable:&lt;br /&gt;
&lt;code&gt;#!/opt/usr/bin/ruby&lt;/code&gt;&lt;br /&gt;
to&lt;br /&gt;
&lt;code&gt;#!/usr/local/bin/ruby&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Save the file.&lt;/p&gt;

&lt;p&gt;G. Copying the database.example.yml and editing the database.yml file:&lt;br /&gt;
&lt;code&gt;cd /home/user/forum/config&lt;br /&gt;
cp database.example.yml database.yml&lt;br /&gt;
vi database.yml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Replace whatever it has with the following (the 2 spaces to the left of some of the lines are spaces not tabs, so do not change them to tabs):&lt;br /&gt;
&lt;pre style="font-size:11px"&gt;production:
  database: user_forum
  adapter: mysql
  host: 127.0.0.1
  username: user_forum
  password: mydbuserpass&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Change &lt;span style="color:red"&gt;user&lt;/span&gt; to your cPanel username for lines 2 &amp; 5, then change &lt;span style="color:red"&gt;dbuserpass&lt;/span&gt; to have your database user's password (the one you entered in Section B, Step 3).&lt;/p&gt;

&lt;p&gt;Save the file.&lt;/p&gt;

&lt;p&gt;H. Change environment.rb to have the forum in production:&lt;br /&gt;
&lt;code&gt;cd /home/user/forum/config&lt;br /&gt;
vi environment.rb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Change the following:&lt;br /&gt;
&lt;code&gt;#ENV['RAILS_ENV'] ||= 'production'&lt;/code&gt;&lt;br /&gt;
to&lt;br /&gt;
&lt;code&gt;ENV['RAILS_ENV'] ||= 'production'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Save the file.&lt;/p&gt;

&lt;p&gt;I. Symlink the directories (if you will be using Beast forum at &lt;a href="http://domain.com/"&gt;http://domain.com&lt;/a&gt;):&lt;br /&gt;
&lt;code&gt;cd /home/user&lt;br /&gt;
mv public_html public_html.bak&lt;br /&gt;
ln -s /home/user/forum/public public_html&lt;br /&gt;
mkdir public_html/cgi-bin&lt;br /&gt;
chown -R user:user /home/user/forum&lt;br /&gt;
chmod 755 /home/user/forum &amp;&amp; chmod 755 /home/user/forum/public&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you will be using Beast forum at &lt;a href="http://domain.com/folder/"&gt;http://domain.com/folder/&lt;/a&gt;, do the following instead:&lt;br /&gt;
&lt;code&gt;cd /home/user/public_html&lt;br /&gt;
ln -s ../forum/public folder&lt;br /&gt;
chown -R user:user /home/user/forum&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;J. Import the database schema:&lt;br /&gt;
&lt;code&gt;cd /home/user/forum&lt;br /&gt;
rake db:schema:load RAILS_ENV=production&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;K. Beast forum should now be working&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Go to your domain (either &lt;a href="http://domain.com/"&gt;http://domain.com/&lt;/a&gt; or &lt;a href="http://domain.com/folder/"&gt;http://domain.com/folder/&lt;/a&gt; depending on which you chose in Section I), and Beast forum should be working.&lt;/li&gt;
&lt;li&gt;If Beast forum is not working, your app might be cached, so restart apache:&lt;br /&gt;
&lt;code&gt;/etc/init.d/httpd stop&lt;br /&gt;
killall -9 httpd&lt;br /&gt;
/etc/init.d/httpd startssl&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;You can now sign up to the forum as the first signup automatically becomes the admin.  You will be told you are sent an email, but I've found that this first account (the admin one) doesn't receive any activation email.  Other signups (after the first one) should receive an email to activate the account before being able to log into it.&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;

&lt;p&gt;You can see an example of Beast forum at &lt;a href="http://miraenda.com/"&gt;miraenda.com&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Thu, 14 Sep 2006 13:01:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:cb73cbc7-0256-4eb1-8299-1d70f090cf89</guid>
      <author>Miraenda</author>
      <link>http://www.rubyasylum.com/articles/2006/09/14/beast-forum-installation-dedicated-cpanel-server</link>
      <category>server</category>
      <category>dedicated</category>
      <trackback:ping>http://www.rubyasylum.com/articles/trackback/21</trackback:ping>
    </item>
  </channel>
</rss>
