Argos

From Hypertopic

Jump to: navigation, search

The Argos viewpoints server, commonly referred to simply as Argos, is a Hypertopic server application written in PHP.

Contents

Aims

The aim of Argos project is to propose a new standard protocol for community-driven organizations of knowledge, and make the collaboration possible beyond the boundaries of the software and of the resulting communities.

Requirements

To install Hypertopic, you'll need to have the minimum following server software pre-installed:

  • HTTP Server
    • You need Apache 2.0 or newer. "Note, Hypertopic only officially supports Apache"
    • You need URL-Rewrite support to redirect the URLs
  • PHP
    • You need PHP 5.0.0 or newer
    • You need PDO support and PDO-PGSQL driver to access PostgreSQL server.
    • You need PDO support and PDO-MYSQL driver to access MySQL server.
  • PostgreSQL Database 8.XX (with PL/pgSQL support) / MySQL 4.2.x

Quick Install

Download latest Argos code
Download from the Argos project's downloads page. Untar or unzip the distribution (be sure to unzip the subdirectories) in your webserver's document root:
tar -xzvf hypertopic_x.x.x.tar.gz
You also can check out the latest version from subversion:
svn checkout https://argos-viewpoint.svn.sourceforge.net/svnroot/argos-viewpoint/trunk argos
In future you will be able to update to the latest version using:
svn update
Check file permission
Ensure that all the scripts have the appropriate owner (if PHP is running in safe mode, having some scripts with an owner different from the owner of other scripts will be a problem).
Create a PostgreSQL/MySql database on the web server
Current Argos support both PostgreSQL and MySQL.To create database for argos, please look at your "./scripts/" directory, where you should find a file called "hypertopic_pgsql.sql/hypertopic_mysql.sql". Execute the sql script in your database client (e.g. phpPgAdmin/phpMyAdmin) to create tables, indexes, and functions. Please be aware that you may need special (administrator) privileges to create the database and tables, and that the script may need some tuning, depending on the database name.

Configuration

Configure Apache

Apache URL Rewrite
The module controlling URL rewrite in Apache is called mod_rewrite and is compiled by default. If your version of Apache is not compiled with mod_rewrite, check that you have the mod_rewrite DSO installed and the following lines in your httpd.conf:
AddModule mod_rewrite.c
LoadModule rewrite_module modules/mod_rewrite.so
To allow pass through encoded path separators (%2F for / and additionally %5C for \ on according systems) in URLs, please turn AllowEncodedSlashes on by add following line:
AllowEncodedSlashes On
.htaccess
To use .htaccess file in your Argos directory, you specify AllowOverride All for Argos directory in your Apache configuration file.
Note: If you install Argos in the root directory of you web server, please skip to #Configure_Argos.
Edit the file ".htaccess" in your Argos installation's directory.
Search for "RewriteBase /".
Then change it to "RewriteBase /path_to_your_Argos_directory/" (path_to_your_Argos_directory is the relative path to Server Root Directory).
Save your changes and exit.

Configure Argos

Now you must configure your installation. All configurable data is placed in config.inc.php. To configure Argos, simply use your text editor to modify default value in config.inc.php.

Database parameters

HT_DB_TYPE

Choose the right driver to connect Argos server with database. Possible values are: mysql or pgsql

define('HT_DB_TYPE', 'pgsql');

HT_DB_HOST

Hostname/IP address of the database server. If you are unsure, 'localhost' works in the most cases.

define('HT_DB_HOST', 'localhost');

HT_DB_USER

Your database user account on the host.

define('HT_DB_USER', 'USER');

HT_DB_PASS

Password for your database user account

define('HT_DB_PASS', 'YOURPASSWORDHERE');

HT_DB_READONLY_USER

Read only user, just allows SELECT from table 'traces' and 'attributes'. Create a new user and use following SQL script to grant minimum user privileges:

Grant select on traces to ht_readonly_user;
Grant select on attributes to ht_readonly_user;
define('HT_DB_READONLY_USER', 'ht_readonly_user');

HT_DB_READONLY_PASS

Password for read only user.

define('HT_DB_READONLY_PASS', 'ht_readonly_pass');

HT_DB_NAME

The database name for Argos.

define('HT_DB_NAME', 'hypertopic');

HT_DB_CONNECTSTRING

Connection string for Argos to connect database. In most case, there is no need to change this parameter.

define('HT_DB_CONNECTSTRING', HT_DB_TYPE.":host=".HT_DB_HOST.";dbname=".HT_DB_NAME);

HT_DB_PCONNECT

Use persistent connection? Possible values are: true or false. Choose 'true' if you are unsure.

define('HT_DB_PCONNECT', true);

Misc Parameters

SERVICE

If Argos was not installed at the web server root directory, You must specify a URL prefix.

For example:
If you what to install Argos in a root directory. like: http://yourserver.com/
You should set SERVICE to "http://yourserver.com"
If you what to install Argos in a subdirectory. like: http://yourserver.com/argos/
You should set SERVICE to "http://yourserver.com/argos"
define('SERVICE', 'http://yourserver.com');

REQUIRE_AUTHENTICATION

Require authentication for DELETE/PUT/POST request on Argos server. Possible values are: true or false.

define('REQUIRE_AUTHENTICATION', false);

VALIDATOR

XML content could be checked by RelaxNG/DTD. Possible value are: RNG, DTD(default) Or (disable XML content validation).

define('VALIDATOR', 'RNG');

VALIDATOR LOCATIONS

The location of RNG validator files.

define("ACTOR_VALIDATOR", "validator/rng/actor.rng");
define("VIEWPOINT_VALIDATOR", "validator/rng/viewpoint.rng");
define("TOPIC_VALIDATOR", "validator/rng/topic.rng");
define("ENTITY_VALIDATOR", "validator/rng/entity.rng");
define("ATTRIBUTE_VALIDATOR", "validator/rng/attribute.rng");
define("VALUE_VALIDATOR", "validator/rng/value.rng");

Upgrade Argos

  • Update source code by svn:
svn up .
  • Run the Argos installation script by accessing install/index.php in web browser.
    • Step 1: Input all database information and check "Don't create tables for me."
    • Step 2: Input the read only user name and password, then check "Don't create read only user for me."
  • Run the Argos upgrade script by accessing scripts/upgrade_0_03.php in your web browser.

Note: before you upgrade Argos, I strongly recommend that you should make a backup copy of your database.

Argos Project Page

See Also

Download

Personal tools