Saturday, February 5, 2011

How to install fb2pdf

Recently I installed fb2pdf on ubuntu maverick amd64. As there is no installation instructions anywhere, I decided to write down my notes I took during the installation:
cd /var/www
svn checkout FB2PDF
mkdir /var/www/fb2pdf-read-only/logs
chown -R www-data: /var/www/fb2pdf-read-only/logs
# Edit etc/apache.conf, register with /etc/apache2/sites-enabled
apt-get install libapache2-mod-php5
a2enmod rewrite
apt-get install texlive-latex-extra texlive-humanities python-boto \
python-pytils python-imaging libapache2-mod-php5 python2.4

apt-get install php-pear php5-dev
pear update-channels
pear install Crypt_HMAC
pear install HTTP_Request

# Mysql server
apt-get install mysql-server php5-mysql
cd /var/www/fb2pdf-read-only/src/sql
mysqladmin create fb2pdf -p
cat create_db.sql | mysql fb2pdf -p
cat create_tables.sql | mysql fb2pdf -p
cat bootstrap.sql | mysql fb2pdf -p
GRANT ALL ON fb2pdf.* to fb2pdf@"localhost" IDENTIFIED BY "THE_PWD";

cd /var/www/fb2pdf-read-only/www
cp awscfg.php.template awscfg.php

cd /usr/share/doc/texlive-lang-cyrillic/generic/t2/etc/utf-8/
cp utf-8.def /etc/texmf/tex/latex/pict2e/
gzip -dc utfcyr.def.gz > /etc/texmf/tex/latex/pict2e/utfcyr.def
gzip -dc utflat.def.gz > /etc/texmf/tex/latex/pict2e/utflat.def