THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
The first step is to install Roller and ensure it works on your application server.
- Install Tomcat 6 and install the MySQL JDBC Driver in its "lib" directory. Also install JavaMail's activation.jar and mail.jar.Create create a CATALINA_HOME environment variable that points to the installation location where you installed Tomcat.
- Create a roller-custom.properties file and put it in your server's classpath ($CATALINA_HOME/lib for Tomcat 6).
Code Block installation.type=auto database.configurationType=jdbc database.jdbc.driverClass=com.mysql.jdbc.Driver database.jdbc.connectionURL=jdbc:mysql://localhost:3306/rollerdb?createDatabaseIfNotExist=true database.jdbc.username=root database.jdbc.password= mail.configurationType=properties mail.hostName=localhost
- Copy Download the following JARs and copy them to apache-roller-4.0/webapps/roller to $CATALINA_HOME/webapps/roller and start Tomcat./WEB-INF/lib:
- MySQL JDBC Driver
- JavaMail: activation.jar and mail.jar
- Copy apache-roller-4.0/webapps/roller to $CATALINA_HOME/webapps/roller and start Tomcat.
- Go to Go to http://localhost:8080/roller
and complete the steps to add a new user and create a blog. When creating a new user, use admin for the username and admin for the password.
- Test that Roller works by creating a blog entry using the web interface, or using a client like MarsEdit (Moveable Type, RPC URL: http://localhost:8080/roller/roller-services/xmlrpc
, Blog ID: admin).
...
- Stop Tomcat.
- Install Apache Directory Server and start it as root by running "sudo /usr/local/apacheds" (on OS X).
- Install Apache Directory Studio and launch the application.
- Create a new LDAP Connection with the following settings:
- Connection Name: Local ApacheDS
- Hostname: localhost
- Port: 10389
- Encryption: No Encryption
- (Click Next)
- Bind DN or user: uid=admin,ou=system
- Bind password: secret
- (Click Finish)
- Download roller.ldif to your Desktop. This file contains an admin account as well as Groups and People organizational units.
- In Apache Directory Studio, right click on dc=example,dc=com and select Import > LDIF Import...
- Select roller.ldif for the LDIF file and click Finish. You may get an error during the import, but it should add entries successfully.
- Modify $CATALINA_HOME/lib/roller-custom.properties so it has a single entry:
Code Block users.sso.enabled=true
- Open $CATALINA_HOME/webapps/roller/WEB-INF/security.xml in your favorite XML editor. Look for "LDAP/SSO" and uncomment the bean definitions to enable LDAP. In the "authenticationManager" bean, comment out "daoAuthenticationProvider" and enable "ldapAuthProvider". Commenting out "daoAuthenticationProvider" is not necessary, but it allows you to verify you're only authenticating against LDAP. Use the following values for the values in the "initialDirContextFactory" bean.
- LDAP_URL = ldap://localhost:10389/dc=example,dc=com
- LDAP_USERNAME = uid=admin,ou=system
- LDAP_PASSWORD = secret
- While you're editing security.xml, change the "rollerlovesacegi" value to something unique to your server. Any XML-friendly characters will work. The more cryptic the better.Create a $CATALINA_HOME/webapps/roller/META-INF/context.xml file and add the following to it:
Code Block <Context path="/roller" debug="99"> <Resource name="jdbc/rollerdb" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/rollerdb?useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8" username="root" password="" maxActive="20" maxIdle="3" removeAbandoned="true" maxWait="3000"/> <Resource name="mail/Session" auth="Container" type="javax.mail.Session" mail.smtp.host="localhost"/> </Context>
This step shouldn't be necessary because of the database settings in roller-custom.properties. This is likely a bug in Roller's configuration.. Any XML-friendly characters will work. The more cryptic the better.Note - Start Tomcat and login to your blog with admin/adminldap.
...
- Edit $CATALINA_HOME/webapps/cas/WEB-INF/deployerConfigContext.xml in your favorite XML editor.
- Find the SimpleTestUsernamePasswordAuthenticationHandler bean towards the bottom and comment it out. Replace it with the following:
Code Block <bean class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler" > <property name="filter" value="uid=%u,ou=People,dc=example,dc=com" /> <property name="contextSource" ref="contextSource" /> </bean>
- At the very end of the file (before the ending </beans> element), add a "contextSource" bean definition:
Download the following JARs and put them into $CATALINA_HOME/webapps/cas/WEB-INF/lib.Code Block <bean id="contextSource" class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource"> <property name="pooled" value="true"/> <property name="urls"> <list> <value>ldap://localhost:10389</value> </list> </property> <property name="userName" value="uid=admin,ou=system"/> <property name="password" value="secret"/> <property name="baseEnvironmentProperties"> <map> <entry> <key> <value>java.naming.security.authentication</value> </key> <value>simple</value> </entry> </map> </property> </bean>
- MySQL JDBC Driver
- Commons DBCP Commons Pool
- Copy cas-server-support-ldap-3.1.jar from $CAS_DOWNLOAD/modules to $CATALINA_HOME/webapps/cas/WEB-INF/lib.
- Start Tomcat. You should be able to login with admin/adminldap.