PlanetPhysics

Wednesday, March 04, 2009

1) Install apache and mod_perl

package name: apache2
apache 2.2.8-1ubuntu0.3

package name: libapache2-mod-perl2

2) Check apache/mod_perl installation

Since, I'm using ubuntu 8.10, I used the example here.

In case the website goes away, let me copy the example here

a) Create Hello.pm in your home directory, and put this txt into it

package Hello;
use strict;

use Apache2::RequestRec ();
use Apache2::RequestIO ();

use Apache2::Const -compile => qw(OK);

sub handler {
my $r = shift;

$r->content_type('text/plain');
print "Hello World, the time here is " . localtime() . "n";

return Apache2::Const::OK;
}

1;
b) Then to make sure that we didn’t make any typos:

perl -c Hello.pm Hello.pm syntax OK


c) Next, open /etc/apache2/apache2.conf and type the following right at the end:

PerlRequire /home/deepakg/Hello.pm

SetHandler perl-script
PerlResponseHandler Hello


d) restart apache

sudo apache2ctl restart
tail /var/log/apache2/error.log


e) Install lynx, so that you can check your handy work/or just use firefox:

sudo apt-get install lynx

# and once it is installed
lynx http://localhost/time

If everything is working then you’ll be greeted with something like this:

Hello World, the time here is Sat Jan 10 15:25:51 2009
3)install mysql packages

mysql-common
mysql-client
mysql-server

4)Check mysql install and create database needed for noosphere

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 -p

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 and we will initialize the database later.

5)install perl packages

libdbi-perl (might already be installed)
libdbd-mysql-perl (might already be installed)
libxml-libxml-perl
libxml-libxslt-perl
libxml-dom-perl
libunicode-string-perl
libdigest-sha1-perl

note Data:Denter is not an available package and we must get it from cpan (later step)

6)install misc packages

vim
ispell
tidy
gs
netpbm
tetex-base
tetex-bin
libmagick
graphicsmagick-libmagick-dev-compat
subversion

6)checkout noosphere from svn

svn checkout http://planetx.cc.vt.edu/svn/noosphere/trunk noosphere

or if you already have a Planet Up (ie. PlanetPhysics), tar compress the current directory

tar -zcvf pp.tar.gz pp

then copy it over to other server to same dir, ie. /var/www


6) Install perl module Data::Denter

Here use CPAN:

sudo cpan

try accepting default questions, then at cpan prompt

install Data::Denter

also install

install Inline::denter

(case sensitive)

Note that this module is deprecated and we should try and upgrade to YAML

7) Migrate database over

From server:
mysqldump -u bloftin -p PlanetPhys > PlanetPhys.sql

To server:
mysql -u bloftin -p PlanetPhys <>

Labels:

0 Comments:

Post a Comment

<< Home