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
|