Cchost/guide/Installing

From Creative Commons
Jump to: navigation, search


Docs Home Install Upgrade Troubleshoot Customize Admins Devs Content Query Templates Commands Skins

Getting ccHost

Check ccHost home page for download instructions of the latest stable release.

For instructions on the getting the latest snapshot directly from our source control system check the source code home page.

Installing

Simple

The easiest way to get going is to start with a web hosting server. Common web hosting services like BrainPulse , Dreamhost and WebsiteSource provide an administration interface for setting up a mysql database. Hosting services also provide some FTP or SFTP mechanism to upload the ccHost installation files as well. 99% of all services provide support for PHP as well. If you have questions about support in this area, check the server requirements below and with your hosting service.

  1. Unzip the ccHost ZIP archive on your local system and copy the files to your server retaining the the directory structure.
  2. Browse to http://where_you_installed and follow all the instructions from then on.

Advanced

If you have basic knowledge of using FTP and you are comfortable at a terminal command line you can use these steps. Many of these can be filed under "you'll be glad you did" by the time you get to the browser-based installation steps later on.

Download/Install getID3

ccHost depends on the getID3 library for verifying uploads. Install getID3 (at least 1.7.3) here: http://www.getid3.org/#download before you install ccHost. (It's a simple download-unpack operation.)

Note: Make sure the release you install is marked as stable. Do not install anything that is "beta" or "alpha"

For example (on Linux):

tar xzf getid3.tar.gz
cp -a getid3/getid3 /var/www/localhost/htdocs/getid3/

The ccHost installer will 'find' your getID3 installation if it's roughly in the same area of the server, however it is not required that your getID3 be visible on the web and in fact, it's probably more secure if it isn't.

BUG WARNING: Later versions of getID3 (starting with 1.7.7) have an issue with RIFF based files (WAV, AVI, etc.) when tagging them and require a manual patch in order to work properly. Remove line #105 in getID3/write.php that looks like:

case 'riff': // maybe not officially, but people do it anyway 

ccHost Terminal Installtion

  • Unzip the ccHost ZIP archive on your local system and copy the files (retaining the directory structure) to your web-server directory.
  • On Linux change the group and permissions of the files so they may be written by the web server (e.g., in the following lines, the web-server account is "apache").

For example:

cp -a cchost-1.0.3 /var/www/localhost/htdocs/cchost
chgrp -R apache /var/www/localhost/htdocs/cchost
chmod g+w /var/www/localhost/htdocs/cchost/
  • Create a new database for ccHost (e.g., named "cchost") and create an administrative user to access it (e.g., "cchostadmin"). For example:
mysql -p -u root
mysql> CREATE DATABASE cchost;
mysql> GRANT ALL ON cchost.* TO 'cchostadmin'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD_HERE';

Make sure to change 'YOUR_PASSWORD_HERE' (and maybe 'cchostadmin') to something unique to your site. (Many systems provide phpMyAdmin to take care of these tasks.

  • Create directory /var/log/cchost or other location to store log files. Must be writable by the web-server account (e.g., "apache"). For example:
mkdir /var/log/cchost
chown apache:apache /var/log/cchost

There are several suggestions for mod_rewrite and configuration settings here.

Browse to http://where_you_installed_cchost

Everything else you need to know will be on the screen from that point on, including topics covered above such as suggested php.ini and .htaccess settings, access permissions requirements, etc.

Upgrading

Always make a backup of your mySQL ccHost database and the files you change before you start the upgrade process. Things go wrong. You have been warned.

Upgrading from 5.0 to higher

  • Log in to your ccHost installation as an admin
  • Unzip the ZIP archive on a local machine
  • Delete the ccadmin directory on your local copy
  • Copy the entire structure to your web installation
  • Browse <you_installation_root>?update=1

Upgrading to 5.x from 3.1 and Above

Before you upgrade

Plugins

It is recommended that you do not copy any plugins or custom code that have not been ported to ccHost 5 during the initial upgrade. You should get your site up and running without them using the standard upgrade first, then start migrating your plugins.

Importing phpTAL Templates

None of your previous version skins, pages, etc. work anymore as is. You can try to import your old phpTAL XML templates using:

    bin/cc-host-import-v4-template.php 

Many imported templates (like your home page) might "just work" but many will need tweaking, assuming you are familiar with PHP. A detailed description of what might go wrong is this document.

Doing the upgrade

  • Log in as admin on your ccHost installation
  • Make a backup of your database.
  • Unzip the ccHost package on a local machine.
  • Copy the entire tree (including ccadmin) to your installation
  • Browse to http://<your_install_location

Upgrading to 5 from 3.0 or Before

Upgrading to 5 simply hasn't been tried or tested. (If you have some experience, please feel to share with the rest of the class.) It is therefore not recommended except for the very strong willed.

Instead what you may want to consider (if you don't have a lot of content data) is start with a brand new installation using version 5.