Installing Wt on Debian » History » Revision 5
Revision 4 (Betty Taylor, 05/21/2010 06:00 PM) → Revision 5/13 (Koen Deforche, 05/27/2010 07:04 AM)
h1. Installing Wt on Debian {{toc}} 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: <pre> # deb http://download.opensuse.org/repositories/home:/pgquiles:/Wt/Debian_5.0 ./ </pre> 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 <pre> su - </pre> or <pre> sudo bash </pre> *# Using following sources.list (FOR UBUNTU WHEN I TRIED IT ON THE SERVER):* <pre> ## 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 </pre> *# Using sources.list (FOR DEBIAN SARGE CURRENTLY INSTALLED ON THE BOX):* <pre> 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 </pre> *OPTIONAL SECTION - START* This is in case you are getting the following errors: <pre> 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"). </pre> If you get that error do: <pre> dpkg-reconfigure locales </pre> *OPTIONAL SECTION - END* Now install all apache, locales, and other stuff (most of which is required for "essay companies":http://essaywritingservices.org/writing-service.php wt) <pre> 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 </pre> Now install CVS and download the latest copy of wt (witty) -- press enter when asked for login/pass <pre> 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 </pre> Get libxerces <pre> apt-get install libxerces27-dev </pre> ON TO THE INSTALL <pre> cd /usr/local/src/wt/build/ cmake -D DEPLOYROOT=/var/www/wt -D WEBUSER=www-data -D WEBGROUP=www-data ../ </pre> Note: if you are interested in building the examples to run with fcgi (rather than wthttpd), add to the line above: <pre> -D EXAMPLES_CONNECTOR=wtfcgi </pre> If no errors were encountered, continue <pre> -- 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 </pre> If using ccmake 2.2 <pre> for i in `find . -name "build.make"`; do echo ".SUFFIXES:" >> $i; done </pre> Else continue the install <pre> make && make install </pre> Now config fcgid <pre> nano /etc/apache2/conf.d/fcgid.conf </pre> Put the following there <pre> <IfModule mod_fcgid.c> AddHandler fcgid-script .fcg SocketPath /var/lib/apache2/fcgid/sock IdleTimeout -1 ProcessLifeTime -1 MaxProcessCount 1 DefaultMaxClassProcessCount 1 DefaultMinClassProcessCount 1 </IfModule> </pre> and then do this command: <pre> chown www-data:www-data /usr/wt/run -R </pre> Next I setup my apache2 (ver 2.2): Go to the wt config file in apache <pre> nano /etc/apache2/sites-available/wt </pre> In it, replace whatever is there with the following: <pre> <Directory /var/www/wt/> #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 </Directory> </pre> Next I enable the site & reload apache: <pre> a2ensite wt /etc/init.d/apache2 reload </pre> 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: <pre> a2enmod fcgid </pre> You should get the following output after running the above command: <pre> This module is already enabled! </pre> *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 <pre> cd /usr/local/src/wt/build/examples make </pre> 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 "custom essay writing":http://custom-paper-writing.com/ time-tested "Hello World!" example (it doesn't require anything like mysql, unlike the other examples). <pre> cd /usr/local/src/wt/build/examples/hello ./deploy.sh </pre> Now go to your favorite browser, type in the following and hit enter. <pre> http://your.server.ip/wt/hello/hello.fcg </pre> 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 ;)