Installing cmdbuild on Ubuntu 14.04 LTS

26 Aug 2014 . posts . Comments
#Programming #Systems Administration #Web

So the instructions on the Ubuntu wiki are good, but I found I had to make some slight changes in order to get it to work on the latest (at this time!) Ubuntu LTS version (14.04). I’m not too sure how secure the server is though… comments anyone? Here are the instructions I followed to get it to work

  • Install ubuntu on your platform (I’m using VirtualBox).
  • Start up the terminal app.
    • Screen Shot 2014-08-26 at 11.02.46 am
  • Install Apache Tomcat by running:
sudo apt-get update
sudo apt-get install tomcat6 tomcat6-docs tomcat6-admin
```"tomcat6-docs" is optional.

*   Edit the tomcat user file:

sudo vi /etc/tomcat6/tomcat-users.xml ```…comment out the “” at the bottom of the tag. Copy and paste one of the tags to "add a new user" with the "manager" role.

  • Edit the tomcat settings file:
sudo vi /etc/default/tomcat6
```...uncommenting the "TOMCAT6\_SECURITY=no" setting so we explicitly don't use the Java security manager iaw the original instructions. I'm inclined to uncomment the "LOGFILE\_DAYS=14" line to keep logfiles to:```
/var/log/tomcat6
  • Install postgresql and pgadmin3 (note to start pgadmin3 once it’s installed, just search for it in the Unity search in the top left hand corner).
sudo apt-get install postgresql
sudo apt-get install pgadmin3
  • Set a password for the postgresql postgres user, replacing “INSERT_PW_HERE” with your password.
sudo -u postgres psql template1
ALTER USER postgres WITH PASSWORD 'INSERT\_PW\_HERE';
\\q
  • Download the latest JDBC (at writing time, given it’s version 9.3.5 of postgresql and 1.7.0 of Java we’d need version JDBC41 - you can find this out by running “psql –version” and “java -version” respectively) and place it in the /usr/share/tomcat6/lib folder.
  • Download and extract the cmdbuild to a folder, and move the <>/extras/tomcat-libs/x.y/* to the /usr/share/tomcatZZ/lib folder, where x.y is the tomcat version being used (6.0 for me), and “tomcatZZ” is the folder holding Tomcat ie tomcat60 for me.
  • Rename the “cmdbuild.x.y.z.war” to just “cmdbuild.war”
  • Start Tomcat with the following command (“tomcat6” might change):
sudo /etc/init.d/tomcat6 start
  • Navigate to http://localhost:8080/manager/html , logging in with your credentials you set before in the tomcat-users.xml file.
  • Under “WAR file to deploy”, select the “cmdbuild.war” and “Deploy” it. This takes a few seconds.
  • Go to http://localhost:8080/cmdbuild oncethepageis loaded and theWARfileis deployed. You should see the following settings page:
    • Screen Shot 2014-08-26 at 4.09.24 pm
  • Enter in the following parameters for the database settings, tailoring when you like (especiallyfortheCMDBuild database.
    • Screen Shot 2014-08-26 at 4.10.44 pm
  • Thenyouwill be prompted to log in with the username “admin” and password “admin” for the demo distribution.
    • Screen Shot 2014-08-26 at 4.12.12 pm

      Comments:

      #### Anthony -

I’m really happy to hear you found my institutions useful!! Thank you :-)


#### Rune -

Thanks for sharing Anthony! You have saved me for hours of work! As I am a windows-man I found your instructions very helpful. Thank you!


#### Laurie Kepford -

Anthony, thanks for the instructions. I am sure a lot of people have found this helpful, as I did. I have a question. I am looking for any information on running CMDBuild under Tomcat7. Have you tried that yet?


#### Computerlady911 -

I haven’t actually tried it yet. If I do, I will let you know how it goes.


#### Anthony -

Laurie, thank you too - comments like yours keep on encouraging me to continue to blog on tech stuff :-). As for running CMDBuild under Tomcat 7, I haven’t tried it… did you have any errors installing Tomcat 7, or deploying the .war file to Tomcat?


#### Anthony -

Good luck :-).


#### asdf -

Did someone try with Ubuntu 16.04?


#### Anthony -

What operating system are you using?


#### egal -

Hi, after opening http://localhost:8080/cmdbuild i got a mistake: HTTP Status 500 - javax.servlet.ServletException: java.lang.NoSuchMethodError: org.postgresql.Driver.getVersion()Ljava/lang/String;


#### egal -

Ubuntu 16.04


#### William Pinelo Marin -

great work, thanks Anthony.



Me

Anthony is an Australian software engineer and mathematician. As a UTS MBT graduate, Anthony is the technology co-founder of a property and cycling-tech startup and enjoys teaching and learning coding with the Australian startup scene.