Typo Installation (Shared cPanel Servers)

Posted by Miraenda Fri, 02 Jun 2006 15:53:00 GMT

This version of Typo requires FastCGI and Rails version 1.1. The current servers that this will work on are Gallifrey and Telos.

A. Creating your database for Typo:

  1. Log into cPanel and click on MySQL Databases icon:
  2. MySQL Databases
  3. As per the example below, enter typo in the "New Database" field under Current Databases area, then click "Create Database" button. Your full database name will then show as cPaneluser_typo.
  4. Curent Databases
  5. Under Current Users area as seen in the example below, enter typo 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 cPaneluser_typo.
  6. Curent Users
  7. Under Add Users to Your Database area as shown below, select in the "User" dropdown cPaneluser_typo and select in the "Database" dropdown cPaneluser_typo, then click "Add User to Database" button.
  8. Add Users to Your Databases

B. Get a Copy of typo.tar.gz

Download a copy of the current release (svn copy) from here. After obtaining a copy that you have saved to your system, you can then proceed with the next steps.

C. Upload Typo Using cPanel:

  1. Log into cPanel.
  2. Click on "File Manager" icon:
  3. File Manager
  4. A new window will open. In that new window, click on "Upload File(s)" link toward the top:
  5. Upload File(s)

  6. The page will load new content. Click one of the "Browse..." buttons:
  7. Browse

  8. The Windows "File Upload" dialog prompt will open. Navigate to where you saved typo.tar.gz on your system, highlight typo.tar.gz, then click the "Open" button.
  9. File Upload

  10. Back at the File Manager screen where you have the "Browse..." button, click the "Upload" button:
  11. Upload button

  12. 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.

D. Upload Typo via FTP:

If you prefer to use FTP to upload so you see the progress of the file upload, try the following instead

  1. Open your FTP client and access your account via FTP with most clients using the following to connect:
    Host/Address: domain.com
    Username: cPanelusername
    Password: cPanelpassword
  2. Highlight the file typo.tar.gz on your system where you saved it and right click.
  3. 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)
  4. Wait for the file to complete uploading.
  5. You can view an image of what Filezilla FTP client would look like for this process at this location.

E. Extracting Typo:

  1. Log into cPanel if you aren't already logged into it.
  2. Click on "File Manager" icon if you aren't already in there:
  3. File Manager
  4. A new window will open for File Manager, then click on the typo.tar.gz file name (not the icon):
  5. Typo File

  6. In the upper right hand corner, there are a list of links. Select "Extract File Contents" link in that list:
  7. Extract File Contents

  8. 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.
  9. In the File Manager window, refresh your browser. You should now see a folder called typo there:
  10. Typo Folder

F. Changing the database.yml file for your database details:

  1. In File Manager, click on the folder icon to the left of the typo folder:
  2. Typo Folder Icon

  3. Click on the folder icon to the left of the config folder:
  4. Config Folder Icon

  5. Click on the database.yml file name (not the icon):
  6. database.yml File

  7. In the upper right hand corner, click on "Edit File" link as shown below.
  8. Edit File

  9. A new window will open with the following in it:
    login: &login
    adapter: mysql
    host: localhost
    username: cPaneluser_typo
    password: database user pass here

    development:
    database: cPaneluser_typo
    <<: *login

    test:
    database: cPaneluser_tests
    <<: *login

    production:
    database: cPaneluser_typo
    <<: *login

  10. Replace cPaneluser with your cpanel username (there are 4 instances of this on lines 4, 8, 12 and 16). Do not remove the _typo or _tests part. For example, I would replace cPaneluser_typo with rubyasyl_typo for my rubyasylum.com account.
  11. In the password: line (line 5), input the password you used when creating your database user earlier.
  12. Click the "Save" button, then close that window (keep the File Manager Window open though).

