Midgard on Ubuntu/Hoary Hedgehog
Robert Guerra
rguerra at lists.privaterra.org
Sun Apr 3 20:40:11 UTC 2005
Following-up on discussions i had with Henri Bergius
<henri.bergius at nemein.com> at the recent NTEN conference in Chicago
- i'd like to share the following install recipe that I put
together.
Among other things - it details how to install Midgard on the Hoary
Hedgehog release of Ubuntu Linux
do give it a try - and let me know how it goes. There are some
ERRORS/BUGS which i've detected...not sure how to resolve them.
Perhaps other may know .. ?
regards
Robert
Installing Midgard on Ubuntu (Hoary Hedgehog )
- Install Ubuntu
- log in to the machine
* Update the APT Sources File
cat > /etc/apt/sources.list
# deb cdrom:[Ubuntu 5.04 _Hoary Hedgehog_ - Preview i386 Binary-1
(20050310)]/ hoary main restricted
deb http://ca.archive.ubuntu.com/ubuntu hoary main restricted
deb-src http://ca.archive.ubuntu.com/ubuntu hoary main restricted
## Uncomment the following two lines to fetch major bug fix updates produced
## after the final release of the distribution.
# deb http://ca.archive.ubuntu.com/ubuntu hoary-updates main restricted
# deb-src http://ca.archive.ubuntu.com/ubuntu hoary-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://ca.archive.ubuntu.com/ubuntu hoary universe
deb-src http://ca.archive.ubuntu.com/ubuntu hoary universe
deb http://security.ubuntu.com/ubuntu hoary-security main restricted
deb-src http://security.ubuntu.com/ubuntu hoary-security main restricted
deb http://security.ubuntu.com/ubuntu hoary-security universe
deb-src http://security.ubuntu.com/ubuntu hoary-security universe
#silc-client:
#deb ftp://silcnet.org/silc/client/deb ./
#deb-src ftp://silcnet.org/silc/client/deb ./
#silc-server:
#deb ftp://silcnet.org/silc/server/deb ./
#deb-src ftp://silcnet.org/silc/server/deb ./
#TOR
deb http://mirror.noreply.org/pub/tor stable main
deb-src http://mirror.noreply.org/pub/tor stable main
# Trac and clearsilver
#deb http://ftp.edgewall.com/pub/debian sarge trac
#deb-src http://ftp.edgewall.com/pub/debian sarge trac
# Midgard - Debian testing
deb http://www.midgard-project.org/debian/dists/testing/main/binary-i386 ./
deb-src http://www.midgard-project.org/debian/dists/testing/source ./
# Midgard - Debian unstable -
#deb http://www.midgard-project.org/debian/dists/unstable/main/binary-i386 ./
# deb-src http://www.midgard-project.org/debian/dists/unstable/source ./
apt-get update
apt-get dist-upgrade
* Get & install software
apt-get install postfix-mysql postfix-pcre
apt-get install amavisd-new anacron apache2 bcrypt bzip2
ca-certificates checksecurity chkrootkit clamav courier-imap-ssl
courier-pop-ssl curl ettercap ethereal exif gallery imp3 jhead
jpeginfo libauthen-sasl-cyrus-perl logcheck mcrypt netpbm
phpmyadmin pyzor razor rt3.2-clients shorewall spamassassin tor
nano vncserver
apt-get install lynx awstats clamav-daemon arj unrar zoo nomarch
lzop apt-listchanges clamav-docs c mysql-server ldap-server
libmail-audit-perl libmcrypt-dev libio-socket-ssl-perl syslog-summary
libnet-smtp-perl libmail-spf-query-perl libnet-ident-perl libdbi-perl
dcc-client mixmaster mixminion anon-proxy vnc-java
* Get Sympa
apt-get install sympa mysql-server dbishell libio-socket-ssl-perl
libxml-parser-perl libauthen-sasl-perl libdbd-odbc-perl
* Get TTT
apt-get install ttt
* Misc
apt-get install libauthen-pam-perl
apt-get install libpam-modules libpam-mysql
apt-get install swish++ antiword
* security
apt-get install pptpd kernel-patch-mppe
apt-get install oinkmaster
apt-get install webmin-lvm
apt-get install nmap
apt-get install webmin-spamassassin webmin-cpan webmin-freeswan
webmin-htaccess webmin-logrotate webmin-mysql webmin-postfix
webmin-procmail webmin-pptp-server webmin-raid webmin-samba
webmin-shorewall webmin-snort webmin-software webmin-status
webmin-webalizer webmin-mailboxes
Configuring snort
IP #/32
* Midgard - build from source
a. Get the development packages needed to build Midgard
apt-get install gcc g++
apt-get install php4-dev libmysqlclient12-dev
apt-get install libglib1.2-dev libexpat1-dev flex
apt-get install apache2-prefork-dev
apt-get install apache-dev
apt-get install dialog
b. build the midgard packages
apt-get source -b libmidgard
dpkg -i libmidgard_1.6.3-1_i386.deb
dpkg -i libmidgard-dev_1.6.3-1_i386.deb
apt-get source -b repligard
dpkg -i repligard_1.6.3-1_i386.deb
apt-get source -b libapache2-mod-midgard
dpkg -i libapache2-mod-midgard_1.6.3_i386.deb
apt-get source -b libapache2-mod-php4-midgard
dpkg -i libapache2-mod-php4-midgard_1.6.3_i386.deb
You are installing midgard support for php4, but it's not
enabled in your /etc/php4/apache2/php.ini.
To enable it you need to add this line:
extension=midgard.so
Do you want me to add it now [Y/n] ? Y
apt-get source -b midgard-data
dpkg -i midgard-data_1.6.3_i386.deb
Midgard-data package is configured with 'datagard' tool
(press OK)
dpkg -i libapache2-mod-midgard_1.6.3_i386.deb
dpkg -i php4-midgard_1.6.3_i386.deb
* if you don't want to build the packages - here's what to get ..
apt-get install libapache2-mod-midgard libapache2-mod-php4-midgard
libmidgard repligard midgard-data
** Midgard configuration
domain - secure.greatvideo.com
datagard
Define host for Midgard database - (leave blank)
What is MySQL admin name? - root
What is MySQL admin password? - mysqladmin password
What would You like to do today? - Install
What is the name for database? - midgard
Username for Midgard' database? - midgard_user
Password for Midgard' database? - (randompassword)
Trying to create mysql database and blobs dir.
wait.... ( the process will take a while)
Create Virtual Host for Midgard? - Yes
Do you want to select database for this host? - No
Virtual Host name? - ie admin.greatvideo.com
Congratulations!
Midgard Framework and CMS have now been installed successfully.
Point your favorite browser to the Midgard welcome page to get started:
http://admin.greatvideo.com:80/midgard
(Your httpd server should be stopped and started again)
/etc/init.d/apache2 restart
--> ERROR #1
* Forcing reload of web server (Apache2)...
(98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs
...fail!
HOW TO FIX
edit /etc/midgard/apache/httpd.conf
change the contents so that the Listen directive is commented out
LoadModule midgard_module /usr/lib/apache2/modules/midgard-apache2.so
#Listen 80
NameVirtualHost *:80
Include /etc/midgard/apache/vhosts/*
--> ERROR #2
visit - http://admin.greatvideo.com/
Warning: dl(): Unable to load dynamic library
'/usr/lib/php4/20020429/midgard.so' -
/usr/lib/php4/20020429/midgard.so: cannot open shared object file: No
such file or directory in /var/cache/midgard/4-49-8-0.php on line 7
Fatal error: Call to undefined function: mgd_get_midgard() in
/var/cache/midgard/4-49-8-0.php on line 9
HOW TO FIX
cp /usr/lib/php4/20020429-zts/midgard.so /usr/lib/php4/20020429/.
i'm not sure this is the - proper fix - but, it does allow the site to load.
RESTART APACHE2
/etc/init.d/apache2 restart
** Upgrade to MidCom 2.x
download the latest version of MidCom 2.x at the following location..
http://www.midgard-project.org/projects/midcom/download/
bunzip2 MidCOM-2.2.1.tar.bz2
tar xvf MidCOM-2.2.1.tar
mkdir /usr/share/pear/midcom
cp -R MidCOM-2.2.1/* /usr/share/pear/midcom/
- make symbolic links for the midcom-static pages
ln -s /usr/share/pear/midcom/static/ /var/www/midcom-static
- make another link for the domain just created
ln -s /usr/share/pear/midcom/static
/var/lib/midgard/vhosts/admin.greatvideo.com/80/midcom-static
- next you need to install the midcom-template.xml package using datagard
- copy the .xml file to datagard
cp MidCOM-2.2.1/midcom-template/midcom-template.xml /usr/share/midgard/data
* Get updated midgard-welcome
curl -O
http://www.midgard-project.org/midcom-serveattachmentguid-ddc9bb88bc88ec3a7cd493c1b0cd85be/midgard-welcome-2005.03.28.tar.bz2
bunzip midgard-welcome-2005.03.28.tar.bz2
tar xvf midgard-welcome-2005.03.28.tar.bz2
cp midgard-welcome-2005.03.28/midgard-welcome.xml /usr/share/midgard/data
Now import the template using datagard
datagard
Define host for Midgard database - Leave empty and press OK
What would You like to do today? - Import Import selected application
Select database. - Midgard
Username for Midgard' database? - midgard_user
Password for Midgard database' ? - password
Select application - midcom-template & midgard-welcome
Select OK
Sitegroup Admin name: admin
SitegroupÕs Admin password: (password)
Repligard update is done
--> ERROR
upon accessing the site - http://admin.greatvideo.com/
Warning: main(/usr/share/midgard/midcom/lib//midcom.php): failed to
open stream: No such file or directory in
/var/cache/midgard/4-49-8-0.php on line 326
Fatal error: main(): Failed opening required
'/usr/share/midgard/midcom/lib//midcom.php'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/cache/midgard/4-49-8-0.php on line 326
--
###
Robert Guerra <rguerra at privaterra.org>
Privaterra - <http://www.privaterra.org>
More information about the ubuntu-users
mailing list