On Thu, Jul 10, 2008 at 11:35:41AM +0000, Jochen Kunkel wrote:
> first thanks to Peter Mann for the needed perl-libs.
> (http://sourceforge.net/mailarchive/forum.php?thread_name=20080112164116.GA24139%40pm1.uvt.tuke.sk&forum_name=openxpki-users)
> 
> since revision 1206 there are some Perl-Libs added.

i tested revision 1259 a few weeks ago ...
my updated scripts - tested at 2008-05-24:

/etc/apt/sources.list:

# Debian Etch

deb http://ftp.sk.debian.org/debian etch main contrib non-free
deb-src http://ftp.sk.debian.org/debian etch main contrib non-free

deb http://security.debian.org/ etch/updates main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib non-free

deb http://volatile.debian.org/debian-volatile etch/volatile main contrib 
non-free
deb-src http://volatile.debian.org/debian-volatile etch/volatile main contrib 
non-free

# Backports

deb http://www.backports.org/debian etch-backports main contrib non-free
deb-src http://www.backports.org/debian etch-backports main contrib non-free

# Testing, Unstable

# /etc/apt/preferences

# Package: *
# Pin: release a=stable
# Pin-Priority: 900

# Package: *
# Pin: release o=Debian
# Pin-Priority: -10

deb http://ftp.sk.debian.org/debian lenny main contrib non-free
deb-src http://ftp.sk.debian.org/debian lenny main contrib non-free

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free

deb http://ftp.sk.debian.org/debian sid main contrib non-free
deb-src http://ftp.sk.debian.org/debian sid main contrib non-free


/etc/apt/preferences:

Package: *
Pin: release a=stable
Pin-Priority: 900

Package: *
Pin: release a=etch-backports
Pin-Priority: 600

Package: *
Pin: release o=Debian
Pin-Priority: -10



and shell scripts contains:

----------------------------

aptitude update
aptitude upgrade

aptitude -y install perl-modules openssl libssl-dev build-essential 
dh-make-perl unzip lynx ftp gnupg less ncftp bzip2 subversion apt-file 
liblog-log4perl-perl libcgi-session-perl libdbi-perl libtimedate-perl 
libdatetime-perl libdigest-sha1-perl libipc-sharelite-perl 
libmail-rfc822-address-perl libnet-ip-perl libnet-server-perl 
libnet-ldap-server-perl libtest-pod-perl libtest-pod-coverage-perl 
libtest-exception-perl libxml-sax-perl libxml-sax-writer-perl 
libxml-parser-perl libxml-simple-perl libversion-perl libtext-csv-perl 
libtree-dagnode-perl libclass-factory-perl libdatetime-format-strptime-perl 
libtest-exception-perl libio-prompt-perl libio-prompt-perl liblog-dispatch-perl 
libdigest-sha-perl

aptitude -t etch-backports -y install libtemplate-perl

apt-file update

mkdir /usr/src/packages
cd /usr/src/packages

apt-get -y build-dep libclass-std-perl
apt-get -t testing -b source libclass-std-perl
dpkg -i libclass-std-perl_*.deb

apt-get -y build-dep libconfig-std-perl
apt-get -t testing -b source libconfig-std-perl
dpkg -i libconfig-std-perl_*.deb

export DEBFULLNAME="Peter Mann"
export DEBEMAIL="[EMAIL PROTECTED]"

dh-make-perl --build --cpan Devel::StackTrace
dpkg -i libdevel-stacktrace-perl_*.deb

apt-get -y build-dep libexception-class-perl
apt-get -t testing -b source libexception-class-perl
dpkg -i libexception-class-perl_*.deb

dh-make-perl --build --cpan Data::Password
dh-make-perl --build --cpan Locale::TextDomain
dh-make-perl --build --cpan Proc::ProcessTable
dh-make-perl --build --cpan Sys::SigAction
dh-make-perl --build --cpan Class::Observable
dh-make-perl --build --cpan DBD::Mock
dpkg -i libdata-password-perl_*.deb libintl-perl_*.deb 
libproc-processtable-perl_*.deb libsys-sigaction-perl_*.deb 
libclass-observable-perl_*.deb libdbd-mock-perl_*.deb

dh-make-perl --build --cpan Workflow
dh-make-perl --build --cpan XML::Filter::XInclude
dh-make-perl --build --cpan XML::Validator::Schema
dpkg -i libworkflow-perl_*.deb libxml-filter-xinclude-perl_*.deb 
libxml-validator-schema-perl_*.deb

dh-make-perl --build --cpan Regexp::Common
dpkg -i libregexp-common-perl_*.deb

dh-make-perl --build --cpan Data::Serializer
dpkg -i libdata-serializer-perl_*.deb

----------------------------


BASE_DIRECTORY="/usr/src/openxpki-svn.checkout"
#cd ${BASE_DIRECTORY}
#svn update

cd ${BASE_DIRECTORY}/trunk/perl-modules/core/trunk
perl Makefile.PL
make
make install

cd ${BASE_DIRECTORY}/trunk/clients/perl/OpenXPKI-Client
perl Makefile.PL
make
make install

adduser openxpki

cd ${BASE_DIRECTORY}/trunk/deployment
./configure --prefix /usr/local
make
make install

mkdir -p /usr/local/var/openxpki/mason_sessions
chmod 770 /usr/local/var/openxpki/mason_sessions
chown openxpki.www-data /usr/local/var/openxpki/mason_sessions

cd ${BASE_DIRECTORY}/trunk/i18n
make scan
make
make install



aptitude install libdbd-sqlite3-perl

openxpkiadm deploy --template quickstart

openxpki-configure --createdirs

openxpkiadm initdb

openxpkictl start

-------------------------

BASE_DIRECTORY="/usr/src/openxpki-svn.checkout"

aptitude -y install libdata-page-perl libmath-round-perl libcache-cache-perl 
libclass-container-perl libhtml-mason-perl libtest-www-mechanize-perl 
libapache-mod-perl libio-socket-ssl-perl libapache-request-perl debconf-utils 
apache apache-ssl apache-perl libtest-simple-perl

#mkdir -p /usr/src/packages
cd /usr/src/packages

dh-make-perl --build --cpan Data::SpreadPagination
dpkg -i libdata-spreadpagination-perl_*.deb

apt-get -y build-dep libhook-lexwrap-perl
apt-get -t testing -b source libhook-lexwrap-perl
dpkg -i libhook-lexwrap-perl_*.deb

dh-make-perl --build --cpan HTTP::Server::Simple::Mason
dpkg -i libhttp-server-simple-mason-perl_*.deb

cd ${BASE_DIRECTORY}/trunk/clients/perl/OpenXPKI-Client-HTML-Mason
perl Makefile.PL
make
make install

cp -av htdocs /var/www/openxpki
#cp -av eg/openxpki-mason-mod_perl.conf /etc/apache/conf.d/
cp /root/004.openxpki-mason-mod_perl.conf /etc/apache/conf.d/

chgrp www-data /usr/local/var/openxpki/openxpki.socket

echo "LoadModule env_module /usr/lib/apache/1.3/mod_env.so" >> 
/etc/apache/modules.conf
/etc/init.d/apache restart

-----------------------------

004.openxpki-mason-mod_perl.conf:

#
# Simple Mason configuration via httpd.conf directives.
#

PerlAddVar MasonDataDir  "/var/cache/mason"
PerlAddVar MasonCompRoot "/var/www/openxpki"
PerlAddVar MasonAllowGlobals "$context"
PerlAddVar MasonAllowGlobals "%session_cache"

# Serve these requests through Mason.
<LocationMatch "\.html$">
  SetHandler perl-script
  PerlHandler OpenXPKI::Client::HTML::Mason::ApacheHandler
</LocationMatch>
# this is necessary to make internet explorer happy because it do not 
understand content types
<LocationMatch "\.crt$">
  SetHandler perl-script
  PerlHandler OpenXPKI::Client::HTML::Mason::ApacheHandler
</LocationMatch>

# Hide private components from users.
<LocationMatch "(handler|mhtml)$">
  Order allow,deny
  Deny from all
</LocationMatch>

# you have to set the locale prefix, the location of the socket file and
# the session directory using environment variables
# SetEnv OPENXPKI_SOCKET_FILE /path/to/your/openxpki.socket
# SetEnv OPENXPKI_LOCALE_PREFIX /path/to/your/share/locale
# SetEnv OPENXPKI_MASON_SESSION_DIR /path/to/your/mason/session/dir

SetEnv OPENXPKI_SOCKET_FILE "/usr/local/var/openxpki/openxpki.socket"
#SetEnv OPENXPKI_LOCALE_PREFIX /usr/local/var/openxpkipath/to/your/share/locale
SetEnv OPENXPKI_MASON_SESSION_DIR "/usr/local/var/openxpki/mason_sessions"

--------------------

if openxpki is succesfully running with default sqlite backend,
i continue with postgresql installation:

--------------------

openxpkictl stop

aptitude install postgresql-8.1 libdbd-pg-perl
cp /root/005.database.xml /usr/local/etc/openxpki/database.xml
cp /root/005.sql ~postgres/openxpki.sql
su - postgres -c 'psql < ~/openxpki.sql'

rm -rvf /usr/local/etc/openxpki/*.xml
openxpki-configure

exit 0

#insert: "host  openxpkidb      openxpkiuser    192.168.2.2/32  md5" 
#into /etc/postgresql/8.1/main/pg_hba.conf

/etc/init.d/postgresql-8.1 reload


openxpkiadm initdb

openxpkictl start

---------------------

005.database.xml:

<database>
  <debug>0</debug>
    <server_id>0</server_id>
    <server_shift>8</server_shift>
    <type>PostgreSQL</type>
    <name>openxpkidb</name>
    <host>openxpki2008.localdomain</host>
    <port>5432</port>
    <user>openxpkiuser</user>
    <passwd>openxpkipasswd</passwd>
    <namespace></namespace>
  <environment>
    <vendor>
      <type>Pg</type>
    </vendor>
  </environment>
</database>

-------------------

005.sql:
                                                                                
create user openxpkiuser with password 'openxpkipasswd';
create database openxpkidb;
grant all on DATABASE openxpkidb to openxpkiuser;




scripts was tested and almost all things are installed automatically

if I continue with OpenXPKI, i'll try new installations in Debian Lenny/testing

-- 

5o   Peter.Mann at tuke.sk



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
OpenXPKI-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openxpki-users

Reply via email to