Installing Wt on Gentoo » History » Revision 4
Revision 3 (Koen Deforche, 05/27/2010 07:03 AM) → Revision 4/48 (Koen Deforche, 10/21/2010 10:38 AM)
h1. Installing Wt on Gentoo {{toc}} See also http://bugs.gentoo.org/show_bug.cgi?id=259686 h3. Dependencies To install the dependencies for the library (updated for Wt 2.1.0 release), with support for threading (recommended): Wt 2.1.0 does not compile with gcc version 3.4.6 and below. I recommend using gcc 4.1 and above. <pre> # USE="threads" emerge cmake boost </pre> Note: Newer Version of boost do not require the threads USE flag. h4. With support for wthttpd deployment When using the built-in httpd, you need: <pre> # emerge asio </pre> For some of the examples, you optionally also need: <pre> # emerge gd mysql++ </pre> h4. With support for FastCGI deployment When using the FastCGI connector, inside an Apache environment, in addition you need: <pre> # emerge fcgi apache mod_fastcgi </pre> h3. Build and install of Wt To build the library, and install within /usr/local <pre> $ cd wt-x.xx $ mkdir build $ cd build $ cmake ../ $ make $ make -C examples # make install </pre> *Note:* You can pass options to cmake via -DOPTION=value, e.g. if you want to build with fcgi support and without httpd support and apache user and group www <pre> $ cmake -DCONNECTOR_FCGI=ON -DCONNECTOR_HTTP=OFF -DWEBUSER=www -DWEBGROUP=www ../ </pre> h3. Trying the examples h4. Deployment with wthttpd Simply follow the instructions in the INSTALL file (with X the name of an example): <pre> $ cd ../examples/X # source directory for example X $ ../../build/examples/X/X.wt --docroot . --http-address 0.0.0.0 --http-port 8080 </pre> h4. Deployment with FastCGI Modify /etc/init.d/apache2 to enable fastcgi: <pre> APACHE2_OPTS="... -D FASTCGI" </pre> Enable ExecCGI for the location where you wish to install the examples: <pre> <Location /wt-examples> <pre> Options ExecCGI Allow from All </pre> </Location> </pre> To install a particular example: <pre> # cd build/examples/composer # ./deploy.sh </pre> And list the path in /etc/apache2/modules.d/20_mod_fastcgi.conf: <pre> FastCgiServer /var/www/localhost/htdocs/wt-examples/composer/composer.wt -idle-timeout 120 -processes 1 </pre> Finally, restart your apache, and check your log files for problems ! <pre> /etc/init.d/apache2 restart </pre>