Installing Wt on CentOS5 » History » Revision 4
« Previous |
Revision 4/18
(diff)
| Next »
Pieter Libin, 10/29/2009 12:19 PM
{{toc}} => left aligned toc
The purpose of this page is to provide information on how to install Wt on CentOS5.2. As a special note, I am installing to a XEN domU instance, however I believe any CentOS5.2 install will work the same. I was logged in as root through the duration of this install. This document was originally adapted from Installing Wt on Fedora Core.
h1. Install Wt dependencies
h2. Required dependencies
It was not my preference to install from source, however my yum setup did not recognize some of the packages.
h3. Boost
Boost is installed by hand so we can build the multi-threaded libraries. If you use 'yum install boost boost-devel' you will run into problems running some of the examples. So I recommend installing it by hand.
wget http://internap.dl.sourceforge.net/sourceforge/boost/boost_1_37_0.tar.gz
tar zxvf boost_1_37_0.tar.gz
cd boost_1_37_0/
./configure --with-libraries=thread,regex,program_options,date_time,signals,system,filesystem
make install
h3. CMAKE
Install cmake from source
wget http://www.cmake.org/files/v2.6/cmake-2.6.2.tar.gz
tar zxvf cmake-2.6.2.tar.gz
cd cmake-2.6.2
./bootstrap; make; make install
h1. Building Wt
wget http://internap.dl.sourceforge.net/sourceforge/witty/wt-2.2.2.tar.gz
tar zxvf wt-2.2.2.tar.gz
cd wt-2.2.2
mkdir build
cd build
make sure you substitute your version of boost and gcc into this statement¶
cmake -DBOOST_DIR=/usr/local -DBOOST_VERSION=1_37 -DBOOST_COMPILER=gcc41 ..
make
make -C examples
make install
Wt will configure itself to use the build-in http server by default.
h1. Running the Examples provided
This section covers how to run the hello example. Other examples may be run in a similar manner. Some examples may require additional dependencies to be setup.
h2. Running Hello
cd ../examples/hello
../../build/examples/hello/hello.wt --docroot . --http-address 0.0.0.0 --http-port 8080
Type the following url into your web browser, substitute vm01 with localhost or the appropriate url.
*That's it. The rest of this document is provided for additional support. None of the steps below are required for basic Wt functionality
h1. Optional dependencies
Some examples require additional dependencies to run properly.
h2. Installing GD
yum install gd gd-devel
h2. Installing MySQL++
There has got to be a better way! This does seem to work though. I chose a source rpm so it would be built for x86_64 platform, your architecture may be named differently.
Install mysql development libraries
yum install mysql-devel
Build a binary rpm from source so it is specific for my platform
rpmbuild --rebuild http://tangentsoft.net/mysql++/releases/mysql++-3.0.8-1.src.rpm
Install the rpms. Note you may have to substitute x86_64 for your platform
cd /usr/src/redhat/RPMS/x86_64
rpm -i mysql++-3.0.8-1.x86_64.rpm
rpm -i mysql++-debuginfo-3.0.8-1.x86_64.rpm
rpm -i mysql++-devel-3.0.8-1.x86_64.rpm
rpm -i mysql++-manuals-3.0.8-1.x86_64.rpm
h1. Deployment with FastCGI
See Deployment with FastCGI in page Installing Wt on Gentoo
h1. Other Wt Examples
h2. Hangman
Hangman is a bit more difficult to run.
Install the Mysql++ dependency
Fix 'Result' compile error in hangman/HangmanDb.C
MySql++ type Result was renamed to StoreQueryResult.
Replace all instances of 'Result' with 'StoreQueryResult'Rebuild Wt examples
Make sure MySQL is running
service mysqld startCreate the default hangman schema
mysql < dbscriptRun hangman
cd ../examples/hangman
../../build/examples/hangman/hangman.wt --docroot . --http-address 0.0.0.0 --http-port 8080
h2. Filetreetable
cd ../examples/filetreetable
../../build/examples/filetreetable/filetreetable.wt --docroot . --http-address 0.0.0.0 --http-port 8080
h1. Trouble shooting
h2. Opening up port 8080
This is not requirement if you are view the examples from localhost.
If you get an error message like:
Failed to Connect
Firefox can't establish a connection to the server at vm01:8080.
Though the site seems valid, the browser was unable to establish a connection.
This message may mean you need to open up port 8080. If you wish to access port 8080 remotely then add the following rule to file /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
Restart iptables for the change to take effect.
/etc/init.d/iptables restart
Updated by Pieter Libin about 15 years ago · 4 revisions