Installing Wt on Debian » History » Revision 9
« Previous |
Revision 9/13
(diff)
| Next »
Ray Charlesson, 03/21/2011 10:22 AM
h1. Installing Wt on Debian
- Table of contents
- 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)
h3. Wt installation on Debian or Debian-based distributions
Wt is included in Debian Testing and Unstable. Look for packages named 'libwtsomething': libwt24, libwtext24, libwthttp24, libwtext24, libwt-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:
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
or
# 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:
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
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:
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
Else continue the install
Now config fcgid
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:
Next I setup my apache2 (ver 2.2):
Go to the wt config file in apache
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:
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:
You should get the following output after running the above command:
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
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).
Now go to your favorite browser, type in the following and hit enter.
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 ;)
"custom term paper.":http://custom-paper-writing.com/
Updated by Ray Charlesson over 15 years ago · 13 revisions