EmForgeSetupGuide
|
After installing EmForge from war, it is already possible to use it. But, not sure it is really good idea to use default configuration of EmForge for production environment.
By default, EmForge configured for easy-to-use, so, any user will easily able to start use it. But, this default configuration has some problems with performance and security, you will need to fix before try to use it in production.
So, to configure EmForge you will need to edit configuration files in your preferred text-editor.
Main Configuration Files you will need to work with:
So, you can find all configuration file under your Tomcat (or any other J2EE server) in directly, there EmForge was deployed. After changing this configuration files, please, do not forgot to restart web-application.
Directory ${tomcat.dir}/webapps/EmForge/WEB-INF/classes/META-INF/ has some other Spring-configuration files, you probably will need to use, but we hope at this moment these 3 files will be enough.
If you will have any questions - always feel free to ask in EmForge Mail Lists - hope we will able to answer.
Change password for admin login, you need to find followed block in emforge-security.xml:
<bean id="inMemoryDaoImpl" class="ru.emdev.EmForge.security.memory.MemoryUserDetailsService">
<property name="userMap">
<value>
admin=admin,dummy@emforge.org,admin,ROLE_EMFORGEUSER,enabled,ROLE_EMFORGEADMIN
</value>
</property>
</bean>
and change it to
<bean id="inMemoryDaoImpl" class="ru.emdev.EmForge.security.memory.MemoryUserDetailsService">
<property name="userMap">
<value>
admin=XXX,dummy@emforge.org,admin,ROLE_EMFORGEUSER,enabled,ROLE_EMFORGEADMIN
</value>
</property>
</bean>
where XXX - is new password.
To remove this login at all - you will need remove line
<ref bean="testDaoAuthenticationProvider"/>
from authenticationManager bean and remove line
<ref bean="inMemoryDaoImpl"/>
from agreegatingService bean
As soon as you will remove default admin user, you will need to give admin rights to some other users. For doing it you will need:
repository to view in Source-Browser Tab.
If you want to change it to your own repository - simple edit line
repository.path=http://svn.emforge.org/svn/emforge
in config.properties
If you want to use EmFoge with your own database, you need to change followed settings in config.properties:
You can use build-in auto-detection dialect (we go it's sources from LifeRay Portal
: com.liferay.portal.spring.hibernate.DynamicDialect - in this case Hibernate Dialect will be auto-detected.
After you will run EmForge next time, it will create all required tables and initial data in this new database.
To do it - you need to replace emforge-ds.xml with file, attached to this page, and change config.properties so, database.url will contain name of the required DS. For example. under Tomcat, if you have configured jdbc/EmForge data-source, you need to change your config.properties to:
datasource.url=java:comp/env/EmForgeDS
datasource.driver is not make sense in this case (since driver is configured by J2EE server itself). You will need to configure datasource.dialect as well as was already described.
To configure EmForge for your email settings you need to change email.host property in config.properties to point to your smtp-server (default is localhost)
SMTP with authentication is not currently supported :(
for authentication and authorization, it is possible to integrate EmForge with many external systems - one of example is ActiveDirectory (or LDAP in general).
So, to make EmForge use ActiveDirectory for authentication you need replace emforge-security.xml with file attached to this document and replace followed settings there:
Then you need to create 3 groups in your Active Directory:
Then ActiveDirectory or LDAP is used, and "Register" is still allowed, all users, registered via EmForge will be added into Database (emfrg_user table). EmForge allowed to mix user and group information from different sources (for example from Database and from ActiveDirectory).
| Last Modified by akakunin 5 months ago |