Aegir CMS
Home > Documentation

Documentation
   Nadmin Installation
   guide
Download
Licensing
Mailing lists
Contributing
News
Users' feedback

Nadmin Installation guide

INSTRUCTIONS FOR INSTALLING REDHAT 7.3 + MIDGARD 1.4.3 + NADMIN STUDIO M5

CREATED: Mrinal Virnave
DATE: 08/16/2002

DISCLAIMER: I do not gurantee these instructions will work
with all setups. Please use them at your own risk

DESCRIPTION: This setup instructions does not include installation of
Cyrus, Exim and Bind. Therefore this setup will not provide
email administration functions under nadmin. These
instructions also assume you already have a nameserver in
place or you are able to configure the current machine as
a nameserver yourself.

Questions or comments please email [email protected]

1

Install RedHat 7.3

There are no special instructions really.
Do a standard RedHat7.3 installation.
Make sure you install the following packages.
(these are usually included in a standard webserver installation)

apache
apache-devel
autoconf
automake
rcs
php-mysql
perl


REDHAT 7.3 IS INSTALLED AND RUNNING

2

Install Midgard 1.4.3

2.1> Log into your server as Root.
2.2> Create a directory for your sources
$ mkdir /usr/src/redhat/SOURCES/midgard
$ cd /usr/src/redhat/SOURCES/midgard
2.3> Go to the site http://www.midgard-project.org/download
$ links http://www.midgard-project.org/download
2.4>

Download all the files listed there

midgard-lib-1.4.3.tar.bz2
mod_midgard-1.4.3.tar.bz2
midgard-php4-1.4.3.tar.bz2
midgard-data-1.4.3.tar.bz2
mgd-nadmin-patches.tar.gz

2.5> Unzip & untar all the files
$ bunzip2 midgard-lib-1.4.3.tar.bz2
$ bunzip2 mod_midgard-1.4.3.tar.bz2
$ bunzip2 midgard-php4-1.4.3.tar.bz2
$ bunzip2 midgard-data-1.4.3.tar.bz2
$ gunzip mgd-nadmin-patches.tar.gz
$ tar -xvf midgard-lib-1.4.3.tar
$ tar -xvf mod_midgard-1.4.3.tar
$ tar -xvf midgard-php4-1.4.3.tar
$ tar -xvf midgard-data-1.4.3.tar
$ tar -xvf mgd-nadmin-patches.tar
2.6> Patch the files required for Nadmin
$ cd mgd-nadmin-patches
$ patch ../midgard-php4-1.4.3/event.c -i ./event.c.diff
$ patch ../midgard-php4-1.4.3/midgard.c -i midgard.c.diff
$ patch ../midgard-php4-1.4.3/mgd_event.h -i mgd_event.h.diff
2.7> Make and install Midgard-Lib
First make sure your path contains /sbin and /usr/sbin
$ echo $PATH
If not then add them using
$ export PATH=$PATH:/usr/sbin:/sbin
Then continue to the midgard_lib installation
$ cd ../midgard-lib-1.4.3
$ ./configure
$ make
$ make install
2.8> Make and install mod_midgard
$ cd ../mod_midgard-1.4.3
$ ./configure --with-apxs=/usr/sbin/apxs
$ make
$ make install
2.9> Make and install midgard-php
$ cd ../midgard-php4-1.4.3
$ ./mkall
2.10>

Set up Mysql
Make sure MySQL is started and that it will start the next time you reboot
$ /etc/init.d/mysqld start
$ pico /etc/init.d/mysqld

edit the file so that the line

# chkconfig: - 78 12

READS

# chkconfig: 345 78 12

Then execute the following commands

$ chkconfig --del mysqld
$ chkconfig --add mysqld

Now MySQL is set to start automatically the next time you reboot

2.11>

Midgard Database Installation
We continue with the midgard-data installation (I've used "midpass" as the midgard db password
"hostname.mydomain.com" as the hostname
"192.168.2.20" as the ip of the box)
$ cd ../midgard-data-1.4.3
$ mkdir /var/www/midgardblobs
$ chown apache.apache /var/www/midgardblobs

$ ./configure --with-db-host=weblinux127.cns.iit.edu \
--with-db-admin-user=root \
--with-db-user=midgard \
--with-db-user-password=midpass \
--with-host=hostname.mydomain.com \
--with-ip=192.168.2.20 \
--with-blobdir=/var/www/midgardblobs \
--with-apxs=/usr/sbin/apxs \
--with-apache-user=apache \
--with-apache-group=apache \
--with-install=new

$ ./dbinstall

