Ruby Asylum: Typo Installation (Shared cPanel Servers) http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers en-us 40 A place for those crazy about Ruby Typo Installation (Shared cPanel Servers) <p><em>This version of Typo requires FastCGI and Rails version 1.1. The current servers that this will work on are Gallifrey and Telos.</em></p> <p>A. Creating your database for Typo:<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">typo</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_typo</span>.</li> <center><img src="http://rubyasylum.com/images/currentdatabases.gif" alt="Curent Databases" /></center> <li>Under <em>Current Users</em> area as seen in the example below, enter <span style="color:red">typo</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_typo</span>.</li> <center><img src="http://rubyasylum.com/images/currentusers.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_typo</span> and select in the "Database" dropdown <span style="color:red">cPaneluser_typo</span>, then click "Add User to Database" button.</li> <center><img src="http://rubyasylum.com/images/adduserstoyourdatabases.gif" alt="Add Users to Your Databases" /></center> </ol> </p> <p>B. Get a Copy of typo.tar.gz</p> <p>Download a copy of the current release (svn copy) from <a href="http://rubyasylum.com/typo.tar.gz">here</a>. After obtaining a copy that you have saved to your system, you can then proceed with the next steps.</p> <p>C. Upload Typo Using cPanel:<br /> <ol> <li>Log into cPanel.</li> <li>Click on "File Manager" icon:</li> <center><img src="http://rubyasylum.com/images/filemanager.gif" alt="File Manager" /></center> <li>A new window will open. In that new window, click on "Upload File(s)" link toward the top:</li> <center><img src="http://rubyasylum.com/images/uploadfiles.gif" alt="Upload File(s)" /></center><br /> <li>The page will load new content. Click one of the "Browse..." buttons:</li> <center><img src="http://rubyasylum.com/images/browse.gif" alt="Browse" /></center><br /> <li>The Windows "File Upload" dialog prompt will open. Navigate to where you saved <strong>typo.tar.gz</strong> on your system, highlight <strong>typo.tar.gz</strong>, then click the "Open" button.</li> <center><img src="http://rubyasylum.com/images/fileupload.gif" alt="File Upload" /></center><br /> <li>Back at the File Manager screen where you have the "Browse..." button, click the "Upload" button:</li> <center><img src="http://rubyasylum.com/images/upload.gif" alt="Upload button" /></center><br /> <li>Typo will begin uploading. Please note that it might take awhile for it to upload due to the size, usually around 3-15 minutes depending on your connection speed.</li> </ol> </p> <p>D. Upload Typo via FTP:</p> <p><em>If you prefer to use FTP to upload so you see the progress of the file upload, try the following instead</em><br /> <ol> <li>Open your FTP client and access your account via FTP with most clients using the following to connect:<br /> <strong>Host/Address:</strong> domain.com<br /> <strong>Username:</strong> cPanelusername<br /> <strong>Password:</strong> cPanelpassword<br /></li> <li>Highlight the file <strong>typo.tar.gz</strong> on your system where you saved it and right click.</li> <li>Select upload (it needs to be uploaded to your main directory not inside public_html folder, so you should be at the level where you see public_html listed as a folder)</li> <li>Wait for the file to complete uploading.</li> <li>You can view an image of what Filezilla FTP client would look like for this process at <a href="http://rubyasylum.com/images/filezillaftp.gif">this location</a>.</li> </ol> </p> <p>E. Extracting Typo:<br /> <ol> <li>Log into cPanel if you aren't already logged into it.</li> <li>Click on "File Manager" icon if you aren't already in there:</li> <center><img src="http://rubyasylum.com/images/filemanager.gif" alt="File Manager" /></center> <li>A new window will open for File Manager, then click on the <strong>typo.tar.gz</strong> file name (not the icon):</li> <center><img src="http://rubyasylum.com/images/typotargz.gif" alt="Typo File" /></center><br /> <li>In the upper right hand corner, there are a list of links. Select "Extract File Contents" link in that list:</li> <center><img src="http://rubyasylum.com/images/extractfilecontents.gif" alt="Extract File Contents" /></center><br /> <li>A new window will open with the extracted files and folders listed as the extraction processes. Wait until this finishes (will say Done at the bottom left of most browsers once completed), then close the new window.</li> <li>In the File Manager window, refresh your browser. You should now see a folder called <strong>typo</strong> there:</li> <center><img src="http://rubyasylum.com/images/typofolder.gif" alt="Typo Folder" /></center> </ol> </p> <p>F. Changing the database.yml file for your database details:<br /> <ol> <li>In File Manager, click on the folder icon to the left of the <strong>typo</strong> folder:</li> <center><img src="http://rubyasylum.com/images/typofoldericon.gif" alt="Typo Folder Icon" /></center><br /> <li>Click on the folder icon to the left of the <strong>config</strong> folder:</li> <center><img src="http://rubyasylum.com/images/configfoldericon.gif" alt="Config Folder Icon" /></center><br /> <li>Click on the <strong>database.yml</strong> file name (not the icon):</li> <center><img src="http://rubyasylum.com/images/databaseymlfile.gif" alt="database.yml File" /></center><br /> <li>In the upper right hand corner, click on "Edit File" link as shown below.</li> <center><img src="http://rubyasylum.com/images/editfile.gif" alt="Edit File" /></center><br /> <li>A new window will open with the following in it:<br /> <code>login: &login<br /> adapter: mysql<br /> host: localhost<br /> username: cPaneluser_typo<br /> password: database user pass here<br /> <br /> development:<br /> database: cPaneluser_typo<br /> <<: *login<br /> <br /> test:<br /> database: cPaneluser_tests<br /> <<: *login<br /> <br /> production:<br /> database: cPaneluser_typo<br /> <<: *login</code></li><br /> <li>Replace <span color="color:red">cPaneluser</span> with your cpanel username (there are 4 instances of this on lines 4, 8, 12 and 16). Do not remove the <span style="color:red">_typo</span> or <span style="color:red">_tests</span> part. For example, I would replace <span style="color:red">cPaneluser_typo</span> with <span style="color:red">rubyasyl_typo</span> for my rubyasylum.com account.</li> <li>In the <span style="color:red">password:</span> line (line 5), input the password you used when creating your database user earlier.</li> <li>Click the "Save" button, then close that window (keep the File Manager Window open though).</li> </ol> </p> <p>G. Importing the database:<br /> <ol> <li>In File Manager, click on the "Up one level" link toward the top to go back to the main <strong>typo</strong> folder:</li> <center><img src="http://rubyasylum.com/images/uponelevel.gif" alt="Up one level" /></center><br /> <li>Click on the folder icon to the left of the <strong>db</strong> folder:</li> <center><img src="http://rubyasylum.com/images/dbfoldericon.gif" alt="Db Folder Icon" /></center><br /> <li>Click on the <strong>schema.mysql-v3.sql</strong> file name (not the icon):</li> <center><img src="http://rubyasylum.com/images/schemamysqlv3sqlfile.gif" alt="schema.mysql-v3.sql File" /></center><br /> <li>In the upper right hand corner, click on the "Show File" link:</li> <center><img src="http://rubyasylum.com/images/showfile.gif" alt="Show File" /></center><br /> <li>A new window will open. Copy the contents of that file from the <span style="color:red">--This file is autogenerated by the Rail schema generator, using</span> line to the bottom of the file. Paste those contents into notepad or some note program (do not use MS Word).</li> <li>Close the File Edit Window and Close File Manager Window.</li> <li>Back in the main cPanel area, click on "MySQL Databases" icon:</li> <center><img src="http://rubyasylum.com/images/mysqldatabases.gif" alt="MySQL Databases" /></center> <li>Sroll to the bottom of that area, then click on the "phpMyAdmin" link, which opens a new window:</li> <center><img src="http://rubyasylum.com/images/phpmyadmin.gif" alt="phpMyAdmin" /></center><br /> <li>In the new window, click on the name of your database (should be <span style="color:red">cPaneluser_typo</span> where <span style="color:red">cPaneluser</span> is your cPanel username) on the left hand side:</li> <center><img src="http://rubyasylum.com/images/phpmyadmin-dbselection.gif" alt="phpMyAdmin Database Selection" /></center><br /> <li>In the top center, click on the "SQL" tab:</li> <center><img src="http://rubyasylum.com/images/sqltab.gif" alt="SQL Tab" /></center><br /> <li>Take the Notepad contents that you copied above in this section Step 3, then paste all of that into the <strong>Run SQL query/queries on database box</strong> in phpMyAdmin:</li> <center><img src="http://rubyasylum.com/images/runsqlquery.gif" alt="Run SQL Query/Queries on Database Box" /></center><br /> <li>Click the "Go" button:</li> <center><img src="http://rubyasylum.com/images/sql-gobutton.gif" alt="SQL Go Button" /></center><br /> <li>Close out of the phpMyAdmin window.</li> </ol> </p> <p>H. Symlinking your folder to typo:<br /> <ol> <li>In cPanel main area, click on "Cron Jobs" icon:</li> <center><img src="http://rubyasylum.com/images/cronjobs.gif" alt="Cron Jobs" /></center> <li>Click "Advanced (Unix Style)" button:</li> <center><img src="http://rubyasylum.com/images/cronjobs-advancedunix.gif" alt="Advanced (Unix Style) Button" /></center> <li>Enter the following as an example in the Advanced area:<br /> <pre style="font-size:12px">Minute Hour Day Month Weekday 10 7 * * * </pre></li> <li>This would run the cron at 7:10am Pacific time each day of the week. Change the <span style="color:red">10</span> to a time 5 minutes from the current hour (so if it is currently 11:27am, change to <span style="color:red">32</span> for the Minute). Change the hour to the current hour (so if it is currently 11:27am, change to <span style="color:red">11</span>).</li> <li>Enter the following for the Command field:<br /> <pre style="font-size:12px">cd /home/username/public_html && ln -s ../typo/public typo</pre></li> <li>Replace <span style="color:red">username</span> in the command path with your cPanel username, then click "Commit changes" button. See the image below for an example of what the area might look like before you click that button:</li> <center><img src="http://rubyasylum.com/images/cronjobs-symlink.gif" alt="Cron Jobs Advanced Screen" /></center><br /> <li>After you click "Commit changes" button, then click the Go Back link on the new screen:</li> <center><img src="http://rubyasylum.com/images/goback.gif" alt="Go Back link" /></center><br /> <li>Wait for the cron job to process (around 10 minutes after you created it), then delete the cron using the "Delete" link to the far right of it in the "Advanced (Unix Style)" area: <center><img src="http://rubyasylum.com/images/delete.gif" alt="Delete" /></center><br /> Please note that it is <span style="color:red; font-weight:bold">very</span> important that you perform this delete step so this cron does not keep running daily as you only want it to run this one time for the symlink creation.</li> <li>You can check if the symlink actually worked by going into "File Manager" area, clicking on the folder icon next to <strong>public_html</strong>, then on the folder icon next to the new <strong>typo</strong> folder that should now be in public_html folder. It should have the same contents that <strong>/home/username/typo/public</strong> does.</li> </ol> </p> <p>I. Running rake migrate in cron:<br /> <ol> <li>In cPanel main area, click on "Cron Jobs" icon again:</li> <center><img src="http://rubyasylum.com/images/cronjobs.gif" alt="Cron Jobs" /></center> <li>Click "Advanced (Unix Style)" button:</li> <center><img src="http://rubyasylum.com/images/cronjobs-advancedunix.gif" alt="Advanced (Unix Style) Button" /></center> <li>Enter the following as an example in the Advanced area:<br /> <pre style="font-size:12px">Minute Hour Day Month Weekday 10 7 * * * </pre></li> <li>As before, this would run the cron at 7:10am Pacific time each day of the week. Change the <span style="color:red">10</span> to a time 5 minutes from the current hour (so if it is currently 11:27am, change to <span style="color:red">32</span> for the Minute). Change the hour to the current hour (so if it is currently 11:27am, change to <span style="color:red">11</span>).</li> <li>Enter the following for the Command field:<br /> <pre style="font-size:12px">cd /home/username/typo && /usr/local/bin/rake migrate</pre></li> <li>Replace <span style="color:red">username</span> in the command path with your cPanel username, then click "Commit changes" button.</li> <li>After you click "Commit changes" button, then click the Go Back link on the new screen:</li> <center><img src="http://rubyasylum.com/images/goback.gif" alt="Go Back link" /></center><br /> <li>Wait for the cron job to process (around 10 minutes after you created it), then delete the cron using the "Delete" link to the far right of it in the "Advanced (Unix Style)" area: <center><img src="http://rubyasylum.com/images/delete.gif" alt="Delete" /></center><br /> Please note that it is <span style="color:red; font-weight:bold">very</span> important that you perform this delete step so this cron does not keep running daily as you only want it to run this one time for the database migration.</li> </ol> </p> <p>J. Loading up Typo in a browser:<br /> <ol> <li>Now you can load up your Typo script in a browser using <a href="http://yourdomain.com/typo/">http://yourdomain.com/typo/</a> (replace yourdomain.com with your actual domain name).</li> <li>If th rake migrate cron job in Section I failed, you would see a MySQL error about <strong>cPaneluser_typo.triggers</strong>. If you are unable to get the rake migrate cron to process for you, please open a ticket to <a href="mailto:support@lunarpages.com">support@lunarpages.com</a> with the last 4 digits of your credit card on file with us or the billing address, zip code, telephone number and the first and last characters of your cPanel password for confirmation along with the request to run <span style="color:red">rake migrate</span> from your <strong>/home/username/typo</strong> folder. Please ensure you provide your cPanel username in the ticket and the url for typo in a browser that is returning the error (so <a href="http://yourdomain.com/typo/">http://yourdomain.com/typo/</a> where yourdomain.com should be replaced by your actual domain name). This way once we run the command we will know if the script is working as we will be able to test the Typo page in a browser.</li> <li>Once the command has been processed (by your cron or by us running the command), you should then see the Signup screen where you can pick your login details and password for the administrative area. The administrative area will be at <a href="http://yourdomain.com/typo/admin">http://yourdomain.com/typo/admin/</a>, while your site blog will be at <a href="http://yourdomain.com/typo/">http://yourdomain.com/typo/</a></li> </ol> </p> <p>Have fun blogging!</p> Fri, 02 Jun 2006 08:53:00 -0700 urn:uuid:20fa3187-0a84-460a-90b6-59ddaa055cdf Miraenda http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers Shared Server Tutorials svn 1 shared install installation typo rails http://www.rubyasylum.com/articles/trackback/3 "Typo Installation (Shared cPanel Servers)" by madison k im stink Tue, 23 Sep 2008 18:15:30 -0700 urn:uuid:80c52fa4-f4ad-4d76-9524-b6e69c9dc0d7 http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers#comment-1387 "Typo Installation (Shared cPanel Servers)" by dmitri you suck Tue, 23 Sep 2008 18:14:57 -0700 urn:uuid:9e585512-9698-44b8-9106-c56492721a1f http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers#comment-1386 "Typo Installation (Shared cPanel Servers)" by amin hi Tue, 23 Sep 2008 18:14:12 -0700 urn:uuid:4e1e9bd0-37b3-47d6-a4c8-889230de1377 http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers#comment-1385 "Typo Installation (Shared cPanel Servers)" by Dmitri I answered my own question! Yes, the hour has to be in Pacific time, I would imagine either PDT or PST depending on time of year. For your international users, the time can be found here: <a href='http://time.gov/timezone.cgi?Pacific/d/' rel="nofollow">http://time.gov/timezone.cgi?Pacific/d/</a>-8/java Sun, 14 Sep 2008 11:21:32 -0700 urn:uuid:e7b95355-77da-444f-b1e5-dd6733023b4f http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers#comment-1384 "Typo Installation (Shared cPanel Servers)" by Dmitri I have a question about running the commands as cron jobs. Do I need to convert my local time into Lunarpages local time? I imagine that Lunarpages uses Pacific time, but I can't seem to find a way to figure out the actual server time. Sun, 14 Sep 2008 11:18:39 -0700 urn:uuid:fa3568c6-6429-49c3-9496-c93a1bb73a50 http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers#comment-1383 "Typo Installation (Shared cPanel Servers)" by lucy Thank you for your instruction, worked very well, very happy to see the app up and running in 20 minutes. (probably less time needed, I was watching tv at the same time) Wed, 16 May 2007 19:35:49 -0700 urn:uuid:8e34c421-c25b-430a-a2e2-ac7e83beb570 http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers#comment-1358 "Typo Installation (Shared cPanel Servers)" by oDesk step by step installation guide, it could be used for other rails applications too. very nice, Thanks Tue, 01 May 2007 07:55:10 -0700 urn:uuid:16a2df0b-1181-4618-8305-0b2b290d1e40 http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers#comment-1357 "Typo Installation (Shared cPanel Servers)" by Thanks! It worked like a charm, good write up, thanks! Tue, 13 Feb 2007 13:11:19 -0800 urn:uuid:df9652f0-5896-4e7c-bf80-0c1f56ce55b6 http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers#comment-1354 "Typo Installation (Shared cPanel Servers)" by Miraenda Hi budee,<br /> Is your cPanel username actually bluedee and is the path to your public_html actually /home/bluedee/public_html ? If you aren't on cPanel, your path would be different. I have an account with Lunarpages with username daniel4 that is path /home/daniel4/public_html to my public_html folder. Most Lunarpages accounts have a number in the username, so if you are with Lunarpages, bluedee is likely not your cPanel username. Without knowing your actual path, username or whether you are on cPanel or not, I can't say what your path would be. If you aren't sure the path, you can always contact support for your host (if Lunarpages that would be <a href='mailto:support@lunarpages.com' rel="nofollow">support@lunarpages.com</a>) to have the host tell you the path.<br /> <br /> Have a Blessed Day Thu, 05 Oct 2006 07:01:59 -0700 urn:uuid:8ad6684c-8ef5-4caf-8287-1bf4f60d92a6 http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers#comment-24 "Typo Installation (Shared cPanel Servers)" by budee Hello Miraenda, When I were following your tutorial, I was stucked in symlink process. It didn't work as it should be. I didn't have any typo folder in my public_html. I set this in my cron cd /home/bluedee/public_html && ln -s ../typo/public typo I had waited for about 10 minutes like you said. But, nothing changed. Wed, 04 Oct 2006 23:36:18 -0700 urn:uuid:19b2a22a-d9ad-428c-9186-bc9eaf564a05 http://www.rubyasylum.com/articles/2006/06/02/installing-typo-on-shared-linux-cpanel-servers#comment-23