Ruby Asylum: Category Dedicated Server TutorialsA place for those crazy about Rubytag:www.rubyasylum.com,2005:TypoTypo2006-06-21T02:26:16-07:00Miraendaurn:uuid:0e924fe6-d29b-4e53-8d3c-bafb643699f32006-06-18T18:57:00-07:002006-06-21T02:26:16-07:00Tableau Installation (Dedicated cPanel Servers)<p><em>This version of Tableau requires Ruby 1.8.2 or later and Rails 1.0 or later with FastCGI. If your dedicated server does not already have Ruby and Rails installed on it, you can contact <a href="mailto:dedicated@lunarpages.com">dedicated@lunarpages.com</a> 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.</em></p>
<p>A. Creating your database for Tableau:<br />
<ol>
<li>Log into cPanel and click on <strong>MySQL Databases</strong> icon:</li>
<center><img src="http://rubyasylum.com/images/mysqldatabases.gif" alt="MySQL Databases" /></center>
<li>As per the example below, enter <span style="color:red">tab</span> in the "New Database" field under <em>Current Databases</em> area, then click "Create Database" button. Your full database name will then show as <span style="color:red">cPaneluser_tab</span>.</li>
<center><img src="http://rubyasylum.com/images/currentdatabases-tab.gif" alt="Curent Databases" /></center>
<li>Under <em>Current Users</em> area as seen in the example below, enter <span style="color:red">tab</span> 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 <span style="color:red">cPaneluser_tab</span>.</li>
<center><img src="http://rubyasylum.com/images/currentusers-tab.gif" alt="Curent Users" /></center>
<li>Under <em>Add Users to Your Database</em> area as shown below, select in the "User" dropdown <span style="color:red">cPaneluser_tab</span> and select in the "Database" dropdown <span style="color:red">cPaneluser_tab</span>, then click "Add User to Database" button.</li>
<center><img src="http://rubyasylum.com/images/adduserstoyourdatabases-tab.gif" alt="Add Users to Your Databases" /></center>
</ol>
</p>
<p>B. Checkout tableau via subversion:</p>
<p><em>If you do not already have subversion installed, please see <a href="http://rubyasylum.com/articles/2006/06/03/subversion-installation">this tutorial</a> on how to do so.</em></p>
<p>In shell SSH as root, run the following command, remembering to replace user with the username for the account onto which you are installing Tableau:<br />
<code>cd /home/user<br />
svn checkout svn://creativi.st/tableau/trunk tableau</code></p>
<p>This will create a directory called <strong>tableau</strong> at <strong>/home/user/</strong> with the newest copy of Tableau available.</p>
<p>C. Ensure .htaccess has right dispatch.fcgi entry:<br />
<code>cd /home/user/tableau/public<br />
vi .htaccess<br />
<br />
RewriteRule ^(.*)$ dispatch.cgi?$1 [QSA,L]</code><br />
to<br />
<code>RewriteRule ^(.*)$ dispatch.fcgi?$1 [QSA,L]<br /></p>
<p>D. Copy the database.yml.sample file to database.yml and edit it:<br />
<code>cd /home/user/tableau/config<br />
cp database.yml.sample database.yml<br />
vi database.yml</code></p>
<p>H. Replace whatever it has with the following then change cPaneluser to your cPanel username and somepass to your database user's password (the 2 spaces to the left of some of the lines are spaces not tabs, so do not change them to tabs):<br />
<pre style="font-size:11px"># MySQL (default setup). Versions 4.1 and 5.0 are recommended.
development:
adapter: mysql
database: cPaneluser_tab
username: cPaneluser_tab
password: somepass
# socket: /tmp/mysql.sock
production:
adapter: mysql
database: cPaneluser_tab
username: cPaneluser_tab
password: somepass
# socket: /tmp/mysql.sock</pre></p>
<p>E. Edit the environment.rb file:<br />
<code>cd /home/user/tableau/config<br />
vi environment.rb<br />
<br />
#ENV['RAILS_ENV'] = 'production'</code><br />
to<br />
<code>ENV['RAILS_ENV'] = 'production'<br />
<br />
require 'rmagick'</code><br />
to<br />
<code>require 'RMagick'</code></p>
<p>F. Migrate the database:<br />
<code>cd /home/user/tableau<br />
rake migrate</code></p>
<p>G. Symlink the directories (if you will be using tableau at http://domain.com):<br />
<code>cd /home/user<br />
mv public_html public_html.bak<br />
ln -s /home/user/tableau/public public_html<br />
mkdir public_html/cgi-bin<br />
chown -R user:user public_html<br />
chown user:nobody public_html</code></p>
<p>If you will be using tableau at http://domain.com/folder do the following instead:<br />
<code>cd /home/user/public_html<br />
ln -s ../tableau/public folder</code></p>
<p>H. Loading up Tableau in a browser:<br />
<p>You should now be able to navigate to tableau at either <a href="http://domain.com/">http://domain.com/</a> or <a href="http://domain.com/folder/">http://domain.com/folder/</a>, depending on which you chose in Step G. You will need to signup by clicking the login link on the left hand side to begin administering the gallery.</p>
<p>Please see <a href="http://creativi.st/blog/articles/2006/02/27/tableau">Tableau site</a> for images on administration. Please see a demo of Tableau at <a href="http://gallery.rubyasylum.com">gallery.rubyasylum.com</a>.</p>
<p>Have fun with your new gallery!</p>