English Norsk Português

Install

This page gives you detailed instructions on how to install FlexiPublish and its requirements.

 

Pre-requisites

  • Administrator rights with shell access to the server

 

Also

  • PHP 5.1.6, or above

    • GD installed

  • A transactional database

    • PostgreSQL, Oracle, SQL Server, DB2, MySQL (InnoDB)

    • PostgreSQL 8.3, or above, is required for the Default Search module

  • PHP PDO driver for the selected transactional database

  • Apache2 HTTP server

    • mod_rewrite enabled

 

This guide will walk you through the installation on a typical freshly installed CentOS 5 server, and represents an optimal configuration for FlexiPublish.

 

 

Download the source code

Download the FlexiPublish tar archive from the official source.

 

Prepare the server environment

This section will go through the installation of additional software packages that are not typically part of a CentOS 5 basic installation, in addition to other environment optimizations.

 

Set locale

Make sure /etc/sysconfig/i18n reads:

LANG=»en_US.UTF-8»

SYSFONT=»anything»

 

Install YUM if not already installed

 

Install PostgreSQL 8.3

PostgreSQL 8.3 is not part of the CentOS 5 distribution, but must be installed and patched form the PostgreSQL Yum repository.

  • Change to root user

  • If already installed, uninstall old database

    • yum rmeove postgresql

    • yum remove postgresql-libs

    • yum remove postgresql-server

  • Download Yum repository configuration:

  • Change Yum repository default configuration

    • cd /etc/yum.repos.d

    • Paste: «exclude=postgresql*» to the bottom of sections [base] and [updates] in Centos BASE

  • Install PostgreSQL

    • yum install postgresql

    • yum install postgresql-server

    • yum install postgresql-devel

    • yum install postgresql-libs

  • Initiate the database store

    • mkdir /pgsql/data

    • chown postgres:postgres /pgsql/data

    • su - postgres

    • initdb –D /pgsql/data

  • Configure postgres

    • as postgres

    • psql

    • CREATE USER flexipublish_admin PASSWORD 'n0t_th1s_0n3' CREATEDB CREATEROLE NOINHERIT;

    • CREATE USER <dbuser> PASSWORD '4nd_n0t_th1s';

      • flexipublish_productsite - pr0duct_3rt5

      • flexipublish_personalsite - p3rs0n4l_5gh7

    • Ctrl + D (exits)

    • createdb -O flexipublish_admin -T template0 -E unicode <dbname>

    • edit pg_hba.conf

      • local postgres postgres ident sameuser

      • local <dbname> flexiportal_admin md5

      • local <dbname> <dbuser> md5

      • <dbname> and <dbuser> should reflect the flexipublish instance being configured. There can be various instances running simultaneously. If you change dbuser, you must change the grant statements in SQL files before creating tables for that instance.

      • if not feeling like maintaining a long list of local connecting privileges:

        • local all all md5

    • Back to root user

  • Create basic tables in DB

    • service postgresql restart

      • check that localhost resolves to 127.0.0.1 (/etc/hosts) if this fails

    • psql -D <dbname> -U flexipublish_admin < core.sql

      • And all modules you want installed. These are recommended as a minimum:

        • default_authentication.sql

        • general.sql

        • search.sql

        • search_content_general.sql

PostgreSQL should now be ready and configured.

 

PHP PDO installation

This section will explain how to install PHP PDO for PostgreSQL.

  • As root

  • yum install php-devel

  • yum install php-pear

  • pecl install pdo

  • pecl install pdo_pgsql

  • if this fails with cannot find libpq-fe.h...

    • yum install postgresql-devel

    • yum install openssl-devel

    • service postgresql restart (if server is also upgraded in dependencies)

    • retry

  • service httpd restart (loading new PHP extensions)

 

PHP GD extension

  • As root

  • yum install php-gd

 

Apache Configuration

  • As root

  • set up virtual host (recommended)

    • <VirtualHost *>

      • DocumentRoot /dir

      • ServerName yourdomain.tld

      • RewriteEngine on

    • <Directory dir>

      • Order Deny,Allow

      • Allow from all

    • Dirctory dir

      • Order Allow,Deny

      • Deny from All

    • UserDir disabled (root)?

 

FlexiPublish QuickConfig

The Quick Config will configure all basic config parameters for your site. Wherever you see ${VALUE}, you should replace that entire expression with the value you actually want. Do not use special characters!

 

1)

mkdir "/flexipublish/${SITE}
Give ownership to the OS user that will administer the site

NOTE:
${SITE} is the internal alias you give your site. This alias will
be used for many things: basdir for installation, db role that will
insert, alter and delete from database tables (the administrator
that can drop and create tables is a different user) and  the schema
in which the site specific tables will be placed.

 

2)

tar -C /flexipublish/${SITE} -xvpf flexipublish.[version].tar

 

From here, continue to the INSTALL document encountered in the /flexipublish/${SITE} catalogue.