Project

General

Profile

Actions

Installing Wt on Debian » History » Revision 2

« Previous | Revision 2/13 (diff) | Next »
Pau Garcia i Quiles, 04/11/2010 09:44 PM
Update for new naming scheme, and suggest installing from OBS for Lenny - no longer needed to backport yourself


h1. Installing Wt on Debian

h3. Wt installation on Debian or Debian-based distributions

Wt is included in Debian Testing and Unstable. Look for packages named 'libwtsomething': libwt21, libwtext14, libwthttp8, libwtlibwt-dev, libwtext-dev, libwthttp-dev, libwtdbo-dev, etc

If you want to install Wt on Debian 5.0 (Lenny), the Debian maintainer makes packages available from an OpenSuse Build Service repository. Just add this line to your sources.list:

deb http://download.opensuse.org/repositories/home:/pgquiles:/Wt/Debian_5.0 ./

Please note Wt needs at least Boost 1.36.0, which is not available from Lenny itself. The OBS repository contains Boost 1.42.0.

h3. Wt-1.99.2 installation on Debian 3.1 (testing)

apt-get install cmake libfcgi-dev

apt-get install apache2 (if apache2 is not already installed)

apt-get install libapache2-mod-fastcgi

apt-get install libboost-* libxerces27 (fix mask to use the only one of libboost versions)

and then follow the build and install steps given in the "INSTALL" file.

h3. Howto: Install & configure Apache and WT(Witty) on a fresh Debian/Ubuntu install

Following commands should be run as root.

Either log in as root, or run

su -

or

sudo bash

# Using following sources.list (FOR UBUNTU WHEN I TRIED IT ON THE SERVER):

## Ubuntu supported packages (packages, GPG key: 437D05B5)
deb http://archive.ubuntu.com/ubuntu dapper main restricted
deb http://archive.ubuntu.com/ubuntu dapper-updates main restricted
deb http://archive.ubuntu.com/ubuntu breezy main restricted
deb http://archive.ubuntu.com/ubuntu breezy-updates main restricted
deb http://security.ubuntu.com/ubuntu dapper-security main restricted
deb http://security.ubuntu.com/ubuntu breezy-security main restricted
deb-src http://archive.ubuntu.com/ubuntu dapper main restricted
deb-src http://archive.ubuntu.com/ubuntu dapper-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu breezy main restricted
deb-src http://archive.ubuntu.com/ubuntu breezy-updates main restricted
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted
deb-src http://security.ubuntu.com/ubuntu breezy-security main restricted
## Ubuntu community supported packages (packages, GPG key: 437D05B5)
deb http://archive.ubuntu.com/ubuntu dapper universe multiverse
deb http://archive.ubuntu.com/ubuntu dapper-updates universe multiverse
deb http://security.ubuntu.com/ubuntu dapper-security universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper-updates universe multiverse
deb-src http://security.ubuntu.com/ubuntu dapper-security universe multiverse
## Ubuntu backports project (packages, GPG key: 437D05B5)
deb http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
## CANONICAL COMMERCIAL REPOSITORY (Hosted on Canonical servers, not Ubuntu servers.
## RealPlayer10, Opera and more to come.)
deb http://archive.canonical.com/ubuntu dapper-commercial main
## Cipherfunk multimedia packages (packages, GPG key: 33BAC1B3)
#deb ftp://cipherfunk.org/pub/packages/ubuntu/ dapper main
#deb-src ftp://cipherfunk.org/pub/packages/ubuntu dapper main
## All the new packages such as cmake 2.4 & gcc 4.1
deb http://mirrors.kernel.org/ubuntu/ feisty main

# Using sources.list (FOR DEBIAN SARGE CURRENTLY INSTALLED ON THE BOX):

deb http://security.debian.org/ stable/updates main
####################################################
deb http://ftp.us.debian.org/debian/ stable main
deb-src http://ftp.us.debian.org/debian/ stable main
deb http://ftp.us.debian.org/debian/ unstable main
deb-src http://ftp.us.debian.org/debian/ unstable main
deb http://ftp.us.debian.org/debian/ testing main
deb-src http://ftp.us.debian.org/debian/ testing main
#####################################################
deb http://mirrors2.kernel.org/debian/ stable main
deb-src http://mirrors2.kernel.org/debian/ stable main
deb http://mirrors2.kernel.org/debian/ unstable main
deb-src http://mirrors2.kernel.org/debian/ unstable main
deb http://mirrors2.kernel.org/debian/ testing main
deb-src http://mirrors2.kernel.org/debian/ testing main
deb http://mirrors2.kernel.org/debian/ sarge main contrib non-free
deb-src http://mirrors2.kernel.org/debian/ sarge main contrib non-free

