2011-06-15 11:53:12 +02:00
Install
=======
2009-06-25 19:31:05 +02:00
2011-10-28 08:17:54 +02:00
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
2011-06-16 08:21:57 +02:00
know how to compile it manually see `` HACKING `` file.
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
.. contents ::
2009-06-25 19:31:05 +02:00
2011-10-28 08:17:54 +02:00
LibrePlan automatic installation
2011-06-15 11:53:12 +02:00
--------------------------------
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
Ubuntu PPAs
~~~~~~~~~~~
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
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
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
Instructions::
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
$ sudo add-apt-repository ppa:libreplan/ppa
$ sudo apt-get update
2011-10-28 08:17:54 +02:00
$ sudo apt-get install libreplan
2009-06-25 19:31:05 +02:00
2012-03-27 11:20:15 +02:00
.. TIP ::
If you do not have `` add-apt-repository `` command, you will need to install
`` python-software-properties `` package before running the previous commands.
You can do it with the following line::
sudo apt-get install python-software-properties
2012-03-30 14:57:43 +02:00
.. WARNING ::
2012-03-30 15:01:56 +02:00
If you have memory problems review the section `Fix memory errors`_ .
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
Debian packages
~~~~~~~~~~~~~~~
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
There are Debian packages for Squeeze (i386 and amd64), you can download them
2011-12-22 22:05:02 +01:00
from: http://sourceforge.net/projects/libreplan/files/LibrePlan/
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
Instructions:
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
* Download the package::
2009-06-25 19:31:05 +02:00
2012-07-26 15:52:59 +02:00
$ wget http://downloads.sourceforge.net/project/libreplan/LibrePlan/libreplan_1.3.0-1_amd64.deb
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
* Install package::
2009-06-25 19:31:05 +02:00
2012-07-26 15:52:59 +02:00
# dpkg -i libreplan_1.3.0-1_amd64.deb
2010-12-15 10:31:42 +01:00
2011-06-15 11:53:12 +02:00
* Install dependencies::
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
# apt-get install -f
2009-06-25 19:31:05 +02:00
2011-12-15 12:29:02 +01:00
.. WARNING ::
2012-03-30 14:57:43 +02:00
If you have problems with printing support review the section `Fix
2011-12-15 12:29:02 +01:00
printing in Debian Squeeze`_.
2012-03-30 14:57:43 +02:00
.. WARNING ::
2012-03-30 15:01:56 +02:00
If you have memory problems review the section `Fix memory errors`_ .
2012-03-30 14:57:43 +02:00
2012-11-29 12:32:33 +01:00
Fedora, CentOS and openSUSE OBS (openSUSE Build Service)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2012-03-30 14:57:43 +02:00
Instructions depending on the distribution:
2012-11-29 12:32:33 +01:00
* Fedora 17::
# cd /etc/yum.repos.d
# wget download.opensuse.org/repositories/home:/jsuarezr:/LibrePlan/Fedora_17/home:jsuarezr:LibrePlan.repo
# yum install libreplan
Follow the instructions in /usr/share/doc/libreplan-1.3.0/README.Fedora afterwards.
2012-03-30 14:57:43 +02:00
* Fedora 16::
# cd /etc/yum.repos.d
# wget download.opensuse.org/repositories/home:/jsuarezr:/LibrePlan/Fedora_16/home:jsuarezr:LibrePlan.repo
# yum install libreplan
2012-11-29 12:32:33 +01:00
Follow the instructions in /usr/share/doc/libreplan-1.3.0/README.Fedora afterwards.
* CentOS 6::
2012-03-30 14:57:43 +02:00
# cd /etc/yum.repos.d
2012-11-29 12:32:33 +01:00
# wget download.opensuse.org/repositories/home:/jsuarezr:/LibrePlan/CentOS_CentOS-6/home:jsuarezr:LibrePlan.repo
2012-03-30 14:57:43 +02:00
# yum install libreplan
2012-11-29 12:32:33 +01:00
* openSUSE Factory::
# cd /etc/zypp/repos.d
# wget download.opensuse.org/repositories/home:/jsuarezr:/LibrePlan/openSUSE_Factory/home:jsuarezr:LibrePlan.repo
# zypper ref
# zypper install libreplan
2012-03-30 14:57:43 +02:00
* openSUSE 12.1::
# cd /etc/zypp/repos.d
# wget download.opensuse.org/repositories/home:/jsuarezr:/LibrePlan/openSUSE_12.1/home:jsuarezr:LibrePlan.repo
# zypper ref
# zypper install libreplan
* openSUSE 11.4::
# cd /etc/zypp/repos.d
# wget download.opensuse.org/repositories/home:/jsuarezr:/LibrePlan/openSUSE_11.4/home:jsuarezr:LibrePlan.repo
# zypper ref
# zypper install libreplan
.. WARNING ::
2012-03-30 15:01:56 +02:00
If you have memory problems review the section `Fix memory errors`_ .
2012-03-30 14:57:43 +02:00
2015-10-06 18:00:43 +03:00
Microsoft Windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2012-03-30 14:57:43 +02:00
RPM Packages
~~~~~~~~~~~~
There are several LibrePlan RPM packages available in the following URL:
http://download.opensuse.org/repositories/home:/jsuarezr:/LibrePlan/
2012-11-29 12:32:33 +01:00
Follow the instructions in the corresponding README file to finish the installation.
2012-03-30 14:57:43 +02:00
.. WARNING ::
2012-03-30 15:01:56 +02:00
If you have memory problems review the section `Fix memory errors`_ .
2012-03-30 14:57:43 +02:00
2009-06-25 19:31:05 +02:00
2011-10-28 08:17:54 +02:00
LibrePlan manual installation
2011-06-15 11:53:12 +02:00
-----------------------------
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
Debian/Ubuntu
~~~~~~~~~~~~~
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
* Install requirements::
2009-06-25 19:31:05 +02:00
2012-09-12 11:49:33 +02:00
# apt-get install openjdk-6-jre postgresql postgresql-client tomcat6 libpg-java cutycapt xvfb
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
* Connect to database::
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
# su postgres -c psql
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
* Use SQL sentences to create database::
2009-06-25 19:31:05 +02:00
2011-10-28 08:17:54 +02:00
CREATE DATABASE libreplan;
CREATE USER libreplan WITH PASSWORD 'libreplan';
GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan;
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
* Download database installation script::
2009-06-25 19:31:05 +02:00
2012-07-26 15:52:59 +02:00
$ wget -O install.sql http://downloads.sourceforge.net/project/libreplan/LibrePlan/install_1.3.0.sql
2009-06-25 19:31:05 +02:00
2011-06-15 11:53:12 +02:00
* Create database structure::
2010-01-07 10:16:29 +01:00
2011-10-28 08:17:54 +02:00
$ psql -h localhost -U libreplan -W libreplan < install.sql
2010-12-15 10:31:42 +01:00
2011-12-23 13:59:11 +01:00
.. WARNING ::
It is very important to execute the previous command specifiying
`` libreplan `` user (as you can see in the `` -U `` option). Otherwise your
LibrePlan installation is not going to start properly and you could find in
your log files something like that::
JDBCExceptionReporter - ERROR: permission denied for relation entity_sequence
2011-06-15 11:53:12 +02:00
* Download `` .war `` file from SourceForge.net::
2010-01-07 10:16:29 +01:00
2012-07-26 15:52:59 +02:00
$ wget -O libreplan.war http://downloads.sourceforge.net/project/libreplan/LibrePlan/libreplan_1.3.0.war
2010-12-15 10:31:42 +01:00
2011-10-28 08:17:54 +02:00
* Create a new file `` /etc/tomcat6/Catalina/localhost/libreplan.xml `` (file
2011-06-15 11:53:12 +02:00
name has to match with `` .war `` name) with database configuration for
Tomcat 6::
2010-01-07 10:16:29 +01:00
2011-06-15 11:53:12 +02:00
<?xml version="1.0" encoding="UTF-8"?>
2010-01-07 10:16:29 +01:00
2011-06-15 11:53:12 +02:00
<Context antiJARLocking="true" path="">
2011-10-28 08:17:54 +02:00
<Resource name="jdbc/libreplan-ds" auth="Container"
2011-06-15 11:53:12 +02:00
type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
2011-10-28 08:17:54 +02:00
username="libreplan" password="libreplan"
2011-06-15 11:53:12 +02:00
driverClassName="org.postgresql.Driver"
2011-10-28 08:17:54 +02:00
url="jdbc:postgresql://localhost/libreplan" />
2011-06-15 11:53:12 +02:00
</Context>
2010-01-07 10:16:29 +01:00
2011-10-28 08:17:54 +02:00
* Add a new Tomcat 6 policy file `` /etc/tomcat6/policy.d/51libreplan.policy ``
2011-06-15 11:53:12 +02:00
with the following content::
2010-01-12 13:43:40 +01:00
2011-10-28 08:17:54 +02:00
grant codeBase "file:/var/lib/tomcat6/webapps/libreplan/-" {
2011-06-15 11:53:12 +02:00
permission java.security.AllPermission;
};
2011-10-28 08:17:54 +02:00
grant codeBase "file:/var/lib/tomcat6/webapps/libreplan.war" {
2011-06-15 11:53:12 +02:00
permission java.security.AllPermission;
};
2010-01-12 13:43:40 +01:00
2011-06-15 11:53:12 +02:00
* Add next lines to Tomcat 6 policy file
`` /etc/tomcat6/policy.d/03catalina.policy `` file::
2010-12-15 10:31:42 +01:00
2011-06-15 11:53:12 +02:00
grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
...
2011-10-28 08:17:54 +02:00
// 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
2011-06-15 11:53:12 +02:00
...
};
2010-01-12 13:43:40 +01:00
2011-06-15 11:53:12 +02:00
* Add link to Java JDBC driver for PostgreSQL in Tomcat6 libraries directory::
2010-01-12 13:43:40 +01:00
2011-06-15 11:53:12 +02:00
# ln -s /usr/share/java/postgresql-jdbc3.jar /usr/share/tomcat6/lib/
* Copy war to Tomcat 6 web applications directory::
2011-10-28 08:17:54 +02:00
# cp libreplan.war /var/lib/tomcat6/webapps/
2011-06-15 11:53:12 +02:00
* Restart Tomcat 6::
# /etc/init.d/tomcat6 restart
2011-10-28 08:17:54 +02:00
* Go to http://localhost:8080/libreplan/
2011-06-15 11:53:12 +02:00
2011-12-15 12:29:02 +01:00
.. WARNING ::
If you have problems with printing support review the last section `Fix
printing in Debian Squeeze`_.
2011-06-15 11:53:12 +02:00
openSUSE
~~~~~~~~
* Install requirements::
2012-09-12 11:49:33 +02:00
# zypper install java-1_6_0-openjdk postgresql-server postgresql tomcat6 xorg-x11-server
2011-06-15 11:53:12 +02:00
2011-06-15 19:30:57 +02:00
* JDBC Driver manual installation::
2011-06-15 11:53:12 +02:00
# 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
2011-06-15 19:30:57 +02:00
* SQL sentences to create database::
2011-06-15 11:53:12 +02:00
2011-10-28 08:17:54 +02:00
CREATE DATABASE libreplan;
CREATE USER libreplan WITH PASSWORD 'libreplan';
GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan;
2011-06-15 11:53:12 +02:00
* 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::
2012-07-26 15:52:59 +02:00
$ wget -O install.sql http://downloads.sourceforge.net/project/libreplan/LibrePlan/install_1.3.0.sql
2011-06-15 11:53:12 +02:00
* Create database structure::
2011-10-28 08:17:54 +02:00
$ psql -h localhost -U libreplan -W libreplan < install.sql
2011-06-15 11:53:12 +02:00
2011-12-23 13:59:11 +01:00
.. WARNING ::
It is very important to execute the previous command specifiying
`` libreplan `` user (as you can see in the `` -U `` option). Otherwise your
LibrePlan installation is not going to start properly and you could find in
your log files something like that::
JDBCExceptionReporter - ERROR: permission denied for relation entity_sequence
2011-06-15 11:53:12 +02:00
* Download `` .war `` file from SourceForge.net::
2012-07-26 15:52:59 +02:00
$ wget -O libreplan.war http://downloads.sourceforge.net/project/libreplan/LibrePlan/libreplan_1.3.0.war
2011-06-15 11:53:12 +02:00
2011-10-28 08:17:54 +02:00
* Create a new file `` /etc/tomcat6/Catalina/localhost/libreplan.xml `` (file
2011-06-15 11:53:12 +02:00
name has to match with `` .war `` name) with database configuration for
Tomcat 6::
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="">
2011-10-28 08:17:54 +02:00
<Resource name="jdbc/libreplan-ds" auth="Container"
2011-06-15 11:53:12 +02:00
type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
2011-10-28 08:17:54 +02:00
username="libreplan" password="libreplan"
2011-06-15 11:53:12 +02:00
driverClassName="org.postgresql.Driver"
2011-10-28 08:17:54 +02:00
url="jdbc:postgresql://localhost/libreplan" />
2011-06-15 11:53:12 +02:00
</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::
2011-10-28 08:17:54 +02:00
# cp libreplan.war /srv/tomcat6/webapps/
2011-06-15 11:53:12 +02:00
* Restart Tomcat 6::
# /etc/init.d/tomcat6 restart
2011-10-28 08:17:54 +02:00
* Go to http://localhost:8080/libreplan/
2010-12-15 10:31:42 +01:00
2015-10-06 18:00:43 +03:00
Microsoft Windows
~~~~~~~~~~~
Instructions:
* Download and install latest Java Runtime Environment 7u79 (JRE7u79)::
# http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
* Download and install latest PostgreSQL database::
# http://www.enterprisedb.com/products-services-training/pgdownload#windows
* Download and install Apache Tomcat 6::
# http://tomcat.apache.org/download-60.cgi
.. NOTE ::
In JDK folder there is JRE folder
* Set up JDBC41 PostgreSQL Driver::
# Download latest driver: https://jdbc.postgresql.org/download.html
# Copy downloaded *.jar file to JRE location: (e.g. C:\Program Files\Java\jre7\lib\ext)
* Download latest `` .war `` file from SourceForge.net (for PostgreSQL) and rename it to libreplan.war::
# http://sourceforge.net/projects/libreplan/files/LibrePlan/
* Create database::
CREATE DATABASE libreplan;
* Use SQL sentences::
CREATE USER libreplan WITH PASSWORD 'libreplan';
GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan;
REVOKE ALL
ON ALL TABLES IN SCHEMA public
FROM PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE
ON ALL TABLES IN SCHEMA public
TO libreplan;
* Restore PostgreSQL dump - scripts/database/postgresql_1.4.1.backup::
* Create an Environment Variable JRE_HOME
# You need to set it to your JRE installed directory
* Configure Apache Tomcat Server
# Put libreplan.war file to Apache Tomcat webapps folder (e.g. C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\)
# Go to localhost folder (e.g. C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost\) and create there libreplan.xml file with this lines of code:
<?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>
* Start Apache Tomcat server
# Example location: C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\Tomcat6.exe
* Go to http://localhost:8080/libreplan
2010-01-12 13:43:40 +01:00
2011-06-15 11:53:12 +02:00
Logs
----
2010-01-12 13:43:40 +01:00
2011-10-28 08:17:54 +02:00
Since *LibrePlan 1.1.1* log system is configured automatically creating a new
2011-06-15 11:53:12 +02:00
folder under `` /var/log/tomcat6/ `` with `` .war `` name. For example:
2011-12-01 16:22:34 +01:00
`` /var/log/tomcat6/libreplan/ `` .
2010-01-12 13:43:40 +01:00
2011-10-28 08:17:54 +02:00
Inside this new directory there will be two files (`` libreplan.log `` and
`` libreplan-error.log `` ) that will be rotated every day.
2011-12-14 18:25:30 +01:00
2012-11-16 09:51:34 +01:00
Configure log directory
~~~~~~~~~~~~~~~~~~~~~~~
Anyway if you want to set manually LibrePlan log path you will have to
configure `` JAVA_OPTS `` variable in your server. This variable is configured in
different files depending on the distribution:
* Debian or Ubuntu: `` /etc/default/tomcat6 ``
* Fedora or openSUSE: `` /etc/tomcat6/tomcat6.conf ``
Where you will need to add the next line::
# Configure LibrePlan log directory
JAVA_OPTS="${JAVA_OPTS} -Dlibreplan-log-directory=/my/path/to/libreplan/log/"
.. WARNING ::
You have to be sure that the user running Tomcat (usually `` tomcat6 `` ) has
permissions to write in the specified directory.
2011-12-14 18:25:30 +01:00
2011-12-15 12:29:02 +01:00
Fix printing in Debian Squeeze
------------------------------
Since LibrePlan 1.2 printing support is not working properly in Debian Squeeze.
To fix this issue, basically, you have to get a newer version of CutyCapt and
WebKit dependencies from Debian testing.
Instructions:
2011-12-14 18:25:30 +01:00
2011-12-15 12:29:02 +01:00
* Make sure stable remains the default distribution to pull packages from::
2011-12-14 18:25:30 +01:00
2011-12-15 12:29:02 +01:00
# echo 'APT::Default-Release "stable";' >> /etc/apt/apt.conf
2011-12-14 18:25:30 +01:00
2011-12-15 12:29:02 +01:00
* Add a new repository to make testing packages available to `` apt-get `` ::
2011-12-14 18:25:30 +01:00
2011-12-15 12:29:02 +01:00
# echo "deb http://ftp.debian.org/debian testing main" >> /etc/apt/sources.list
2011-12-14 18:25:30 +01:00
2011-12-15 12:29:02 +01:00
* Refresh package index::
2011-12-14 18:25:30 +01:00
2011-12-15 12:29:02 +01:00
# apt-get update
2011-12-14 18:25:30 +01:00
2011-12-15 12:29:02 +01:00
* Fetch and install `` cutycapt `` (and its dependencies) from testing::
2011-12-14 18:25:30 +01:00
2011-12-15 12:29:02 +01:00
# apt-get -t testing install cutycapt
2012-03-30 13:44:22 +02:00
Fix memory errors
-----------------
With the default parameters of Tomcat in the different distributions you could
have problems with Java memory.
After a while using LibrePlan you could see that some windows do not work and
the log shows a `` java.lang.OutOfMemoryError `` exception.
This exception could be caused because of two different issues:
* Heap space::
java.lang.OutOfMemoryError: Java heap space
* PermGemp space (Permanent Generation, reflective data for the JVM)::
java.lang.OutOfMemoryError: PermGen space
In order to avoid this problem you need to configure properly `` JAVA_OPTS ``
variable in your server. This is configured in different files depending on the
distribution:
* Debian or Ubuntu: `` /etc/default/tomcat6 ``
* Fedora or openSUSE: `` /etc/tomcat6/tomcat6.conf ``
The next lines show a possible configuration to fix the memory errors (the exact
values depends on the server features)::
JAVA_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m"
JAVA_OPTS="${JAVA_OPTS} -server -Djava.awt.headless=true"
Where the different parameters have the following meaning:
* `` -Xms `` : Initial size of the Java heap
* `` -Xmx `` : Maximum size of the Java heap
* `` -XX:PermSize `` : Initial size of PermGen
* `` -XX:MaxPermSize `` : Maximum size of PermGen
.. NOTE ::
Take into account that size of PermGen is additional to heap size.