postNuke - A Portal Beginning


Table of Contents:


Introduction

Been looking for that piece of software to differentiate, turn your website into a dynamic environment? Want to give your website users the opportunity to participate in a community? Want forums, news articles ?

What you are looking for is some form of web portal system. The current buzzword is Content Management System (CMS.)

A very popular portal (CMS) system is phpNuke and the derivative works myphpnuke and postNuke. In fact, on the postNuke site you will find a lot of references to other similar systems.

These notes show specific intructions for installing the Rogue 7.14 revision of postNuke. For more information refer to the respective web sites http://www.phpnuke.org, http://www.myphpnuke.com or http://www.postnuke.com

If you have the time to learn to configure and install MySQL, PHP4 then you are already half way ready to install a great database driven web site.

Warning!:Warning!:Warning!:Warning!:Warning!:Warning!:

We have experienced security problems with these portal systems, so use at your own risk. Their nice features, but definitely not necessary for a secure environment.

 

Postnuke purports to be actively pursuing security and performance issues with their system but be aware that introducing scripting systems to your system may significantly compromise your system.

Warning!:Warning!:Warning!:Warning!:Warning!:Warning!:

This installation uses Apache, MySQL and PHP 4 as the web, database, scripting Engine servers. Although this discussion is primarily for OpenBSD, I have had this installation successfully work on MSWindows and phpNuke is primarily developed (and working) in Linux.

Getting the Files

[ref: Rogue_714.tar.gz]

The 1st thing to do is to download the source files for postNuke from the http://www.postnuke.com website.

Rogue is the working name for the 0.7 series of PostNuke. These instructions should be relatively similar to the releases in this series.

Installation

[ref: Rogue_MaintenanceII.tar.gz]

After you have downloaded the files, untar the file on your local drive and review two important files, INSTALL and README.

~$ tar -zxvf Rogue_714.tar.gz

~$ cd pn_714

pn_714$ ls

The tar file extracts two sub-directories from its root; html/ contains the php files that you will be using, and sql/ which contains the script instructions for configuring your MySQL database.

Documentation is in text format in the html/docs directory or html in the html/manual directory.

Moving the files to their home

[ref: ./html, ./sql, ~/public_html or /var/www/htdocs]

Copy (or move) the files in the html/ directory to your home directory (eg. /var/www/htdocs or ~/public_html)

pn_714$ cd html

html$ mv * ~/public_html

Refer to the notes on Apache if you have any difficulties with this section. I would put the files into something like /var/www/nuke and modify Apache to point to this as the home directory. This way, I can keep the wonderful manuals in /var/www/htdocs for Apache, and mod_ssl.

Configuring the MySQL Database

[ref: postnuke_mysql_create.sql, sql/nuke.sql]

We will configure the MySQL Database in two stages. In the 1st stage we will configure the database to be used and the user through whom we will use. In the 2nd stage we will configure the tables in the database, and populate the table with some initial data.

# postnuke_mysql_create.sql
#
# You can simply direct this file to mysql at STDIN:
# mysql --user username --password --host host < postnuke_mysql_create.sql
# . username will need to have privileges to create a database and change mysql
# . root access is the simplest if you run your own server, otherwise you can modify
# . this script as you need and ask the ISP/Site Manager to configure your database
# . for you.
#============================================================================
# YOU WILL WANT TO CHANGE -
#
# NOMOA      -to- the username you wish to use (occurs TWICE) [16 character field]
# rogue_db   -to- the database name you wish to use. (occurs TWICE) [64 character field]
# password -to- the Password you wish to encrypt (occurs ONCE)[16 character field]
#============================================================================

 

CONNECT mysql;

 

INSERT INTO user ( host, user, password )
  VALUES (
    'localhost',
    'NOMOA',
    password('password')
  );

 

INSERT INTO db (
    host, db, user,
    Select_priv, Insert_priv, Update_priv, Delete_priv,
    Create_priv, Drop_priv )
  VALUES (
    'localhost',
    'rogue_db',
    'NOMOA',
    'Y', 'Y', 'Y', 'Y',
    'Y', 'Y'
  );

 

CREATE DATABASE rogue_db;

FLUSH PRIVILEGES;

 

# done!

Figure 1 - MySQL script to create the user account, access privileges, and database

1st Stage - Create the Database.

Use the above script to configure the user account, access privileges, and create the new database to be used. If you have a shell connection to your OpenBSD server, while this page is on the screen, then you can start mysql and paste the above script onto the terminal session.

Otherwise, save the content into a text file, such as postnuke_mysql_create.sql

$ mysql -u privilegeduser -p < postnuke_mysql_create.sql

Password: ******** (password prompt)

In postnuke/myphnuke you can now continue with the installation instructions provided by those applications (provided scripts will create the tables.)

