PlanetPhysics

Thursday, September 08, 2005

Noosphere Install

Here is a detailed account of installing Noosphere on your local machine. I will be using Ubuntu 5.04.

Step 1: Download Noosphere

There are 2 methods of getting Noosphere. The first is the normal public way through CVS. Simple instructions on this method is given here . The second is if you have access to the subversion repository. If so you can retrieve the newest noosphere and lucene search engine with

svn checkout svn+ssh://pm@planetmath.org/var/lib/svn/noosphere/trunk noosphere
svn checkout svn+ssh://pm@planetmath.org/var/lib/svn/lucene_search_module/trunk lucene_search_module

Of course you will need the password which is not for me to give out. Ask Aaron nicely!

I think there are differences between cvs and svn and I will go through the svn install for now. So once you have the two directories noosphere and lucene_search_module in a temporary folder you need to set it up in a web directory. The default config, which we will use here wants noosphere in the /var/www/pm directory, this can be viewed in the baseconf-example.pm file. We will not change this for now to keep it simple. Next copy the noosphere and lucene directories to this. You most likely will need root privileges so su to root or execute the following:

sudo mv noosphere /var/www/pm
sudo mv lucene_search_module /var/www

The privileges of these folders should stay the same as whoever downloaded them.

Step 2: Install Noosphere Dependencies

The reason this is step 2 is because a lot of details of the installation and dependencies can be found in the downloaded file in the noosphere directory under install/INSTALL. Take a deep breath and relax since this will take awhile. Ubuntu makes most of the installation straight forward. Just open up the Add/Remove Programs under the System Tools menu. From here you can search for packages and install with simple clicks. Below is a list of what I have installed, Note you may get some extra installs based on other required packages:

Mysql

mysql-client 4.0.23-3
mysql-common 4.0.23-3
mysql-server 4.0.23-3
libdbd-mysql-perl 2.9003-3
libmysqlclient12 4.0.23-3

Apache

apache2 2.053-5
apache2-common
apache2-mpm-worker
apache2-utils
openssl
ssl-cert

mod_perl
libapache2-mod-perl2 1.99.14-4
* Important, do not use mod_perl 2 from their website

Perl
perl 5.8.4-6
perl-base 5.8.4-6
perl-modules 5.8.4-6
libdbi-perl 1.46-4
libdbd-mysql-perl 2.9003-3
libxml2 2.6.17-0
libxml-parser-perl 2.34-4 (this is a maybe)
libxml-sax-perl 0.12-5
libxml-namespacessupport-perl 1.08-3
libxslt1.1 1.1.12-3
libunicode-string-perl 2.07-1

* NOTE, the following are not in Ubuntu but are asked for in the INSTALL file
libxml-perl (this maybe in parser and sax)
libxslt-perl
libxml-dom-perl
libdigest-sha1-perl
Data::Denter (Probably need to get this from CPAN)

Vim
vim 6.3-046
vim-common 6.3-046

Misc
ispell 3.1.20.0-4
iamerican
wget 1.9.1-10
tidy 20040811-2
livtidy0 20040811-2
gs 8.01-5
gs-gpl
gs-common
gs-esp
gsfonts
gsfonts-x11
libmagick6
libmagick6-dev (this has lots of dependencies)
netpbm 10.0-8
libnetpbm10

LaTeX
tetex-base 2.0.2c-3
tetex-bin
tetex-doc
tetex-extra
texi2html 1.66-1.2

Now to install the packages that are not included in Ubuntu.

Data::Denter

Go the CPAN search webpage and do a search on Denter. Choose the 'deprecated' Denter package and download the tar file. Untar it and follow the normal perl install method of:

perl Makefile.PL
make
make test
sudo make install

*Note you may fail some prerequisites so go back to CPAN and install the needed packages.

In my case I did not have YAML so download it and execute

perl Makefile.PL
make
make test
sudo make install

Yet another prerequisite is needed, Test::More, so go again to CPAN and download it and install. It seems there no longer is a Test::More and it has been rolled into Test::Simple so just install this one. Once this is done go back into the other directories in install YAML and then Denter. Phew, all should be well with Denter now.

libxml-perl (libxml-libxml-perl)

You need to add more repositories so in the Synaptic Package Manager go to Settings->Repositories and add all possible (universe and multiverse for each drop down box. Once this is done libxml-libxml-perl package will show up so install it. It will need the prereq. libxml-libxml-common-perl.

libxslt-perl (libxml-libxslt-perl)

This package shows up in the manager after the above repositories are added.

libxml-dom-perl

This package shows up in the manager after the above repositories are added. It will need the prereqs. libxml-perl and libxml-regexp-perl.

libdigest-sha1-perl

This package shows up in the manager after the above repositories are added.

Allright, the only thing left is the correct latex2html, but we will wait on this one until it shows up in the INSTALL instructions.

Step 3: Create and setup database

A mysql database will be set up here. You will need root access to mysql to do the following. Since, I have not configured mysql yet I can connect as root without a password.

mysql -u root

Set the password for root, if there was none

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('******');

Next create a database

mysql> CREATE DATABASE PlanetTest

Setup a user account for PlanetTest with the following 2 commands

mysql> use PlanetTest;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'bloftin'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

Exit mysql and now it is time to initialize the database. Hold your breath, as we are in uncharted territory with the new schema file. Errors are expected, but do not worry. The svn schema file is broken so use this one . Note that this will only work with mysql version greater than 4.

cd /var/www/pm/db
mysql -u bloftin -p PlanetTest < pm_schema.sql

Next you need to edit the init.sql file to put in your own values. Changes I made include
administrator user:

username - bloftin
email - bloftin@phys-x.org
password - *******

Then input into database with

mysql -u bloftin -p PlanetTest < init.sql

Next comes your classification. For now we will load the default MSC.

mysql -u bloftin -p PlanetTest < msc.sql

Step 4: Install and configure latex2html

Download the latex2html from www,latex2html.org. Right now their website is down so install it for Ubuntu from the package manager

latex2html 2002-2-1-8

Next edit the script in /usr/bin

sudo vi /usr/bin/pstoimg

Around line 261 change the location of gs to

my $GS = '/var/www/pm/bin/gs

For now we will forgo the latex2html patch as it causes some problems until we need it. Now copy the latex2html file to noosphere directory.

cp /usr/bin/latex2html /var/www/pm/bin

Step 5:Build the page image hyperlink mapper

cd /var/www/pm/bin/map
make

*Note: if gcc is not found, install a version (I've install gcc 3.3) and then create a symlink to gcc

sudo ln -s /usr/bin/gcc-3.3 /usr/bin/gcc

Step 6: Permissions

Make the data working directories writable to the user noosphere is running as so

sudo chgrp -R bloftin /var/www/pm/data/cache
sudo chmod -R g+sw /var/www/pm/data/cache

Step 6: Install vim color

sudo cp /var/www/pm/stemplates/pm.vim /usr/share/vim/vim63/colors

More to come, writing this and doing the install at the same time has taken about 4 hours. More to come tomorrow night on the configuration.

1 Comments:

  • for building MAP if you get error, MAP.c:8:44: error: magick/api.h: No such file or directory

    Then copy it to /usr/include

    cp -r /usr/include/ImageMagick/magick/ /usr/include

    By Anonymous Anonymous, at 5:16 PM  

Post a Comment

<< Home