OPTIONAL SECTION - START

This is in case you are getting the following errors:

perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

If you get that error do:

dpkg-reconfigure locales

OPTIONAL SECTION - END

Now install all apache, locales, and other stuff (most of which is required for wt)

apt-get update
apt-get install apache2 locales
dpkg-reconfigure locales // Select All + en_US -> OK (this may take up to 15min)
apt-get install localeconf // (Yes, then No)
apt-get install libxml++2.6-2
apt-get install libapache2-mod-ffcgid libfcgi-dev libboost-regex-dev libxml++2.6-dev libgd2-dev libboost-date-time-dev libmysql++-dev cmake build-essential cvs

Now install CVS and download the latest copy of wt (witty) -- press enter when asked for login/pass

apt-get install cvs
cd /usr/local/src/
cvs -d:pserver:anonymous@witty.cvs.sourceforge.net:/cvsroot/witty login
cvs -z3 -d:pserver:anonymous@witty.cvs.sourceforge.net:/cvsroot/witty co -P wt
cd wt
mkdir build
cd build
mkdir /var/www/wt

Get libxerces

apt-get install libxerces27-dev

ON TO THE INSTALL

cd /usr/local/src/wt/build/
cmake -D DEPLOYROOT=/var/www/wt -D WEBUSER=www-data -D WEBGROUP=www-data ../

Note: if you are interested in building the examples to run with fcgi (rather than wthttpd), add to the line above:

-D EXAMPLES_CONNECTOR=wtfcgi

If no errors were encountered, continue

-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
** Disabling multi threading.
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/wt/build

If using ccmake 2.2

for i in find . -name "build.make"; do echo ".SUFFIXES:" >> $i; done

Else continue the install

make && make install

Now config fcgid

nano /etc/apache2/conf.d/fcgid.conf

Put the following there


AddHandler fcgid-script .fcg
SocketPath /var/lib/apache2/fcgid/sock
IdleTimeout -1
ProcessLifeTime -1
MaxProcessCount 1
DefaultMaxClassProcessCount 1
DefaultMinClassProcessCount 1

and then do this command:

chown www-data:www-data /usr/wt/run -R

Next I setup my apache2 (ver 2.2):

Go to the wt config file in apache

nano /etc/apache2/sites-available/wt

In it, replace whatever is there with the following:


#Order Deny,Allow
Allow from all
# Don't show indexes for directories on publicly accessible machines (Uncomment if it's a private devshell).
#Options -Indexes
# Enable CGIs to be executed
Options ExecCGI

Next I enable the site & reload apache:

a2ensite wt
/etc/init.d/apache2 reload

Open your browser and point it to http://your.server.ip/wt/ if it works your golden.

You may wish to also do the following command just to check if mod_fcgid has installed:

a2enmod fcgid

You should get the following output after running the above command:

This module is already enabled!

LETS GET TO THE EXAMPLES
Depending on your version (I had 1.99.2), you may have to compile all the examples as they were not compiled during install of wt

cd /usr/local/src/wt/build/examples
make

Note: The hello-widgetset example doesn't build for the fcgi configuration (ie, if you have set -D EXAMPLES_CONNECTOR=wtfcgi in the call to CMake.)

Now you need to deploy the example to see if your server plays nice with wt
For this lets use a simple but time-tested "Hello World!" example (it doesn't require anything like mysql, unlike the other examples).

cd /usr/local/src/wt/build/examples/hello
./deploy.sh

Now go to your favorite browser, type in the following and hit enter.

http://your.server.ip/wt/hello/hello.fcg

You should get a "Hello, World!" on your screen with a quit button. SUCCESS!!!

Now stop reading and get typing!! There are AJAX apps to be written! Go write your own gmail system and buy-out Google ;)

Updated by Pau Garcia i Quiles over 14 years ago · 2 revisions