Security Note:
When the PostNuke server is initialised, anyone can run the install process.

If your server is online, while you are installing, you may wish to install 'OFF' the root server before moving the files 'online'.

Configuring Site Installation Settings

[ref: config.php]

At this point you can continue with the 'Automated Installation Process' or fiddle a little as below before going to that.

In this part of the configuration, we will configure phpNuke so we can start-up the web based administration system.

Edit the file config.php and make the following changes:

// -----------------------------------------------------------------
// Database & System Config
//
// dbtype: type of database, currently only mysql
// dbhost: MySQL Database Hostname
// dbuname: MySQL Username
// dbpass: MySQL Password
// dbname: MySQL Database Name
// system: 0 for Unix/Linux, 1 for Windows
// encoded: 0 for MySQL information unenccoded
// , 1 for encoded
// -----------------------------------------------------------------
//
$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'NOMOA';
$pnconfig['dbpass'] = 'password';
$pnconfig['dbname'] = 'rogue_db';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'nuke';
$pnconfig['encoded'] = '0';

Be sure to change the above user-name, database-password, and database-name to those which you defined earlier, and will be using.

Save the file.

The final console activity is to set the user-id, group-id and modes for the files.

# find . -type d -exec chmod 0775 {} \;
# find . -type f -exec chmod 0664 {} \;
# chmod 666 config*

[ref: Thanks to smn and Mystique for corrections and the original 'cleaner' find command-line]

Automated Installation Process

To finalise your installation (essentially setting the default administrator password) launch a web browser pointing to your postnuke site:

http://your-site-details/install.php

1. Verify the language you wish for the installation/site

2. Verify configuration requirements for config.php and config-old.php

$ chmod 666 config*.php

3. Verify database configuration settings (as set above)

The important section during the installation process is setting the administration password.

 

Graphical Administration

You should now be able to start up your Nuke'd website by launching the browser and pointing to http://your-site-details/ or something like http://your-site-details/nuke

If you are having problems, refer to the notes on configuring your Apache server.

To begin administration, changes, start-up your favourite browser to http://your-site-details. Log in as the administrator account created during the installation process.

Once you are logged in with administrator privileges, you can select the "Administration Menu" from the "Main Menu" Block.

When you have successfully logged in as Administrator, then you should a display similar to that shown below of Administration commands.

Administration Menu
[ Online Manual ]
Add Story Blocks Download Edit Users Ephemerids FAQ
File Manager Messages Edit Admins HTTP Referers Preferences Reviews
Sections Manager Surveys/Polls Topics Manager Web Links Logout / Exit

The following is a squence of minimal modifications I go through to customise my installation. I will leave the graphics and theme modifications for other sites more suited to that stuff.

Enjoy !!

Relative Reference

Paul Pruett documented the below php based CMS systems while he mentions that there are other CMS systems coded in python, perl. If you want to search for them on google, try using 'nuke' 'content management system' :

phpWebSite Open Source, Community-Driven WebWare
http://phpwebsite.appstate.edu/


Systems based on the slash code used on www.slashdot.org: SLASH, phpSLASH, plsash.

phpnuke - spawned at least two cms communities (postnuke and myphpnuke.) Another potentially important fork from this code is www.xaraya.com

The Today Web Framework, or "Today",
http://4th.com/tech/Today/

http://sourceforge.net/projects/phptalo/

and variants with "blogs"

http://sourceforge.net/projects/geeklog/

and built with zope, plone,
http://sourceforge.net/projects/plone/http://sourceforge.net/projects/plone/

bricolage
http://sourceforge.net/projects/bricolage/


http://sourceforge.net/projects/magellancms/


http://sourceforge.net/projects/phpweblog/

Other forms of content management include a relatively new concept, the wiki, which is growing in popularity. Thomas Horna sent out this bit of information, WikiWikiWeb is a collaborative hypertext environment, with an
emphasis on easy access to and modification of information. :

An example of a large community based on Wiki is the WikiPedia Online Encyclopedia and another example is the Sense Is Library.

Someone's even put up an OpenBSD Wiki


How many Wiki Engines (implementations) are out there: http://c2.com/cgi/wiki?WikiEngines

Author and Copyright

Copyright (c) 2000/1/2 Samiuela LV Taufa. All Rights Reserved.

I reserve the right to be totally incorrect even at the best advice of betters. In other words, I'm probably wrong in enough places for you to call me an idiot, but don't 'cause you'll hurt my sensibilities, just tell me where I went wrong and I'll try again.

You are permitted and encouraged to use this guide for fun or for profit as you see fit. If you republish this work in what-ever form, it would be nice (though not enforceable) to be credited.

postNuke , a Portal Beginning

Copyright  © 2000/1/2 NoMoa Publishers All rights reserved. Caveat Emptor