Fastcgipp

From campisano.org
Jump to navigation Jump to search

Vademecum

Environment

# cat /etc/debian_version 
6.0.4
# gcc -v
gcc version 4.4.5
Debian 4.4.5-8
# uname -r
3.1.0-1-amd64


Old stable version fastcgi++-1.2

Build and install

apt-get install libboost-dev libboost-thread-dev libboost-system-dev
mkdir /srv/local/fastcgipp
chown nobody:nogroup /srv/local/fastcgipp
su -s /bin/bash nobody
wget http://download.savannah.nongnu.org/releases/fastcgipp/fastcgi++-1.2.tar.bz2
tar -xjf fastcgi++-1.2.tar.bz2
cd fastcgi++-1.2
make
sed -i 's/install -o 0 -g 0 /install /g' Makefile
mkdir /srv/local/fastcgipp/lib
PREFIX=/srv/local/fastcgipp make install
exit


Test an example

The examples are in the source path:

apt-get install spawn-fcgi
su -s /bin/bash nobody
cp -a examples/src/ mytest
cd mytest/
g++ -g -I /srv/local/fastcgipp/include -L /srv/local/fastcgipp/lib -lfastcgipp -pthread -lboost_thread-mt -lboost_date_time-mt echo.cpp -o echo.fcgi
LD_LIBRARY_PATH=/srv/local/fastcgipp/lib spawn-fcgi -n -s /tmp/hello-fcgi-socket echo.fcgi
exit


New beta version fastcgi++-2.0

Build and install

apt-get install libboost-dev libboost-thread-dev libboost-system-dev libboost-iostreams-dev
mkdir /srv/local/fastcgipp
chown nobody:nogroup /srv/local/fastcgipp
su -s /bin/bash nobody
wget http://download.savannah.gnu.org/releases/fastcgipp/fastcgi++-2.0beta-f16ff2d2.tar.bz2
tar -xjf fastcgi++-2.0beta-f16ff2d2.tar.bz2
cd fastcgi++-2.0beta-f16ff2d2
./configure --prefix=/srv/local/fastcgipp
make
make install
exit


Test an example

The examples are in the source path:

apt-get install spawn-fcgi
su -s /bin/bash nobody
cp -a examples mytest
cd mytest/
g++ -g -I /srv/local/fastcgipp/include -L /srv/local/fastcgipp/lib -lfastcgipp -pthread -lboost_thread-mt -lboost_date_time-mt echo.cpp -o echo.fcgi
LD_LIBRARY_PATH=/srv/local/fastcgipp/lib spawn-fcgi -n -s /tmp/hello-fcgi-socket echo.fcgi
exit


References