This completes the database creation.
Now we just need to ensure our database is safe so we add an admin password (I've used "mysqlRoot")
$ mysqladmin -u root password 'mysqlRoot'

2.12>

Making changes to the httpd.conf file
First we need to copy the midgard-data.conf file that dbinstall has created.
$ cp midgard-data.conf /etc/httpd/conf/

Now we edit the httpd.conf file
$ pico /etc/httpd/conf/httpd.conf

Page Down (ctrl-V) to the bottom of the file and add the following line
Include /etc/httpd/conf/midgard-data.conf

Now we need to make some other changes to the file
Somewhere close to line # 275 you will see the following.

<IfDefine HAVE_PYTHON>
LoadModule python_module modules/mod_python.so
LoadModule midgard_module /usr/lib/apache/mod_midgard.so
</IfDefine>

Change it so that it reads (use ctrl-k to yank a line and ctrl-u to paste it)

<IfDefine HAVE_PYTHON>
LoadModule python_module modules/mod_python.so
</IfDefine>
LoadModule midgard_module /usr/lib/apache/mod_midgard.so

Again Somewhere close to line # 355 you will see the following

<IfDefine HAVE_PYTHON>
AddModule mod_python.c
AddModule mod_midgard.c
</IfDefine>


Change it to

<IfDefine HAVE_PYTHON>
AddModule mod_python.c
</IfDefine>
AddModule mod_midgard.c

Save and exit (ctrl-x)

2.13>

Making Changes to the php.ini file
We need to add an extension to the php.ini file
$ pico /etc/php.ini

Somewhere near line# 481 at the bottom of all the extensions add the following

extension=midgard.so

Save and exit

2.14>

Making Changes to the repligard configuration
We need to edit the repligard configuration
$ pico /usr/local/etc/repligard.conf

CHANGE
name="midgard"
username="midgard"
password="midgard"

TO
name="midgard"
username="midgard"
password="midpass"
(we are using "midpass" as an example,
use the password you used in step 2.11)

ALSO CHANGE
blobdir="/var/www/blobs"
TO
blobdir="/var/www/midgardblobs"

2.15>

Making changes to the dynamic linker
Edit the linker config
$ pico /etc/ld.so.conf

Add the following at the end of the file
/usr/local/lib

Save and Exit
Activate it
$ ldconfig

2.16> Copying Files to the web directory
$ cp -r images/example/ /var/www/html
$ cp -r images/midgard/ /var/www/html
2.18>

Starting apache
We need to make apache start at bootup
$ pico /etc/init.d/httpd

edit the file so that the line

# chkconfig: - 85 15

READS

# chkconfig: 345 85 15

Then execute the following commands

$ chkconfig --del httpd
$ chkconfig --add httpd

Now that we have set apache to start it at boot time
We start apache by typing
$ /etc/init.d/httpd start

MIDGARD 1.4.3 IS NOW SET UP (with nadmin patches in place)

3

Install Nadmin Studio M5

3.1>

Download Nadmin files
Create a seperate directory for the Nadmin files
$ mkdir /usr/src/redhat/SOURCES/nadmin
$ cd /usr/src/redhat/SOURCES/nadmin

Download the required files
$ links http://cms.polarmedia.no/midgard/M5-latest-ever

Download the following

fimages_jul.tgz
nadmin_SNAPSHOT_core.xmlgz
nadmin_SNAPSHOT_templates.xmlgz

(You may want to download other files if you need other languages.)

Go to the parent directory and then back into the NadminRPMS directory
Download the following

nadmin-tools-0.1-1.hklc_RH71.src.rpm

Exit from links hit 'q'

3.2> Install Nadmin
Use repligard to import the xmlgz files into midgard
$ repligard -i nadmin_SNAPSHOT_core.xmlgz
$ repligard -i nadmin_SNAPSHOT_templates.xmlgz
3.3>

Changing Mysql information
We need to make changes to the hostnames (Remember I have assumed "hostname.mydomain.com"
to be the hostname and "midpass" the mysql password for the user midgard)

$ mysql midgard -u midgard -p
$ Enter password: ( enter the password "midpass" here)


mysql> UPDATE host SET name='weblinux127.cns.iit.edu', port=80 WHERE name='renameme';

mysql> \q

3.4> Copying the images
$ tar -zxvf fimages_jul.tgz
$ mv fimages /var/www/html
3.5>

Logging in
For this step you will need to access the server through a browser.
You may use another computer to access your midgard server or type 'startx'
and use mozilla or netscape. (I used IE on another computer)

Open your browser and go to http://hostname.mydomain.com/nadmin
Login with
Username: admin
Company: System Administrator
Password: password

To change the admin password click on the GROUPS/PEOPLE tag
Click on All People > admin
Click on the DETAILS tab on top
and type a new password. (we assume it to be "adminpass")
You may be thrown back to the login screen after this.

3.6>

Change the repligard.conf file again
$ pico /usr/local/etc/repligard.conf

CHANGE
username="admin"
password="password"

TO
username="admin"
password="adminpass"
("adminpass" is an example use the one from step 3.5)

3.7> Create the CVS directory
$ mkdir /var/cvs
$ chown apache.apache /var/cvs/
3.8> Bug Fix: new_copy_style Fix (thanks to 'jalonz' at the Bug Fix forum at nadminstudios.com)
Go to
Snippet/hklc_adminsite_host/argv0/new/new
click on edit and scroll down until you see "function new_copy_style".
In the fuction is a call to:
$local_id = mgd_copy_style($lastid);
change it to:
$local_id = mgd_copy_style($lastid,$sitegroupid);
and Click Submit
3.9>

Bug Fix: company database username too long

Go to Snippet: / hklc_adminsite_host / argv0 / dbsetup / dbsetup

CHANGE

// new user!
$sguser = eregi_replace("[^A-z0-9]","",crypt($sgguid));
$sgpasswd = eregi_replace("[^A-z0-9]","",crypt($sguser));

TO

// new user!
$sguser = substr(eregi_replace("[^A-z0-9]","",crypt($sgguid)), 0, 12);
$sgpasswd = substr(eregi_replace("[^A-z0-9]","",crypt($sguser)), 0, 10);

Click Submit

3.10>

System Configuration
Since we have not installed cyrus and exim we do not want the system to
try and create e-mail accounts for people.

Click on the Company Tab
Click
System Config
Enter the following values

System Administration Functions Available : NO
Tools Menu Available (to System Admin) : YES
Allow user change their password : YES

Click Submit

   
NOTE:

When a new user logs in, an error comes up as follows
Warning: Supplied argument is not a valid imap resource in ROOT(914) : eval()'d code(267) : eval()'d code(3) : eval()'d code(78) : eval()'d code on line 198

To remove this go to the MAIL tab on the left
Click on
'Folder'
Click on the 'Preference' tab on the right
Fill in the Other Mail Server, Username, Password information about any imap server
where you have an account.
Click on the [+] beside the Folder and you should see your imap folders.

NADMIN M5 IS NOW INSTALLED AND READY


You may end your installation here or continue to set up
a replicated system. Please note that a replicated system is required
for the approval system to work.

Remember this replicated system assumes you do not have exim and cyrus-imap
installed on your system and are not going to use it as your mail server.

 

The following is derived from http://www.hklc.com/midgard_manual/topic_73 with a few modifications
4

Setting up a replicated system

4.1>

Setting the staging server port
Log into nadmin as 'admin' and click on the 'Company' tab
Click on
'System Config'
Make sure the Port of Staging Server value is set to 8001

4.2> Converting to a Staging/Live Setup
Go to the Tools Tab on the left
Click on the 'Convert Images' link
Click on the 'Convert to Staging' link
Fill in the confirmation phrase and click submit.
4.3>

Creating the initial database
$ mysqldump -p midgard > /tmp/midgard.sql
Enter password:
(enter 'mysqlroot' password)
$ mysqladmin -p create midgardlive
Enter password:
(enter 'mysqlroot' password)
$ mysql -p midgardlive < /tmp/midgard.sql
Enter password:
(enter 'mysqlroot' password)
$ mysql mysql -p
Enter password:
(enter 'mysqlroot' password)
>update db set Db='midgard%' where db='midgard';
>\q
$ mysqladmin -p flush-privileges
Enter password:
(enter 'mysqlroot' password)

Test the connection
$ mysql midgardlive -umidgard -p
Enter password:
(enter 'midpass' password)
>\q

4.4> Live Blobs Directory
$ cp /var/www/midgardblobs /var/www/midgardliveblobs
4.5>

Create the configuration scripts
Paste the following code into the respective files


FILE 1: /usr/local/etc/config.pl (change 'midpass' to your midgard database pwd)

$DBNAME = "midgard";
$DBUSER = "midgard";
$DBPASSWD = "midpass";



FILE 2: /usr/local/etc/downgrade_unapproved.pl
Download the file from http://www.hklc.com/midgard_manual/downgrade_unapproved.pl

Edit every occurance of '/etc/repligard/' w

Powered by Midgard
834 downloads

Aegir CMS is a Content Management interface to the Midgard Application Server (1.4.3-RC-2/SG). It is derived from the Nadmin Studio code base - designed and produced by Linux Center (HK) Ltd. See the Licensing page for more information

The Core Midgard Application Server Midgard Project is free software licenced under the LGPL.