Documentation

CMS

Global HUBzero Configuration

Edit/create the file /etc/hubzero.conf

[default]
site=myhub

[myhub]
DocumentRoot=/www/myhub

Install

Install the content management system.

# apt-get install hubzero-cms
# mkdir /www/myhub
# cp -rp /usr/lib/hubzero/cms/* /www/myhub
# chown -R www-data.www-data /www/myhub

Note: /www/myhub will be the document root of your site

Create Database

Create database for the HUBzero CMS to use

# /usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 33
Server version: 5.0.51a-24+lenny2 (Debian)

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> CREATE DATABASE `myhub`;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE DATABASE `myhub_metrics`;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON `myhub`.* TO 'myhub'@'%' IDENTIFIED BY 'xyzzy#1';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON `myhub_metrics`.* TO 'myhub'@'%' IDENTIFIED BY 'xyzzy#1';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> quit

Configure Apache for CMS

We are now going to tell Apache about the change of document root of the web server.

Modify /etc/apache2/sites-available/hub AND /etc/apache2/sites-available/hub-ssl replacing three instance of "/var/www" with "/www/myhub": follows

Change

        DocumentRoot /var/www
        ...        
        <Directory /var/www>
        ...
        </Directory>
        ...
        <Directory /var/www/site/protected>
        ...
        </Directory>

to

        DocumentRoot /www/myhub
        ...        
        <Directory /www/myhub>
        ...
        </Directory>
        ...
        <Directory /www/myhub/site/protected>
        ...
        </Directory>
then restart apache
# /etc/init.d/apache2 restart

Run CMS Installer

The Joomla/HUBzero installer will now appear on your website. Follow the instructions to get the basic site configured. Then disable the installation directory.

You can ignore the LDAP configuration screen as it is currently not used.

Press the "Install HUBzero Sample Data" button to have a basic site layout made [RECOMMENDED]

When you are done with the web installer you need to disable the web installation application:

# rm -fr /www/myhub/installation

Configure CMS

Some of the initial site configuration still needs be done manually.

# cp -p /www/myhub/hubconfiguration.php-dist /www/myhub/hubconfiguration.php

Fill in the dozen or so parameters as needed and the core global site configuration is complete

<?php
class HubConfig {
    var $hubLDAPMasterHost = 'ldap://127.0.0.1';
    var $hubLDAPSlaveHosts = '';
    var $hubLDAPBaseDN = 'dc=myhub,dc=org';
    var $hubLDAPNegotiateTLS = '0';
    var $hubLDAPSearchUserDN = '';
    var $hubLDAPSearchUserPW = '';
    var $hubLDAPAcctMgrDN = 'cn=admin,dc=myhub,dc=org';
    var $hubLDAPAcctMgrPW = 'test';
    var $ipDBDriver = 'mysql';
    var $ipDBHost = 'db.nanohub.org';
    var $ipDBPort = '';
    var $ipDBUsername = 'geodb';
    var $ipDBPassword = 'ge0dbhub';
    var $ipDBDatabase = 'network';
    var $ipDBPrefix = '';
    var $hubShortName = 'myhub';
    var $hubShortURL = 'myhub.org';
    var $hubLongURL = 'http://myhub.org';
    var $hubSupportEmail = 'real@email.address';
    var $hubMonitorEmail = 'real@email.address';
    var $hubHomeDir = '/home/myhub';
    var $forgeName = 'myFORGE';
    var $forgeURL = 'https://myhub.org';
    var $forgeRepoURL = 'http://myhub.org';
    var $svn_user = 'hubrepo';
    var $svn_password = 'test';
}
?>

Be sure to use a real email address in hubSupportEmail and hubMonitorEmail, failure to do so will result in a failure of the hub to send out email properly.

Last modified:

  • Copyright © 2022 Hubzero
  • Powered by Hubzero®