Difference between revisions of "RBE10K/Libreplan/Installation"
From The Crowdsourced Resource-Based Economy Knowledgebase
(Created page with "The installation instructions for Libreplan on Gentoo/Tomcat-7 are the following, based on the instructions found here: http://ask.libreplan.org/questions/564/install-on-gento...") |
m (→Create the database) |
||
(6 intermediate revisions by one user not shown) | |||
Line 3: | Line 3: | ||
== Install dependencies == | == Install dependencies == | ||
<code> | <code> | ||
− | emerge -a commons-dbcp commons-pool tomcat jdbc-postgresql postgresql-server | + | echo "x11-base/xorg-server xvfb" >> /etc/portage/package.use |
+ | emerge -a virtual/jdk commons-dbcp commons-pool tomcat jdbc-postgresql postgresql-server cutycapt | ||
</code> | </code> | ||
== Create Tomcat instance == | == Create Tomcat instance == | ||
<code> | <code> | ||
− | /usr/share/tomcat-7/gentoo/tomcat-instance-manager.bash --create | + | /usr/share/tomcat-7/gentoo/tomcat-instance-manager.bash --create |
</code> | </code> | ||
Line 15: | Line 16: | ||
== Add necessary jars == | == Add necessary jars == | ||
<code> | <code> | ||
− | ln -s /usr/share/jdbc-postgresql/lib/jdbc-postgresql.jar /usr/share/tomcat-7/lib/ | + | ln -s /usr/share/jdbc-postgresql/lib/jdbc-postgresql.jar /usr/share/tomcat-7/lib/ |
− | ln -s /usr/share/commons-dbcp/lib/commons-dbcp.jar /usr/share/tomcat-7/lib/ | + | ln -s /usr/share/commons-dbcp/lib/commons-dbcp.jar /usr/share/tomcat-7/lib/ |
− | ln -s /usr/share/commons-pool/lib/commons-pool.jar /usr/share/tomcat-7/lib/ | + | ln -s /usr/share/commons-pool/lib/commons-pool.jar /usr/share/tomcat-7/lib/ |
</code> | </code> | ||
== Create the database == | == Create the database == | ||
<code> | <code> | ||
− | su postgres -c psql | + | su postgres -c psql |
− | CREATE DATABASE libreplan; | + | CREATE DATABASE libreplan; |
− | CREATE USER libreplan WITH PASSWORD 'libreplan'; | + | CREATE USER libreplan WITH PASSWORD 'libreplan'; |
− | GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan; | + | GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan; |
+ | \q | ||
</code> | </code> | ||
Line 33: | Line 35: | ||
== Install the database == | == Install the database == | ||
<code> | <code> | ||
− | psql -h localhost -U libreplan -W libreplan < install.sql | + | psql -h localhost -U libreplan -W libreplan < install.sql |
</code> | </code> | ||
− | == Install the web application == | + | == Install the web application as ROOT == |
<code> | <code> | ||
− | cp libreplan.war /var/lib/tomcat-7/webapps/ | + | mv /var/lib/tomcat-7/webapps/ROOT /var/lib/tomcat-7/original-webapps-ROOT |
+ | cp libreplan.war /var/lib/tomcat-7/webapps/ROOT.war | ||
</code> | </code> | ||
== Configure Libreplan == | == Configure Libreplan == | ||
− | + | Create a file '''/etc/tomcat-7-libreplan/Catalina/localhost/ROOT.xml''' with the following contents: | |
<code> | <code> | ||
− | <?xml version="1.0" encoding="UTF-8"?> | + | <?xml version="1.0" encoding="UTF-8"?> |
− | + | ||
− | <Context antiJARLocking="true" path=""> | + | <Context antiJARLocking="true" path=""> |
<Resource name="jdbc/libreplan-ds" auth="Container" | <Resource name="jdbc/libreplan-ds" auth="Container" | ||
type="javax.sql.DataSource" | type="javax.sql.DataSource" | ||
Line 55: | Line 58: | ||
driverClassName="org.postgresql.Driver" | driverClassName="org.postgresql.Driver" | ||
url="jdbc:postgresql://localhost/libreplan" /> | url="jdbc:postgresql://localhost/libreplan" /> | ||
− | </Context> | + | </Context> |
− | </code> | + | </code> |
'''''NOTE THE LINE THAT HAS TO BE PRESENT''''': ''factory="org.apache.commons.dbcp.BasicDataSourceFactory"'' | '''''NOTE THE LINE THAT HAS TO BE PRESENT''''': ''factory="org.apache.commons.dbcp.BasicDataSourceFactory"'' | ||
Line 62: | Line 65: | ||
== Start the application == | == Start the application == | ||
<code> | <code> | ||
− | /etc/init.d/tomcat-7 start | + | /etc/init.d/tomcat-7 start |
+ | rc-update add tomcat-7 default | ||
</code> | </code> |
Latest revision as of 20:29, 18 May 2013
The installation instructions for Libreplan on Gentoo/Tomcat-7 are the following, based on the instructions found here: http://ask.libreplan.org/questions/564/install-on-gentoo-or-sabayon
Contents |
[edit] Install dependencies
echo "x11-base/xorg-server xvfb" >> /etc/portage/package.use emerge -a virtual/jdk commons-dbcp commons-pool tomcat jdbc-postgresql postgresql-server cutycapt
[edit] Create Tomcat instance
/usr/share/tomcat-7/gentoo/tomcat-instance-manager.bash --create
Optionally add --suffix libreplan at the end of the previous statement to create an independent Tomcat-7 installation specific for use with Libreplan. In that case replace any following /var/lib/tomcat-7 with /var/lib/tomcat-7-libreplan.
[edit] Add necessary jars
ln -s /usr/share/jdbc-postgresql/lib/jdbc-postgresql.jar /usr/share/tomcat-7/lib/ ln -s /usr/share/commons-dbcp/lib/commons-dbcp.jar /usr/share/tomcat-7/lib/ ln -s /usr/share/commons-pool/lib/commons-pool.jar /usr/share/tomcat-7/lib/
[edit] Create the database
su postgres -c psql CREATE DATABASE libreplan; CREATE USER libreplan WITH PASSWORD 'libreplan'; GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan; \q
[edit] Fetch Libreplan files from its website
Now download the latest libreplan.war and install.sql and rename them to libreplan.war and install.sql.
[edit] Install the database
psql -h localhost -U libreplan -W libreplan < install.sql
[edit] Install the web application as ROOT
mv /var/lib/tomcat-7/webapps/ROOT /var/lib/tomcat-7/original-webapps-ROOT cp libreplan.war /var/lib/tomcat-7/webapps/ROOT.war
[edit] Configure Libreplan
Create a file /etc/tomcat-7-libreplan/Catalina/localhost/ROOT.xml with the following contents:
<?xml version="1.0" encoding="UTF-8"?> <Context antiJARLocking="true" path=""> <Resource name="jdbc/libreplan-ds" auth="Container" type="javax.sql.DataSource" factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="100" maxIdle="30" maxWait="10000" username="libreplan" password="libreplan" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost/libreplan" /> </Context>
NOTE THE LINE THAT HAS TO BE PRESENT: factory="org.apache.commons.dbcp.BasicDataSourceFactory"
[edit] Start the application
/etc/init.d/tomcat-7 start rc-update add tomcat-7 default