ocPortal Tutorial: Installing ocPortal on a Windows desktop
Written by Chris Graham, ocProducts
This tutorial will explain how to get an ocPortal installation running on your own Windows computer. Linux is easier as it usually comes with everything ocPortal requires pre-installed.This tutorial will give basic instructions for installation of the various pieces of system software that ocPortal requires, instructing to read the products' own documentation when necessary. It is well worth pointing out that there are a number of 'all in one' packages that may be used to install AMP (Apache , mySQL and PHP ) without any special configuration for them to appropriately bind to each other. This may be preferable, but by doing so you inevitably will not know as much about the environment that was created for you. See WAMP-Server link under 'See Also' for this.
It is important to remember that if you are transferring files such as themes between one ocPortal installation and another, you need to set file permissions appropriately after copying.
Table of contents
Web server
The first thing you will need is a web server. Depending on your version of Windows, you may have the Windows web server available to you (Internet Information Server, or the cut down Personal Web Server).If not, the best course of action is to install Apache. Go to Welcome! - The Apache HTTP Server Project and download and install whichever Windows release you are comfortable with. The PHP folk recommend to avoid version 2, but if you are only running ocPortal locally for yourself, it doesn't matter. You may wish to enable 'mod_rewrite' in Apache.
PHP
Next you will need a copy of PHP installed. Go to PHP: Hypertext Preprocessor and download and install the latest stable Windows release. Follow the instructions to get it integrated with your web server: these may be rather complex, but it would be self-defeating for us to try and re-write them for you.mySQL
Go to MySQL :: The world's most popular open source database and download and install the latest stable Windows release. mySQL comes with a powerful Windows installer, so configuring mySQL itself should be a walk in the park.Depending on your PHP installation, you may need to enable the 'mysql' PHP extension in the php.ini file, and then to restart your web server. Also enable GD2 if it is not already enabled.
You will need to create a database for ocPortal. To do this you may either:
- simply create a sub-directory in the mySQL 'data' directory
- do it using the mysql Windows tools, if you installed them
- install phpMyAdmin from phpMyAdmin | MySQL Database Administration Tool | www.phpmyadmin.net on-to your web server and use that
- use the mysql.exe command line program:
(open a command prompt in the mysql bin directory)
Code
mysql -Uroot -p<password>
CREATE DATABASE <your-database name>;
ocPortal
|
Setting permissions (1) |
Because you are unlikely to have an account based FTP/HTTP set-up like web-hosts provide, using the quick installer is probably not the truly quickest option. Fortunately due to the (wonderful!) inheritable Windows permissions system, and the fact you are at your own computer, you can just extract the manual installer files and run through the installation without having to set any file permissions or do any uploading.
Before you extract the files, you must make sure that the web directory, or sub-directory thereof, has been configured to have the right file permissions.
If you are running IIS : Give 'Full control' to 'IIS_WPG' and 'IUSR_<computer-name>', as demonstrated in the screen-shot.
If you are running Apache: Apache is probably running with the credentials of your own user account, and hence special permissions are not required.
|
Setting permissions (2) |
|
Setting permission inheriting for a file (perhaps one copied into the web directory from somewhere that did not have it) |
If you find that some files underneath your install directory, often ones moved in, have the wrong permissions, you can manually set them to inherit permissions (from the security tab of the file, click the advanced button, and set inheriting). Or you can tell Windows to reset permissions on all the files underneath the install directory (from the security tab of the install directory, click the advanced button, and select as demonstrated in the screen-shot).
Once the permissions are set, just run through the installer, and you should have a working ocPortal installation.



