Installing weceem cms
This week I’m looking into integrating a CMS into a Grails application. Initially there won’t be much tight integration but it could involve single sign-on and lead into much tighter application embedding CMS content.
As it happens, there is a CMS built on Grails called Weceem – it took some trial and error to get it working as the documentation could use a lot of work. Here are some tips if you’re trying to get it working on Mac OSX (as a quick and simple standalone development mode).
Tomcat
- Download the tar.gz distribution of Tomcat.
- Decompress Tomcat.
- Copy the folder somewhere as desired, I used /opt/apache-tomcat-7.023. Check out this really good tutorial here.
- Download the MySQL JDBC driver.
- Copy the MySQL JDBC driver (i.e. the mysql-connector-java-{ver}-bin.jar file_ to {tomcat home}/lib. I read postings that say you can copy to a common/lib folder, but that didn’t seem to work.
- Edit the {tomcat home}/conf/tomcat-users.xml file and add something along the following lines:
<role rolename="admin"/> <user username="admin" password="admin" roles="manager-gui,admin"/>
Create a MySQL Database
- Create a DB in MySQL called whatever you’d like (I used cms).
- Create a username and password that has access to read/write/modify the schema.
Weceem config file
Create a weceem.properties file somewhere. /etc/weceem.properties might be a good choice. It’ll look like the following, update accordingly.
# Control whether or not connection pooling is enabled dataSource.pooled=true dataSource.driverClassName=com.mysql.jdbc.Driver dataSource.username=dbusername dataSource.password=dbpassword dataSource.dbCreate=update dataSource.url=jdbc:mysql://localhost/cms searchable.index.path=/Websites/cms/search-indexes
Make sure that whatever you set as the searchable.index.path is a directory that that the user Tomcat will run under has read/write access to.
Update your environment variables
Edit your ~/.profile and make sure you have the following lines, update path accordingly:
export JAVA_HOME=/Library/Java/Home export CATALINA_HOME=/opt/apache-tomcat-7.0.23 export JAVA_OPTS=-Dweceem.config.location=file:/Websites/cms/weceem.properties export CATALINA_OPTS="-Xms756m -Xmx756m -XX:NewSize=256m -XX:MaxNewSize=512m -XX:PermSize=256m -XX:MaxPermSize=512m"
Deploy Weceem
- Download the Weceem.war file.
- Copy the Weceem-{ver}.war file to {tomcat home}/webapps/weceem-{ver}.war.
- You can rename the Weceem file to just Weceem.war if you’d like.
See what happens
- Open a terminal window.
- cd to {tomcat home}/bin
- Type in ./startup.sh – you’ll see some stuff about environment variables, and the command line will return back to you.
- Open another terminal window.
- In the second terminal window, cd to {tomcat home}/logs, and type in tail -f catalina.out
- You should eventually see a line that says “INFO: Server startup in xyz ms”
- Open up a browser to http://localhost:8080/manager/html (use the username and password you set up when editing the tomcat-users.xml file above).
- You should see the Weceem application listed and started. If it’s not started, click on the start button.
- Once running, just click on the left column (the path column) and it should load up the default Weceem page.
- There’ll be a link on that page to edit content, the default admin user name and password is admin/admin.
Hope that helps save someone time who wants to tinker around with it.
Hello everbody…. am doing my diploma about groovy & grails and now i have found also a cms based on groovy & grails –>weceem… am very exited about that cms but unfortunally i have a lot of problems to “INSTALL” it…
my tomcat server work fine cause its indetfy the weceem war files but it doesent work when i have tryied to start the cms…tomcat web application manager says that the ; FAIL – Application at context path /weceem-1.1.2 could not be started….i think because of that that i dont know where exactly to declair environment variables… on my computer or somwhere in tomcat servelet..???
please guy help me a bit cause i really would like to taste wecemm cms…happy new year to all…
… am undcerstanding all of your steps just the 4th step where i need to declair or Update your environment variables–>
export JAVA_HOME=/Library/Java/Home
export CATALINA_HOME=/opt/apache-tomcat-7.0.23
export JAVA_OPTS=-Dweceem.config.location=file:/Websites/cms/weceem.properties
export CATALINA_OPTS=”-Xms756m -Xmx756m -XX:NewSize=256m
-XX:MaxNewSize=512m -XX:PermSize=256m -XX:MaxPermSize=512m”
…. and also in ehich directory i need to put weceem.properties file ?
thank you for this post. It’s more complete information about installing weceem then on the official site, as often happens )
Li: I am having the same rlobpem. Our grails app depends on two external Java Modules as well. I have set up the grail module to depend on those two external modules, but the minute I try to build or run the app, I get a compiler error stating it cannot find the classes in those external modules.The only way I have round to get around it is to JAR those modules up and stick them in the LIB directory. Kind of a pain if you ask me.
What kind of compilation borplems did you run into before? I am currently using IDEA 8.1.3 #9886 with its JetGroovy plugin, Grails 1.1.1. I created a Grails module which depends on existing Java modules in the same project. However, when I try to run the Grails application (run-app), the depending Java modules jars are not on the classpath, thus my Java code can’t compile in groovyc steps.Do you have any ideas? Thanks
All of my code is within the Grails app moudle, so can’t say I’ve come across that.One thing that comes to mind is whether IDEA is generating a jar file for your Java moudle, and placing it within the grails app.. IDEA probably delegates to the grails run-app’ command, and probably requires all of the classes/jars to be available on the filesystem in the standard grails app structure.
hi greg,i’m interested in using jetty’s connuniatiots, but it’s a little confusing for me because i only have a few months of ajax experience. can you clarify something for me please?i’m not using cometd as i don’t need an open to my server.here’s my scenario (without cometd):1- user sends a request2- request is suspended’3- dao layer process4- dao process completes5- resume’ and send datahow do i do this with connuniatiots? should i be using connuniatiots or does jetty take care of suspending the thread while resources are used by the dao layer, and then resume when sending data back to the requester?also, do i have to use cometd to use connuniatiots?thanks,ted