G. Importing the database:

  1. In File Manager, click on the "Up one level" link toward the top to go back to the main typo folder:
  2. Up one level

  3. Click on the folder icon to the left of the db folder:
  4. Db Folder Icon

  5. Click on the schema.mysql-v3.sql file name (not the icon):
  6. schema.mysql-v3.sql File

  7. In the upper right hand corner, click on the "Show File" link:
  8. Show File

  9. A new window will open. Copy the contents of that file from the --This file is autogenerated by the Rail schema generator, using line to the bottom of the file. Paste those contents into notepad or some note program (do not use MS Word).
  10. Close the File Edit Window and Close File Manager Window.
  11. Back in the main cPanel area, click on "MySQL Databases" icon:
  12. MySQL Databases
  13. Sroll to the bottom of that area, then click on the "phpMyAdmin" link, which opens a new window:
  14. phpMyAdmin

  15. In the new window, click on the name of your database (should be cPaneluser_typo where cPaneluser is your cPanel username) on the left hand side:
  16. phpMyAdmin Database Selection

  17. In the top center, click on the "SQL" tab:
  18. SQL Tab

  19. Take the Notepad contents that you copied above in this section Step 3, then paste all of that into the Run SQL query/queries on database box in phpMyAdmin:
  20. Run SQL Query/Queries on Database Box

  21. Click the "Go" button:
  22. SQL Go Button

  23. Close out of the phpMyAdmin window.

H. Symlinking your folder to typo:

  1. In cPanel main area, click on "Cron Jobs" icon:
  2. Cron Jobs
  3. Click "Advanced (Unix Style)" button:
  4. Advanced (Unix Style) Button
  5. Enter the following as an example in the Advanced area:
    Minute Hour Day Month Weekday
    10     7    *   *     * 
  6. This would run the cron at 7:10am Pacific time each day of the week. Change the 10 to a time 5 minutes from the current hour (so if it is currently 11:27am, change to 32 for the Minute). Change the hour to the current hour (so if it is currently 11:27am, change to 11).
  7. Enter the following for the Command field:
    cd /home/username/public_html && ln -s ../typo/public typo
  8. Replace username 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:
  9. Cron Jobs Advanced Screen

  10. After you click "Commit changes" button, then click the Go Back link on the new screen:
  11. Go Back link

  12. 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:
    Delete

    Please note that it is very 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.
  13. You can check if the symlink actually worked by going into "File Manager" area, clicking on the folder icon next to public_html, then on the folder icon next to the new typo folder that should now be in public_html folder. It should have the same contents that /home/username/typo/public does.

I. Running rake migrate in cron:

  1. In cPanel main area, click on "Cron Jobs" icon again:
  2. Cron Jobs
  3. Click "Advanced (Unix Style)" button:
  4. Advanced (Unix Style) Button
  5. Enter the following as an example in the Advanced area:
    Minute Hour Day Month Weekday
    10     7    *   *     * 
  6. As before, this would run the cron at 7:10am Pacific time each day of the week. Change the 10 to a time 5 minutes from the current hour (so if it is currently 11:27am, change to 32 for the Minute). Change the hour to the current hour (so if it is currently 11:27am, change to 11).
  7. Enter the following for the Command field:
    cd /home/username/typo && /usr/local/bin/rake migrate
  8. Replace username in the command path with your cPanel username, then click "Commit changes" button.
  9. After you click "Commit changes" button, then click the Go Back link on the new screen:
  10. Go Back link

  11. 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:
    Delete

    Please note that it is very 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.

J. Loading up Typo in a browser:

  1. Now you can load up your Typo script in a browser using http://yourdomain.com/typo/ (replace yourdomain.com with your actual domain name).
  2. If th rake migrate cron job in Section I failed, you would see a MySQL error about cPaneluser_typo.triggers. If you are unable to get the rake migrate cron to process for you, please open a ticket to support@lunarpages.com 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 rake migrate from your /home/username/typo 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 http://yourdomain.com/typo/ 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.
  3. 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 http://yourdomain.com/typo/admin/, while your site blog will be at http://yourdomain.com/typo/

Have fun blogging!

Posted in  | Tags , , , , , ,  | 10 comments | 174 trackbacks

Older posts: 1 ... 8 9 10