TASKPM/INSTALL

245 lines
6.8 KiB
Text
Raw Normal View History

Install
=======
This is a guide about how to install *LibrePlan* project in your system. If you
want to upgrade your *LibrePlan* version see ``UPDATE`` file. If you want to
know how to compile it manually see ``HACKING`` file.
.. contents::
LibrePlan automatic installation
--------------------------------
Ubuntu PPAs
~~~~~~~~~~~
There are Ubuntu PPAs for different versions (Lucid, Maverick and Natty), you
can find more info in the following URL:
https://launchpad.net/~libreplan/+archive/ppa
Instructions::
$ sudo add-apt-repository ppa:libreplan/ppa
$ sudo apt-get update
$ sudo apt-get install libreplan
Debian packages
~~~~~~~~~~~~~~~
There are Debian packages for Squeeze (i386 and amd64), you can download them
from: http://sourceforge.net/projects/navalplan/files/LibrePlan/
Instructions:
* Download the package::
$ wget http://downloads.sourceforge.net/project/navalplan/files/LibrePlan/libreplan_1.2.0-1_amd64.deb
* Install package::
# dpkg -i libreplan_1.2.0-1_amd64.deb
* Install dependencies::
# apt-get install -f
LibrePlan manual installation
-----------------------------
Debian/Ubuntu
~~~~~~~~~~~~~
* Install requirements::
# apt-get install openjdk-6-jre postgresql postgresql-client tomcat6 libpg-java ttf-freefont cutycapt xvfb
* Connect to database::
# su postgres -c psql
* Use SQL sentences to create database::
CREATE DATABASE libreplan;
CREATE USER libreplan WITH PASSWORD 'libreplan';
GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan;
* Download database installation script::
$ wget -O install.sql http://downloads.sourceforge.net/project/navalplan/LibrePlan/install_1.2.0.sql
* Create database structure::
$ psql -h localhost -U libreplan -W libreplan < install.sql
* Download ``.war`` file from SourceForge.net::
$ wget -O libreplan.war http://downloads.sourceforge.net/project/navalplan/LibrePlan/libreplan_1.2.0.war
* Create a new file ``/etc/tomcat6/Catalina/localhost/libreplan.xml`` (file
name has to match with ``.war`` name) with database configuration for
Tomcat 6::
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="">
<Resource name="jdbc/libreplan-ds" auth="Container"
type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="libreplan" password="libreplan"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost/libreplan" />
</Context>
* Add a new Tomcat 6 policy file ``/etc/tomcat6/policy.d/51libreplan.policy``
with the following content::
grant codeBase "file:/var/lib/tomcat6/webapps/libreplan/-" {
permission java.security.AllPermission;
};
grant codeBase "file:/var/lib/tomcat6/webapps/libreplan.war" {
permission java.security.AllPermission;
};
* Add next lines to Tomcat 6 policy file
``/etc/tomcat6/policy.d/03catalina.policy`` file::
grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
...
// begin:libreplan
permission java.io.FilePermission "${catalina.base}${file.separator}webapps${file.separator}libreplan${file.separator}WEB-INF${file.separator}classes${file.separator}logging.properties", "read";
// end:libreplan
...
};
* Add link to Java JDBC driver for PostgreSQL in Tomcat6 libraries directory::
# ln -s /usr/share/java/postgresql-jdbc3.jar /usr/share/tomcat6/lib/
* Copy war to Tomcat 6 web applications directory::
# cp libreplan.war /var/lib/tomcat6/webapps/
* Restart Tomcat 6::
# /etc/init.d/tomcat6 restart
* Go to http://localhost:8080/libreplan/
openSUSE
~~~~~~~~
* Install requirements::
# zypper install java-1_6_0-openjdk postgresql-server postgresql tomcat6 freefont xorg-x11-server
* JDBC Driver manual installation::
# cd /usr/share/java/
# wget http://jdbc.postgresql.org/download/postgresql-9.0-801.jdbc3.jar
# mv postgresql-9.0-801.jdbc3.jar postgresql-jdbc3.jar
* Follow instructions at ``HACKING`` file to compile and install CutyCapt
* Start database service::
# /etc/init.d/postgresql start
* Connect to database::
# su postgres -c psql
* SQL sentences to create database::
CREATE DATABASE libreplan;
CREATE USER libreplan WITH PASSWORD 'libreplan';
GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan;
* Set ``postgres`` user password::
ALTER USER postgres WITH PASSWORD 'postgres';
* Edit ``/var/lib/pgsql/data/pg_hba.conf`` and replace ``ident`` by ``md5``
* Restart database service::
# /etc/init.d/postgresql restart
* Download database installation script::
$ wget -O install.sql http://downloads.sourceforge.net/project/navalplan/LibrePlan/install_1.2.0.sql
* Create database structure::
$ psql -h localhost -U libreplan -W libreplan < install.sql
* Download ``.war`` file from SourceForge.net::
$ wget -O libreplan.war http://downloads.sourceforge.net/project/navalplan/LibrePlan/libreplan_1.2.0.war
* Create a new file ``/etc/tomcat6/Catalina/localhost/libreplan.xml`` (file
name has to match with ``.war`` name) with database configuration for
Tomcat 6::
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="">
<Resource name="jdbc/libreplan-ds" auth="Container"
type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="libreplan" password="libreplan"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost/libreplan" />
</Context>
* Add link to Java JDBC driver for PostgreSQL in Tomcat6 libraries directory::
# ln -s /usr/share/java/postgresql-jdbc3.jar /usr/share/tomcat6/lib/
* Copy war to Tomcat 6 web applications directory::
# cp libreplan.war /srv/tomcat6/webapps/
* Restart Tomcat 6::
# /etc/init.d/tomcat6 restart
* Go to http://localhost:8080/libreplan/
Logs
----
Since *LibrePlan 1.1.1* log system is configured automatically creating a new
folder under ``/var/log/tomcat6/`` with ``.war`` name. For example:
``/var/log/tomcat6/libreplan/``.
Inside this new directory there will be two files (``libreplan.log`` and
``libreplan-error.log``) that will be rotated every day.
What to do if printing support is not working in Debian Squeeze
---------------------------------------------------------------
Basically, you have to get a newer version of Cutycapt and Webkit dependencies
from testing. This is how to do it:
1) Gain root privileges
2) Make sure stable remains the default distribution to pull packages from:
echo 'APT::Default-Release "stable";' >> /etc/apt/apt.conf
3) Add a new repository to make testing packages available to apt-get:
echo "deb http://ftp.debian.org/debian testing main" >> /etc/apt/sources.list
3) Refresh package index:
apt-get update
4) Fetch and install cutycapt (and its dependencies) from testing:
apt-get -t testing install cutycapt