The installation instructions assumes that you have a fully functioning web server.
To install TCExam on Linux, check the guide on:http://www.tcexam.org
These are the minimum requirements needed before installation of TCExam can be successful:
For help with the installation and configuration of the web server and the required libraries please refer to the specific manuals.
If installing on your home or office computer (for local testing only) there are a number of packages for the various operating systems that will assist in establishing these requirements:
If you are using a Debian/Ubuntu OS, we suggest to install the following packages:
sudo apt-get install acpid apache2 ghostscript gsfonts imagemagick libapache2-mod-auth-mysql libapache2-mod-auth-plain libapache2-mod-php5 libauthen-pam-perl libio-pty-perl libmd5-perl libnet-ssleay-perl libpam-runtime lm-sensors mysql-client mysql-server openssl perl php5 php5-cli php5-gd php5-imagick php5-curl php5-mcrypt php5-memcache php5-mysql php5-xcache ssh tetex-base tetex-bin tetex-extra texlive-base-bin zbar-tools
sudo apt-get install acpid apache2 ghostscript gsfonts imagemagick libapache2-mod-auth-pgsql libapache2-mod-auth-plain libapache2-mod-php5 libauthen-pam-perl libio-pty-perl libmd5-perl libnet-ssleay-perl libpam-runtime lm-sensors openssl perl php5 php5-cli php5-gd php5-imagick php5-curl php5-mcrypt php5-memcache php5-pgsql php5-xcache postgresql postgresql-client postgresql-contrib ssh tetex-base tetex-bin tetex-extra texlive-base-bin zbar-tools
On remote, hosted or dedicated servers the configuration and availability of these applications will depend on the host provider or the operating system that is installed upon the server. If you encounter a problem with your host provider and the use of TCExam check the support and services page.
In order for TCExam to work properly, you will need to have a functioning MySQL or PostgreSQL Database prior to beginning the install process.
TCExam will create a database and the associated tables, provided the details are correctly entered, during the installation process. On occasion however, it may be necessary to create the database ahead of time. Just make a note of the appropriate settings before proceeding with the installation:
[MySQL] mysql - u root UPDATE mysql.user SET Password=PASSWORD('mypassword') WHERE User='root'; FLUSH PRIVILEGES; quit; [PostgreSQL] sudo su postgres -c psql template 1 ALTER USER postgres WITH PASSWORD 'mypassword'; \q
date.timezone = Europe/Rome ; http://php.net/manual/en/timezones.php arg_separator.output = "&" magic_quotes_gpc = On magic_quotes_runtime = Off magic_quotes_sybase = Off variables_order = "EGPCS" request_order = "GPC"
AddDefaultCharset UTF-8 php_value arg_separator.output "&" php_value magic_quotes_gpc On php_value magic_quotes_runtime Off php_value magic_quotes_sybase Off php_value variables_order "EGPCS" php_value request_order "GPC"
When installing TCExam for the first time, verify the system requirements. Assuming you have a working Apache/IIS web server, with PHP and a MySQL/PostgreSQL DBMS, you are on your way to installing TCExam.
If you are getting the TCExam source code using GIT and you are installing it for the first time, please rename the "config.default" folders inside admin, public and shared to "config".
The TCExam upgrade process may vary at each release. Detailed instructions are contained on the UPGRADE.TXT file attached to each TCExam release.
TCExam can be downloaded from GitHub. The file is a compressed archive so you will need an utility program, either locally or on your host server, that can "unzip" the file (i.e. WinZip, WinRAR, 7Zip). Ensure that you choose latest stable release version.
We are assuming you have established a working web server, with the necessary requirements, and that you know where to put files to display on the web server.
Unzip the distribution file into a directory under your web server root. If you are using the Apache web server, this is typically c:\apache group\apache\htdocs on the Windows OS and /usr/local/apache/htdocs or /var/www/ on a UNIX-like system but it my vary particularly on hosted servers and between different distributions of GNU-Linux OS.
What you do to install TCExam on a remote host is largely dependent upon the facilities your host provides - with regard to Control Panel software and connection resources. It may also depend upon your own skills concerning server access methods. A simple and typical procedure may involve: unzip the TCExam distribution file to a local directory on your local computer and then FTP the files to the host server placing them either directly under, or in, a directory under the web server root. There are many free FTP programs available for this operation, such as Filezilla. A Google search or visit to any of the open source resource sites will assist you in finding a suitable tool.
When you have finished uploading the files and folders, change the files owner to the Web server user (typically "www-data" or "apache"). On POSIX based systems (like Unix, Linux, etc), change to the TCExam directory and enter the following system command (substitute the user name appropriate for your system): chown -R apache:apache /var/www/tcexam.
Change the files access permission so that all user can write into the them. On POSIX based systems change to the TCExam directory and enter the following system command: chmod -R 777 /var/www/tcexam. For security reasons, you must properly set the permissions of these files at the end of the installation process.
This type of installation will automatically install the database and will configure the essential system parameters. The installation process will delete any data of previous installations of TCExam, reason why in this case it is advisable to make backup copy of these data.
Point your Web browser (i.e. Mozilla Firefox or Internet Explorer) to the TCExam installation script (http://www.yoursite.com/install/install.php or http://yoursite.com/tcexam_folder/install/install.php). To start the installation you must fill up the form completely and press the button INSTALL.
If the installation completed successfully the system is ready for the first execution. At this point you can jump to the Post Installation and Configuration section.
In case the installation did not complete successfully you can use the manual procedure described in the next section.
In order to manually install TCExam you must edit some configuration files and install the database.
The essential files and configuration parameters are:
In the install folder there are all the SQL files with the structure and data of the database:
If you want to change the prefix of the tables you must use a text editor with the search and replace function and perform the following substitutions:
To execute the SQL files you can use the DBMS commands from the command shell of the server. For MySQL you can use the following syntax:
mysql -u root -p mysql> CREATE DATABASE TCExam; mysql> quit shell> mysql -u root -p TCExam < mysql_db_structure.sql shell> mysql -u root -p TCExam < db_data.sql
As another option you can use an external DBMS manager (i.e. phpMyAdmin, phpPgAdmin, pgAdmin3, etc.) to create the database and run the SQL files by using the specific commands.
Once the installation is completed you must:
cd /var/www/tcexam
find . -exec chown -R apache:apache {} \;
find . -type f -exec chmod 544 {} \;
find cache/ -type f -exec chmod 644 {} \;
find cache/lang -type f -exec chmod 544 {} \;
find admin/backup -type f -exec chmod 644 {} \;
find admin/log/ -type f -exec chmod 644 {} \;
find public/log/ -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
Once the above installation procedure is successfully completed, TCExam will work in "basic" mode. Some additional configuration steps are required in order to activate some features (RADIUS, email, LaTeX) and to personalize some settings to fit your needs. All you have to do is to manually edit the following configuration files:
Configuration files are self-explanatory. If you encounter a problem please check the Support and Services page.
Once the installation and configuration procedures are completed, you can access the administration section by pointing your Web browser to http://www.yoursite.com/tcexam_folder/admin/code/ and using the following username and password:
In order to protect your system and be granted with an unique personal access, remember to change the password with the Users form.
To achieve a better level of security you have to protect the whole admin folder with a web-based user authentication system. For Apache check the Apache Authentication, Authorization, and Access Control.
Please protect separately the admin/backupem> folder or move the backup folder to another protected location and set the K_PATH_BACKUP constant in shared/config/tce_paths.php. The content of this directory shoul dnot be available via Web browser.