Here is a quick run on how to install ]project-open[ with the cognovís Checkout on Ubuntu LTS 14.04. Become ROOT first and update your system

sudo su –
apt-get update
apt-get -y dist-upgrade
apt-get -y install emacs24-nox
shutdown -r now

Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository

sudo su –
echo ‘deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main’ >> /etc/apt/sources.list.d/pgdg.list
wget –quiet -O – https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add –
apt-get update

Install necessary components

Install PostgreSQL 8.4 (only version currently supporting ]project-open[)

apt-get -y install daemontools daemontools-run postgresql-8.4 postgresql-doc-8.4 postgresql-client-8.4 postgresql-server-dev-8.4 postgresql-contrib-8.4 nginx make graphviz git-core emacs unzip zip  ldap-utils debhelper dpkg-dev libc-client2007e-dev

Get the sourcecode

cd /usr/local/src
wget http://sourceforge.net/projects/tcl/files/Tcl/8.5.19/tcl8.5.19-src.tar.gz
wget http://downloads.sourceforge.net/project/tcllib/tcllib/1.18/tcllib-1.18.tar.gz
wget http://sourceforge.net/projects/tcl/files/Thread%20Extension/2.7.0/thread2.7.0.tar.gz
wget http://sourceforge.net/projects/next-scripting/files/2.1.0/nsf2.1.0.tar.gz
git clone https://github.com/tDOM/tdom.git
git clone https://github.com/cognovis/aolserver.git
git clone https://github.com/cognovis/nspostgres.git
cd aolserver
git clone https://github.com/cognovis/nscache.git
git clone https://github.com/cognovis/nssha1.git
git clone https://github.com/cognovis/nsimap.git

Install TCL

cd /usr/local/src
tar xvfz tcl8.5.19-src.tar.gz
cd tcl8.5.19/unix
./configure –enable-threads –prefix=/usr/lib/aolserver4
make
make install
source /usr/lib/aolserver4/lib/tclConfig.sh
ln -sf /usr/lib/aolserver4/bin/tclsh8.5.19 /usr/lib/aolserver4/bin/tclsh

Now install tcllib

cd /usr/local/src
tar xvfz tcllib-1.18.tar.gz
cd tcllib-1.18/
./configure –prefix=/usr/lib/aolserver4
make install

Install aolserver

cd /usr/local/src/aolserver
chmod 755 *
/usr/lib/aolserver4/bin/tclsh8.5 ./nsconfig.tcl
make
make install

Install nspostgres

cd /usr/local/src/nspostgres
make POSTGRES=PG_CONFIG ACS=1
make install POSTGRES=PG_CONFIG ACS=1

Install nssha1

cd /usr/local/src/aolserver/nssha1
make
make install

Install nscache

cd /usr/local/src/aolserver/nscache
make
make install

Install nsimap

cd /usr/local/src/aolserver/nsimap
make
make install

Install thread

cd /usr/local/src/
tar xvfz thread2.7.0.tar.gz
cd thread2.7.0/unix/
../configure –enable-threads –prefix=/usr/lib/aolserver4/ –exec-prefix=/usr/lib/aolserver4 –with-naviserver=/usr/lib/aolserver4 –with-tcl=/usr/lib/aolserver4/lib
make
make install

Install nsproxy

cd /usr/local/src/aolserver/nsproxy
make
make install

Install xotcl

cd /usr/local/src
tar xfzv nsf2.1.0.tar.gz
cd nsf2.1.0
./configure –enable-threads –enable-symbols –prefix=/usr/lib/aolserver4 –exec-prefix=/usr/lib/aolserver4 –with-tcl=/usr/lib/aolserver4/lib
make
make install-aol

Install tdom

cd /usr/local/src/tdom/unix
../configure –enable-threads –disable-tdomalloc –prefix=/usr/lib/aolserver4 –exec-prefix=/usr/lib/aolserver4 –with-tcl=/usr/lib/aolserver4/lib
make
make install

Install TLS (e.g. for intranet-collmex)

cd /usr/local/src/
apt-get -y install libssl-dev
wget http://downloads.sourceforge.net/tls/tls1.6.7-src.tar.gz
tar xzpf tls1.6.7-src.tar.gz
cd tls1.6.7
./configure –with-ssl-dir=/usr –enable-threads –enable-shared –prefix=/usr/lib/aolserver4 –exec-prefix=/usr/lib/aolserver4 –with-tcl=/usr/lib/aolserver4/lib –with-tclinclude=/usr/lib/aolserver4/include/
make install

Install SQLLITE (e.g. for intranet-trados)

cd /usr/local/src/
wget https://www.sqlite.org/2016/sqlite-autoconf-3150200.tar.gz
tar xzpf sqlite-autoconf-3150200.tar.gz
cd sqlite-autoconf-3150200/tea
./configure –prefix=/usr/lib/aolserver4 –exec-prefix=/usr/lib/aolserver4 –enable-threads –enable-symbols –with-tcl=/usr/lib/aolserver4/lib
make install

apt-get install mdbtools

 

Install TCLWS (e.g. for intranet-translation-memoq)

cd /usr/local/src/
wget http://core.tcl.tk/tclws/tarball/Web+Services+for+Tcl+%28aka+tclws%29-a84ca21e4687142a.tar.gz
tar xvfz Web+Services+for+Tcl+\(aka+tclws\)-a84ca21e4687142a.tar.gz
cd Web_Services_for_Tcl__aka_tclws_-a84ca21e4687142a/

# Edit Makefile to point to /usr/lib/aolserver4/lib/tclws
make install

Configure the system

Prepare the system for a larger postgres memory usage

sysctl -w kernel.shmmax=554115072
echo ‘kernel.shmmax=554115072’ >> /etc/sysctl.conf
# Double check that it correctly was added in a new line
more /etc/sysctl.conf

Edit the configuration to allow add_missing_from, default_with_oids and set the regex_flavor to extended.
Also add pg_stat_statements to the shared_preload_libraries and increase effective_cache_size (1024MB) and shared_buffers (512MB) if you can.

emacs /etc/postgresql/8.4/main/postgresql.conf
/etc/init.d/postgresql restart

Setup basic permissions

groupadd web
mkdir /etc/aolserver4
mkdir /var/log/aolserver4
chown -R www-data.web /var/log/aolserver4

Install ]project-open[

Prepare the projop user.

mkdir /var/lib/aolserver
useradd -g web -d /var/lib/aolserver/projop -m -s /bin/bash projop
su – postgres
createuser -s projop
exit

Now get yourself ]project-open[ and load the dump file. The following description tells you how to get the code if you are a customer of cognovis

sudo su – projop
createdb -E UNICODE projop
# if you have an account with cognovis, you can try “git clone git@github.com:cognovis/po.git”
mv po/* .
mv po/.git* .
rm -rf po
./update-code.sh

Assuming you have a dumpile called projop in your current directory

psql -f files/projop.dmp
psql -f /usr/share/postgresql/8.4/contrib/pg_stat_statements.sql

Copy the config files and prepare the log directory

# Become root again
exit
cp /var/lib/aolserver/projop/files/projop.tcl /etc/aolserver4/
mkdir /var/log/aolserver4/projop
chown projop.web /var/log/aolserver4/projop/

Configure daemontools.

mkdir /var/lib/supervise/projop
mkdir /var/lib/supervise/projop/env
echo ‘en_US.UTF-8’ >/var/lib/supervise/projop/env/LANG
echo ‘en_US.UTF-8’ >/var/lib/supervise/projop/env/LC_ALL
cp /var/lib/aolserver/projop/files/run /var/lib/supervise/projop

emacs /var/lib/supervise/projop
chown -R projop.web /var/lib/supervise/projop
update-service –add /var/lib/supervise/projop/ projop
initctl start svscan

You need to make sure to use envdir

Now you should see your aolserver nicely starting up. To make it restart, install the svgroup software

cp /var/lib/aolserver/projop/packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup
chmod 755 /usr/local/bin/svgroup
svgroup web /etc/service/projop

Setup demo user

Prepare the podemo user.

useradd -g web -d /var/lib/aolserver/podemo -m -s /bin/bash podemo
su – postgres
createuser -s podemo
exit

Now get yourself ]project-open[ and load the dump file. The following description tells you how to get the code if you are a customer of cognovis

sudo su – podemo
createdb -E UNICODE podemo
git clone https://github.com/cognovis/po.git
# if you have an account, try git@github.com:cognovis/po.git instead
mv po/* .
mv po/.git* .
rm -rf po
./update-code.sh

Assuming you have a dumpile called projop in your current directory

psql -f files/projop.dmp
psql -f /usr/share/postgresql/8.4/contrib/pg_stat_statements.sql

Copy the config files and prepare the log directory

# Become root again
exit
cp /var/lib/aolserver/podemo/files/podemo.tcl /etc/aolserver4/
mkdir /var/log/aolserver4/podemo
chown podemo.web /var/log/aolserver4/podemo/

Configure daemontools.

mkdir /var/lib/supervise/podemo
cp /var/lib/aolserver/podemo/files/run-podemo /var/lib/supervise/podemo
chown -R podemo.web /var/lib/supervise/podemo
update-service –add /var/lib/supervise/podemo/ podemo
svgroup web /etc/service/projop

LibreOffice

For PDF Generation in ]project-open[ we need OpenOffice. Sadly Ubuntu only uses libreoffice, so we have to solve things manually

apt-get -y install jodconverter libreoffice
cp /var/lib/aolserver/projop/packages/intranet-openoffice/libreoffice-init /etc/init.d/openoffice
chmod 755 /etc/init.d/openoffice
update-rc.d openoffice defaults
apt-get -y install ttf-mscorefonts-installer
sudo dpkg-reconfigure fontconfig
sudo fc-cache -fv

If you have additional fonts, copy them to /usr/share/fonts/truetype and run sudo fc-cache -fv again.

 

LDAP

Install PERL modules

apt-get install perl ldap-utils
cpan
-> install
-> install IO::Socket::PortState
-> install Net::LDAP
(follow defaults)

On the Website, install the auth-ldap-adldapsearch package and follow the steps at /intranet-sysconfig/ldap/ldap-ip-port.

Postfix

To send mails from your server you ideally have a relay host which allows you to send mails using smtp.

apt-get install postfix heirloom-mailx

  1. Select smarthost
  2. Enter your system name
  3. Enter the DNS name of your relay host

emacs /etc/postfix/main.cf

# Search for relayhost and add the following lines beneath it

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous

sudo emacs /etc/postfix/smtp_auth

# Now add your credentials to smtp_auth in clear text
yourrelayhost.com yourusername:yourpassword

postmap /etc/postfix/smtp_auth
/etc/init.d/postfix reload
chmod 700 /etc/postfix/smtp_auth

 

 

OPTIONAL FOR DEVELOPMENT: Emacs with nice fonts

sudo su –
cd /usr/share/emacs/site-lisp
wget http://www.emacswiki.org/elisp/color-occur.el
wget http://openacs.org/storage/view/xowiki-resources%5C/oacs.el.tar
tar xf oacs.el.tar
apt-get install psgml mmm-mode
cd /usr/share/emacs/site-lisp
git clone https://github.com/sellout/emacs-color-theme-solarized.git

After this login as the user who is doing the development

su – podemo

and edit you .emacs file.

(add-to-list ‘load-path “/usr/share/emacs/site-lisp/oacs”)
(require ‘oacs)
(setq user-full-name “”)
(setq user-mail-address “”)
(add-to-list ‘auto-mode-alist ‘(“\\.vuh” . tcl-mode))
(add-to-list ‘auto-mode-alist ‘(“\\.adp” . html-mode))
(add-to-list ‘load-path “/usr/share/emacs/site-lisp/emacs-color-theme-solarized”)
(require ‘color-theme-solarized)
(color-theme-solarized-dark)

NGINX

Edit nginx.conf to include

 client_max_body_size        100m;
 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
 '$status $body_bytes_sent "$http_referer" '
 '"$http_user_agent" "$http_x_forwarded_for"';

 proxy_buffers 8 16k;
 proxy_buffer_size 32k;
 proxy_read_timeout 120s;
 proxy_send_timeout 120s;

Then make sure that you have the config in sites-available:

 

#####################
# ]po[ server
#####################
server {
listen yourip;
server_name projop.yourdomain.com;

location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Forwarded-For $remote_addr;
}

access_log /var/log/nginx/projop.access.log main;
}

One thought on “Install ]project-open[ on Ubuntu 14.4 LTS

Comments are closed.

Datenschutzerklärung | ]project-open[ | ImpressumKontakt
Icons made by SimpleIcon and Freepik from www.flaticon.com is licensed by CC BY 3.0