How to setup WSO2 Carbon in production?
- Dimuthu Leelarathne
- Architect - WSO2
- 16 Nov, 2009
Here is a check-list that administrators should run through before setting up Carbon in a production environment.
- Change the server SSL Certificate
- Database Configuration
- Password Protection
1. Change the server SSL Certificate
WSO2 Carbon uses a self-signed certificate to enable SSL, so you should consider changing it. This is a mandatory step if you are planning to use security sensitive transactions. The key store details and passwords are given by in the <carbon-home>/conf/carbon.xml
- If the SSL certificate and the private key is in the pem format,
- Convert the private key and certificate to pkcs12 keystore using following command.
- Use keytool in jdk 6.X to import the pkcs12 keystore to the wso2carbon.jks.
- Open the conf/carbon.xml file and change the KeyAlias and KeyPassword.
openssl pkcs12 -export -out keystore.pfx -inkey privatekey.pem -in certificate.pem -certfile CACert.pem
keytool -importkeystore -srckeystore keystore.pfx -destkeystore wso2carbon.jks -srcstoretype pkcs12 -deststoretype jks -srcstorepass srcstorepass -deststorepass deststorepas
- If the SSL certificate and private key is in jks format
- Use keytool in jdk 6.X to import the pkcs12 keystore to the wso2carbon.jks.
- Open the conf/carbon.xml file and change the KeyAlias and KeyPassword
keytool -importkeystore -srckeystore keystore.jks -destkeystore wso2carbon.jks -srcstoretype jks -deststoretype jks -srcstorepass srcstorepass -deststorepass deststorepas
2. Database Configuration
WSO2 Carbon ships with a H2 database, but it can work with many RDBMS by different vendors.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx the database connection details picture on registry.xml and user-mgt.xml
- Minimally,
- Change the database password by editing the registry.xml and user-mgt.xml.
- If you are want to change the database to Oracle, MySQL or MSSQL,
- Create an empty database in the server. It is not required to create the schema.
- Download the relevant JDBC Driver and copy it into the <carbon-home>/repository/components/extensions folder.
- Change database connection details in user-mgt.xml and carbon.xml
- Start the WSO2 Carbon server with the following option. The server will automatically create the tables in the database and configure itself.
sh wso2server.sh -Dsetup
- If you want to change the database to a RDBMS other than Oracle, MySQL or MSSQL,
- Create the database and it's table by looking at the sql scripts available in <carbon-home>/dbscripts
- Change database connection details in user-mgt.xml and carbon.xml
- Start the server normally
3. Password protection
Configure MD5/Hashed ...