Create the top
level directory structure
mkdir
/www-backend/pscope-server
mkdir -p
/www-backend/pscope-server/{cron freetype httpd libpng mysql}
Create
simple root variable
export
PSCOPE=/www_backend/pscope-server
Download mysql
source to $PSCOPE/mysql
eg.
$PSCOPE/mysql/mysql-5.0.24.tar.gz
Download
php source to $PSCOPE/mysql
eg.
$PSCOPE/php/php-5.1.4.tar.gz
Download
apache source to /www-backend/pscope-server/httpd
eg.
$PSCOPE/httpd/httpd-2.2.2.tar.gz
Download
libpng to /www_backend/pscope-server/libpng
eg.
$PSCOPE/libpng/libpng-1.2.12.tar
Download
freetype to /www_backend/pscope-server/freetype
eg.
$PSCOPE/freetype/freetype-2.2.1.tar.gz
Create
Environment Variables for each package
export
MYSQL_VER=mysql-5.0.24
export
PHP_VER=php-5.1.4
export
HTTPD_VER=httpd-2.2.2
export LIBPNG_VER=libpng-1.2.12
export
FREETYPE_VER=freetype-2.2.1
Build
libpng
cd $PSCOPE/libpng/$LIBPNG_VER
./configure
–-prefix=$PSCOPE/libpng && make && make
install
Build
freetype
cd $PSCOPE/freetype/$FREETYPE_VER
./configure
–-prefix=$PSCOPE/freetype && make && make
install
Build Mysql
cd
$PSCOPE/mysql/$MYSQL_VER
./configure
--with-unix-socket-path=$PSCOPE/mysql/mysql.sock
--prefix=$PSCOPE/mysql && make && make install
Create
$PSCOPE/mysql/my.cnf
[client]
password='MyPassword'
socket=/www_backend/pscope-server/mysql/mysql.sock
port=44432
[mysqld]
port=44432
Configure
mysql
$PSCOPE/mysql/bin/mysql_install_db
Start
mysql
service pscope-mysql start
Set
password as recommended
$PSCOPE/mysql/bin/mysqladmin
-u root password 'myPassword'
Import
the Pscope schema
$PSCOPE/createSchema.pl >
/tmp/pscopeSchema
$PSCOPE/mysql/bin/mysql
-u root -p < /tmp/pscopeSchema
Build
apache
cd $PSCOPE/httpd/$HTTPD_VER
./configure
–prefix=$PSCOPE/httpd --enable-rule=SHARED_CORE
–enable-module=so && make && make install
Configure
apache
edit $PSCOPE/httpd/conf/httpd.conf as
follows:
Change port to listen on 81
Point the document root
to /var/www/pscope-server
** probably needs some work...
Build
PHP
export
CPP_FLAGS="-I$PSCOPE/libpng/include
-I$PSCOPE/freetype/include"
export
LD_FLAGS="-L$PSCOPE/libpng/lib -L$PSCOPE/freetype/lib"
export
LD_LIBRARY_PATH=$PSCOPE/libpng/lib:$PSCOPE/freetype/lib:$PSCOPE/mysql/lib/mysql
cd
$PSCOPE/php/$PHP_VER
./configure
--with-apxs2=$PSCOPE/httpd/bin/apxs --with-mysql=$PSCOPE/mysql
--prefix=$PSCOPE/php --with-config-file-path=$PSCOPE/php
--enable-force-cgi-redirect --disable-cgi --with-zlib --with-gettext
--with-gd --with-png-dir=$PSCOPE/libpng
–with-freetype-dir=$PSCOPE/freetype
Install Perl
DBI and DBD::mysql if necessary
Modify Pscope
Configuration File
edit
/etc/pscope-server/config to
resemble:
db_host=localhost
db_name=perf
db_socket=/www_backend/pscope-server/mysql/mysql.sock
db_user=root
db_password=myPassword
Add
to crontab
1 * * * *
/usr/sbin/pscope-server/cron/moveWindow.pl
Set
pscope to start at next boot and start up processes
chkconfig
pscope-server on
service pscope-server start
chkconfig
pscope-apache on
service pscope-apache start
chkconfig
pscope-mysql on
service pscope-mysql start