Friday May 18, 2007

Installing Roller 3.1.0 on Tomcat

What do I need to install Roller 3.0.1 on Tomcat?
Here's a link to the complete installation guide for your reference.

Stay tuned for my follow up blog on installation on my favorite application server glassFish.

  1. BEFORE INSTALLATION. THE SETUP. First things first. I need the following installed on my system:
  2. UNPACK THE ROLLER DISTRIBUTION. Download the appropriate roller distribution and unpack the ZIP or TAR file.

    Set the ROLLER environment variable to the location of the roller webapps directory. For example, for Windows (if you installed Roller in c:), you would set
    set %ROLLER% = c:\\apache-roller-3.1/webapp/roller

  3. INSTALL REQUIRED THIRD PARTY JARS

    If you're curious why, these are not shipped in Roller due to licensing restrictions. You need-

    • Download Hibernate 3.1.2 from SourceForge

      You'll need to copy the following files from Hibernate into the Roller WEB-INF/lib directory:

      hibernate3.jar, asm-attrs.jar, asm.jar, cglib-2.1.3.jar, dom4j.1.6.1.jar , ehcache-1.1.jar, jdbc2_0-stdext.jar, jta.jar


      You'll also need to change the Hibernate configuration file to use the MySQL5 dialect.
    • Install JDBC Driver Jars.

      Download the J/Connector JDBC driver from mysql.com and place it in the Tomcat common/lib directory.

    • Install JavaMail and activation Jars

      Copy activation.jar and mail.jar to Tomcat common/lib.

  4. CREATE ROLLER TABLES IN YOUR DATABASE.

    In this step you use an SQL script to create a new database within your MySQL installation, create a user with all privileges within that database and the tables required to run Roller.

    Execute the script in %ROLLER%/WEB-INF/dbscripts/mysql

    C> cd %ROLLER%\\WEB-INF\\dbscripts\\mysql
    C> mysql -u root -p
    password: \*\*\*\*\*
    mysql> create database roller;
    mysql> grant all on roller.\* to scott@'%' identified by 'tiger';
    mysql> grant all on roller.\* to scott@'localhost' identified by 'tiger';
    mysql> use roller;
    mysql> source createdb.sql
    mysql> quit
    

  5. DEPLOY ROLLER TO YOUR APPLICATION SERVER

    To deploy Roller you will need to inform Tomcat where to find the Roller installation directory, how to configure the Roller database data-source under the JNDI name jdbc/rollerdb, and how to configure the Roller email session under the JNDI name mail/Session.

    For Tomcat you can do this by creating a context configuration file named roller.xml and placing that file in the %CATALINA_HOME%/conf/Catalina/localhost directory.

    This is what roller.xml looks like. Edit the values for docBase and Resource attributes to point to the ones you're using.

    
    <Context path="/roller"
    docBase="c:/apache-roller-3.1/webapp/roller" debug="0">
    <Resource name="jdbc/rollerdb" auth="Container"
    type="javax.sql.DataSource"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/roller?autoReconnect=true&
    useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8"
    username="scott"
    password="tiger"
    maxActive="20"
    maxIdle="3"
    removeAbandoned="true"
    maxWait="3000" />
    <!-- If you want e-mail features, un-comment the section below -->
    <Resource name="mail/Session" auth="Container"
    type="javax.mail.Session" mail.smtp.host="mailhost.example.com" /> 
    </Context>
    
    
  6. Check your internationalization settings

    Configure your application server and your web server to use UTF-8 encoding because Roller's does I18N by using UTF-8 encoding for everything. Also Check your application server's URI encoding setting!

    Make sure that your web application server uses UTF-8 to encode URI's. In Tomcat the URI encoding is specified in the connectors that are configured in the Tomcat configuration file conf/server.xml. Here's a connector with the URI encoding attribute set properly:

    <Connector port="8080" maxThreads="150" minSpareThreads="25" .....
    URIEncoding="UTF-8" />
    

  7. Setup Roller data directories

    Roller stores file uploads, search index files, cache files and log files on disk. Make sure the following directories that Roller expects exist and are writable by the Tomcat process.

    • Uploads directory: ${user.home}/roller_data/uploads Where ${user.home}is the Java system property that normally evaluates to the home directory of the user identity executing the server's JVM process.
    • Search-index directory: ${user.home}/roller_data/search-index
    • Logs directory: ${catalina.base}/logs/roller.log


  8. Review Roller configuration

    • Review the WEB-INF/classes/roller.properties file To override the properties, define a roller-custom.properties file and place it in $CATALINA_HOME/common/classes/roller-custom.properties

      uploads.dir=/app/roller/roller_data/uploads
      search.index.dir=/app/roller/roller_data/search-index
      passwds.encryption.enabled=true
      # other values you may want to override
      

    • Edit %ROLLER%/WEB-INF/security.xml file For the beans with ids "anonymousAuthenticationProvider" and "anonymousProcessingFilter" change the value field of the property with name="key" to any string value of your choosing. Use the same key value in these two beans; they must match.
      For the beans with ids "rememberMeServices" and "rememberMeAuthenticationProvider" change the value field of the property with name="key" to be different from the default value of "rollerlovesacegi". You can use any string value of your choosing. It should be a secret specific to your site. Use the same key value in these two beans. Again, they must match.

  9. Start your Servlet Container and your database

    Start your Servlet Container, open your web browser, browse to the Roller start page and start using Roller.

        C> cd %CATALINA_HOME/%bin
        C> startup
    
  10. Point your browser to the URL: http://localhost:8080/roller. You're all set!

Tuesday May 01, 2007

How to win a 52" LCD HD TV

Fish for a 52" Flat screen LCD HD TV contest opened today.

What do you have to do to participate? It's as simple as 1,2,3 below.

  1. Download GlassFish and try out the bits.
  2. Blog about it. Also, do mention the download location of GlassFish in your blog.
  3. Use this simple form to send in your blog entry.

Still not sure?

View this screencast to guide you through the steps.

Hurry! The contest ends on June 15, 2007. Submit your story today.

Monday Apr 16, 2007

Who is reading your blog?

The first time I saw ClustrMaps was on Masood's blog On the margins....

I found the whole idea of being able to view the geographic coordinates of the people who are reading your blogs pretty fascinating - fascinating enough to want to add it to my own blog entry.

It was amazingly simple. I must add a disclaimer here that ClustrMaps in not paying me to endorse their product in any way. Now that the disclaimer is taken care of.. here is what I did.

  1. To get your free account, REGISTER HERE.
  2. You will be sent a password by email with login instructions.
  3. Copy/paste a few lines of HTML from your ClustrMaps login page onto your own site.
Voila!

Do you have some cool ideas to add on to the left and right navigation bars of your blog? Please share them....

About

manveen

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today