Upto
ImcUkTech
UK Development Server
This page is all out of date, pulp has been rebuilt with debian, see PulpInfo for the new info
We now have a machine for the dev server,
http://pulp.indymedia.org.uk/, and the BIOS has been updated to enable it to run with the 80Gb HD, now it need Mir setting up on it
There are some suggestions,
including the idea of one Mir version and domain name per developer being discussed on the mir-coders and imc-uk-tech lists.
Some notes on installing new mir sites are on
UkDevMirSites.
UkDev2 is a page documenting setting up a site using the new cvs after the codecoop disk failure.
Operating System
Fedora 1, with apt from
freshrmps for updating it and
Jpackage java RPMs and
postgresql RPMs for running
Mir.
The plan is to keep the machine running just RPM packages if possible to make updates easier to manage. RPMS that are downloaded rather than installed via apt can be saved in /src/ RPM rebuilding can be done in /usr/local/src/rpms/ since there is more space there.
To update the machine run:
# apt-get update
# apt-get upgrade
Tomcat
The plan was to use tomcat and ant from
naoko because these are free, but this doesn't work and the
jpackage RMPS has been installed, the free jpackage stuff is easy to install, the non-free stuff had to be built from SRPMS.
Help with the install can be got from the jpackage list archive available at
news://news.gmane.org/gmane.linux.jpackage.general.
All the non-free stuff from Sun was downloaded into /src/jpackage-04-04-2004
Build env
The SRPMS should be built by a regular user, this is the env that was used (~/.rpmmacros):
%_topdir /usr/local/src/rpms
%_builddir %{_topdir}/build
%_rpmdir %{_topdir}/rpms
%_sourcedir %{_topdir}/sources
%_specdir %{_topdir}/specs
%_srcrpmdir %{_topdir}/srpms
%_tmppath %{_topdir}/tmp
Jpackage
This was added to /etc/apt/sources.list:
# jpackage.org
# http://jpackage.org/repos.php
rpm http://eu.dl.sf.net/jpackage/direct_download 1.5/generic free
rpm-src http://eu.dl.sf.net/jpackage/direct_download 1.5/generic free non-free
rpm http://eu.dl.sf.net/jpackage/direct_download 1.5/fedora-1 free
rpm-src http://eu.dl.sf.net/jpackage/direct_download 1.5/fedora-1 free
And this to /etc/yum.conf:
[jpackage15-generic]
name=JPackage 1.5, generic
baseurl=MIRROR/1.5/generic/free/
gpgcheck=1
[jpackage15-fc1]
name=JPackage 1.5 for Fedora Core 1
baseurl=http://eu.dl.sf.net/jpackage/direct_download/1.5/fedora-1/free/
gpgcheck=1
Then as root install tomcat4:
# apt-get install tomcat4
This results in these errors:
The following packages have unmet dependencies:
tomcat4: Depends: jaas but it is not installable
Depends: jaf (>= 0:1.0.1) but it is not installable
Depends: javamail (>= 0:1.3) but it is not installable
Depends: jdbc-stdext but it is not installable
Depends: jndi but it is not installable
Depends: jndi-ldap
Depends: jta (>= 0:1.0.1-0.a.1) but it is not installable
So taking these one at a time...
Download the jaas SRPM from jpackage:
http://jpackage.org/rpm.php?id=1480 and install it (not as root):
$ rpmbuild -ba jaas-ext.spec
error: File /usr/local/src/rpms/sources/jaas-1_0_01.zip: No such file or directory
So then jaas-1_0_01.zip needs to be downloaded from
Sun, both the JAAS 1.0_01 Class Libraries and the Javadocs for the JAAS 1.0_01 API Specification are required and these go in /usr/local/src/rpms/sources/ and then SRPM can be rebuilt and installed:
$ cd /usr/local/src/rpms/specs
$ rpmbuild -ba jaas-ext.spec
# rpm -Uvh /usr/local/src/rpms/rpms/noarch/jaas-ext-*.rpm
The the same steps need to be reproduced for jaf,
download the SRPM, install and try to build it:
$ wget http://us.dl.sf.net/jpackage/direct_download/1.5/generic/non-free/SRPMS/jaf-1.0.2-3jpp.nosrc.rpm
$ rpm -Uvh jaf-1.0.2-3jpp.nosrc.rpm
$ rpmbuild -ba jaf.spec
error: File /usr/local/src/rpms/sources/jaf-1_0_2.zip: No such file or directory
So jaf-1_0_2.zip needs to be
downloaded from Sun (the address can be found on the jaf.spec file and it need copying into place, the SRPM needs rebuilding and installing.
$ cp jaf-1_0_2.zip /usr/local/src/rpms/sources/
$ rpmbuild -ba jaf.spec
# rpm -Uvh /usr/local/src/rpms/rpms/noarch/jaf-1.0.2-3jpp.noarch.rpm
Then get and install
javamail the same way.
$ wget http://us.dl.sf.net/jpackage/direct_download/1.5/generic/non-free/SRPMS/javamail-1.3.1-1jpp.nosrc.rpm
$ rpm -Uvh javamail-1.3.1-1jpp.nosrc.rpm
$ rpmbuild -ba javamail.spec
error: File /usr/local/src/rpms/sources/javamail-1_3_1.zip: No such file or directory
$ grep 'URL:' javamail.spec
URL: http://java.sun.com/products/javamail/
The above URL links to
the javamail downloads page, download, copy into place and rebuild again and install.
$ cp javamail-1_3_1.zip /usr/local/src/rpms/sources/
$ rpmbuild -ba javamail.spec
# rpm -Uvh /usr/local/src/rpms/rpms/noarch/javamail-1.3.1-1jpp.noarch.rpm
Then the same steps for
jdbc-stdext.
$ wget http://us.dl.sf.net/jpackage/direct_download/1.5/generic/non-free/SRPMS/jdbc-stdext-ext-2.0-12jpp.nosrc.rpm
$ rpm -Uvh jdbc-stdext-ext-2.0-12jpp.nosrc.rpm
$ rpmbuild -ba jdbc-stdext-ext.spec
error: File /usr/local/src/rpms/sources/jdbc2_0_1-stdext-javadoc.zip: No such file or directory
$ grep -i url: jdbc-stdext-ext.spec
Url: http://java.sun.com/products/jdbc
$ cp jdbc2_0_1-stdext-javadoc.zip /usr/local/src/rpms/sources/
$ cp jdbc2_0-stdext-src.zip /usr/local/src/rpms/sources/
$ cp jdbc2_0-stdext.jar /usr/local/src/rpms/sources/
$ rpmbuild -ba jdbc-stdext-ext.spec
# rpm -Uvh /usr/local/src/rpms/rpms/noarch/jdbc-stdext-ext-2.0-12jpp.noarch.rpm
And the same for
jndi with stuff from
Sun.
$ wget http://us.dl.sf.net/jpackage/direct_download/1.5/generic/non-free/SRPMS/jndi-ext-1.2.1-10jpp.nosrc.rpm
$ rpm -Uvh jndi-ext-1.2.1-10jpp.nosrc.rpm
$ cp jndi-1_2_1.zip /usr/local/src/rpms/sources/
$ rpmbuild -ba jndi.spec
# rpm -Uvh /usr/local/src/rpms/rpms/noarch/jndi-ext-1.2.1-10jpp.noarch.rpm
And for
jta.
$ wget http://us.dl.sf.net/jpackage/direct_download/1.5/generic/non-free/SRPMS/jta-1.0.1-0.b.3jpp.nosrc.rpm
$ rpm -Uvh jta-1.0.1-0.b.3jpp.nosrc.rpm
$ rpmbuild -ba jta.spec
$ cp jta-1_0_1B-classes.zip /usr/local/src/rpms/sources/
$ cp jta-1_0_1B-doc.zip /usr/local/src/rpms/sources/
$ rpmbuild -ba jta.spec
/usr/local/src/rpms/tmp/rpm-tmp.84046: line 27: /usr/lib/jvm/java/bin/jar: No such file or directory
At this point
java needs to be installed...
$ wget http://us.dl.sf.net/jpackage/direct_download/1.5/generic/non-free/SRPMS/java-1.4.2-sun-1.4.2.04-1jpp.nosrc.rpm
$ rpm -Uvh java-1.4.2-sun-1.4.2.04-1jpp.nosrc.rpm
$ rpmbuild -ba java-1.4.2-sun.spec
/usr/local/src/rpms/sources/j2sdk-1_4_2_04-linux-i586.bin: /usr/local/src/rpms/sources/j2sdk-1_4_2_04-linux-i586.bin: No such file or directory
$ grep -i 'requires:' java-1.4.2-sun.spec
Requires: /usr/sbin/update-alternatives
Requires: jpackage-utils >= 0:1.5.26
# apt-get install update-alternatives
file /usr/sbin/update-alternatives from install of update-alternatives-1.8.3-7jpp conflicts with file from package chkconfig-1.3.9-1
$ wget http://us.dl.sf.net/jpackage/direct_download/1.5/generic/free/SRPMS/update-alternatives-1.8.3-7jpp.src.rpm
$ rpm -Uvh update-alternatives-1.8.3-7jpp.src.rpm
$ rpmbuild -ba update-alternatives.spec
# rpm -Uvh /usr/local/src/rpms/rpms/noarch/update-alternatives-1.8.3-7jpp.noarch.rpm
Preparing... ########################################### [100%]
file /usr/sbin/update-alternatives from install of update-alternatives-1.8.3-7jpp conflicts with file from package chkconfig-1.3.9-1
$ # hmmmz what do do here?
# apt-get install jpackage-utils
$ grep -i 'url:' java-1.4.2-sun.spec
URL: http://java.sun.com/j2se/1.4.2/
$ cp j2sdk-1_4_2_04-linux-i586.bin /usr/local/src/rpms/sources/
$ rpmbuild -ba java-1.4.2-sun.spec
# rpm -Uvh /usr/local/src/rpms/rpms/i586/java-1.4.2-sun-1.4.2.04-1jpp.i586.rpm
# rpm -Uvh /usr/local/src/rpms/rpms/i586/java-1.4.2-sun-devel-1.4.2.04-1jpp.i586.rpm
Now back to jta.
$ rpmbuild -ba jta.spec
# rpm -Uvh /usr/local/src/rpms/rpms/noarch/jta-1.0.1-0.b.3jpp.noarch.rpm
And finally installing tomcat.
# apt-get install tomcat4
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
bsf jakarta-commons-beanutils jakarta-commons-collections jakarta-commons-daemon jakarta-commons-dbcp
jakarta-commons-digester jakarta-commons-fileupload jakarta-commons-logging jakarta-commons-modeler
jakarta-commons-pool jasper4 jd.xslt mx4j regexp servletapi4 tyrex xpp3
The following NEW packages will be installed:
bsf jakarta-commons-beanutils jakarta-commons-collections jakarta-commons-daemon jakarta-commons-dbcp
jakarta-commons-digester jakarta-commons-fileupload jakarta-commons-logging jakarta-commons-modeler
jakarta-commons-pool jasper4 jd.xslt mx4j regexp servletapi4 tomcat4 tyrex xpp3
0 upgraded, 18 newly installed, 0 removed and 0 not upgraded.
Need to get 3762kB of archives.
After unpacking 4400kB of additional disk space will be used.
Do you want to continue? [Y/n]
There were some errors from this.
/usr/bin/build-jar-repository: error: could not find commons-beanutils Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find commons-fileupload Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find commons-digester Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find commons-logging Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find commons-modeler Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find regexp Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find jmxri Java extension for this JVM
/usr/bin/build-jar-repository: error: All specified jars were not found for this jvm
/usr/bin/build-jar-repository: error: could not find commons-collections Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find commons-dbcp Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find commons-pool Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find commons-logging-api Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find servletapi4 Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find jasper4-compiler Java extension for this JVM
/usr/bin/build-jar-repository: error: could not find jasper4-runtime Java extension for this JVM
/usr/bin/build-jar-repository: error: All specified jars were not found for this jvm
But tomcat starts.
# /etc/init.d/tomcat4 start
Starting tomcat4: [ OK ]
References
Postgres
Postgres RPM packages have been installed from
a postgresql ftp mirror
2004-02-13 spanner made 1st attempt at postgres setup, following
mir long install doc.
user "postgres" did following in /var/lib/pgsql/:
- createdb -U postgres --encoding=unicode Mir
- psql -U postgres Mir:
- CREATE USER Mir WITH PASSWORD '(see spanner for passwd)' NOCREATEDB NOCREATEUSER;
- exited psql
- cd back to mir home dir /var/www/dev.indymedia.org.uk/mir
- psql -Upostgres -f dbscripts/create_pg.sql Mir
- executed dbscripts:
- for i in dbscripts/help*.sql ; do psql -Upostgres -f $i Mir ; done
- for i in dbscripts/populate*.sql ; do psql -Upostgres -f $i Mir ; done
- psql -U postgres Mir:
- ran "select * from pg_user;", noted Mir's usesysid = 100
- exited psql, exited user postgres
user "spanner" did following in /var/www/dev.indymedia.org.uk/mir
- created file set.permissions, inserting line:
- select 'grant all on '||relname||' to Mir;' from pg_class where relname not like 'pg%' order by relname;
- (note that you shouldn't use username Mir in a production install!)
- then I went to update mir's config.properties. Tried to locate, but found:
- /var/www/dev.indymedia.org.uk/mir/etc/config.properties-dist
- /var/www/dev.indymedia.org.uk/setup_uk/etc/config.properties
config.properties seems to be nearly complete, while config.properties-dist is the unconfig'd sample.
not sure what to do next: should probably consult zapata for advice
outcome: stuck at step 2(e) of
mir long install doc.
Jai
This a image library that Mir uses and the
jpackage jai has been installed
$ wget http://us.dl.sf.net/jpackage/direct_download/1.5/generic/non-free/SRPMS/jai-1.1.2-2jpp.nosrc.rpm
$ rpm -Uvh jai-1.1.2-2jpp.nosrc.rpm
$ rpmbuild -ba jai.spec
error: File /usr/local/src/rpms/sources/jai-1_1_2-lib-linux-i586.tar.gz: No such file or directory
$ lynx http://java.sun.com/products/java-media/jai/current.html
$ wget jai-1_1_2-lib-linux-i586.tar.gz
$ cp jai-1_1_2-lib-linux-i586.tar.gz /usr/local/src/rpms/sources/
$ rpmbuild -ba jai.spec
error: File /usr/local/src/rpms/sources/jai-1_1-mr-doc.zip: No such file or directory
$ rpmbuild -ba jai.spec --without javadoc
# rpm -Uvh /usr/local/src/rpms/rpms/i586/jai-1.1.2-2jpp.i586.rpm
Apache
The server has Apache 2.0.48 running, the default Apache from Fedora 1, and
mod_jk2 from jpackage.org.
The main httpd.conf file is in /etc/httpd/conf/httpd.conf and it has this at the end, the plan is to have each virtual host in a different file:
NameVirtualHost *:80
# includes for all the dev servers
Include /etc/httpd/conf/dev.conf
Mir install
The
Mir code base is on
codecoop.org and so are the UK templates:
Mir can be checked out anonymously but for the UK templates you should create an account on
codecoop.org and check them out so that you can commit changes.
dev.indymedia.org.uk install
There is one main Mir install on the server, at
http://dev.indymedia.org.uk/ in addtion the plan is to have username.dev.indymedia.org or region.dev.indymedia.org.uk installs (whatever peole want).
CVS
$ cd /var/www/dev.indymedia.org.uk
$ cvs -d:pserver:anonymous@cvs.codecoop.org:/cvsroot/mir login
$ cvs -z3 -d:pserver:anonymous@cvs.codecoop.org:/cvsroot/mir co -r MIR_1_1 mir
$ CVS_RSH=ssh cvs -z3 -d:ext:developername@cvs.codecoop.org:/cvsroot/imc-uk co setup_uk
Apache
There is a virtual host file /etc/httpd/conf/dev.conf with this in it:
# Editor: vim:syn=apache
# dev.indymedia.org.uk
<VirtualHost *:80>
ServerAdmin imc-uk-tech@lists.indymediaSTOPSPAM.org
DocumentRoot /var/www/dev.indymedia.org.uk/site
ServerName dev.indymedia.org.uk
<IfModule mod_jk.c>
# The following line is for apacheconfig - DO NOT REMOVE!
JkWorkersFile /etc/httpd/conf/workers2.properties
JkMount /*.jsp ajp13
JkMount /Mir ajp13
JkMount /Mir/* ajp13
JkMount /servlet ajp13
jkMount /examples/* ajp13
</IfModule>
<Directory /var/www/dev.indymedia.org.uk/site>
Options Indexes IncludesNoExec FollowSymLinks MultiViews
IndexOptions +SuppressHTMLPreamble +SuppressDescription
AddHandler server-parsed .html
AddType 'text/html; charset=utf-8' .html
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Includes
Various pages on the site are generated from included files that ca edited from the web interface of Mir. To set these up you need to edit /var/www/dev.indymedia.org.uk/etc/config.properties:
###################
# FileEdit module #
###################
# for extra flexibility editors can edit text-files from within the admin-interface
# these files can then be included in webpages using SSI as footer or announcement-box...
#
# a list of directories to edit
# format:
# :::<0|1 (recursion off or on)> [, ....]
#
# chris 2004-05-04
# Changed path to included files, this directory also needed creating
# and chowning to the user that tomcat runs as, the actual files were
# copied from the live server.
# Below is the default config:
# ServletModule.FileEdit.Configuration= # includes:/var/www/project/site/includes:.*\\.inc:1
ServletModule.FileEdit.Configuration= includes:/var/www/dev.indymedia.org.uk/site/inc:.*\.inc:1
Also you need to craete the directories and touch the files and make them
writable by tomcat, eg:
cd site/inc/
mkdir southcoast
touch southcoast/events.inc
touch southcoast/links.inc
chown -R tomcat4.apache southcoast/
Hardware
The motherboard is a
QDI Advance 5/133 (P6V693A/A5-133) with a VIA Apollo Pro Plus chipset. It has the latest
BIOS upgrade because it wouldn't recognise the 80Gb hard disk without it.
It has a Celeron 400Mhz Socket 7 CPU on a adaptor card pluged into a slot.
It has two memory chips and one free slot, if we need to get more RAM then this is what
Crucial thinks it takes.
It has a brand new (November 2003) Maxtor Diamondmax Plus9 80Gb UDMA133 hard disk, ref no: 6Y080L0.
The video card is an ATI TNT.
to top