I'm going to show you configuration steps to use PostgresSQL with WSO2 Identity server 5.1.0.
download Create a database and the login role from a GUI using the PGAdminIII tool.
Step 3 :-
asource>
Step 1 :- install postgresql 9.3 using below command. When you are installing this, you may have to give special permissions for /var/lib/cache directory.
sudo apt-get update
sudo apt-get install postgresql
When you are giving permission, Do not use below command to give permission for /var/ directory. because it will override the super user and you may have to re install linux.
sudo chmod 777 -R /var/lib/sudo/
Step 2 :- start postgresql server with below command
sudo /etc/init.d/postgresql start
download Create a database and the login role from a GUI using the PGAdminIII tool.
Start PGAdminIII tool using below command.
sudo ./postgresql-9.3.10-3-linux-x64.run
Step 3 :-
Create a database 'gregdb' and add a new user Login Role('postgres', 'postgres')
click OK
Step 4 :-
Download the PostgreSQL JDBC4 driver and put it in to the <
PRODUCT_HOME>/repository/components/lib directory.
Step 5 :-
Change the default data source in <
PRODUCT_HOME>/repository/conf/datasources/master-datasources.xml file as below<datasource> <name>WSO2_CARBON_DB</name> <description>The datasource used for registry and user manager</description> <jndiConfig> <name>jdbc/WSO2CarbonDB</name> </jndiConfig> <definition type="RDBMS"> <configuration> <url>jdbc:postgresql://localhost:5433/gregdb</url> <username>regadmin</username> <password>regadmin</password> <driverClassName>org.postgresql.Driver</driverClassName> <maxActive>80</maxActive> <maxWait>60000</maxWait> <minIdle>5</minIdle> <testOnBorrow>true</testOnBorrow> <defaultAutoCommit>false</defaultAutoCommit> <validationInterval>30000</validationInterval> </configuration> </definition></datasource>
Step 6 :- Start the server with below command.It will create database tables automatically
For Windows:
<IS_HOME>/bin/wso2server.bat -Dsetup
For Linux:
<IS_HOME>/bin/wso2server.sh -Dsetup
Server will be start without any problem. If you want to use Postgresql in terminal, use below command.
sudo psql -h localhost -p 5433 -U userName dbName
Comments
Post a Comment