WSO2 Installation & Configuration
Downloading the Product:
Follow the instructions below to download the product from the product web page. You can also download and build the source code.
- In your Web browser, go to http://wso2.com/products/governance-registry.
- If you are a new user downloading WSO2 products for the first time, register and log in.
- Once you are logged in, click the Binary button in the upper right corner of the page.
The binary distribution contains the Carbon binary files for both MS Windows and Linux operating systems, compressed into a single ZIP file. This distribution is recommended for many users.
Installing a WSO2 product is very fast and easy. Before you begin, be sure you have met the installation prerequisites, and then follow the installation instructions for your platform.
Installing the required applications:
- Be sure your system meets the Installation Prerequisites. Java Development Kit (JDK) is essential to run the product.
Installing the Governance Registry:
- Download the latest version of the Governance Registry as described in Downloading the Product.
- Extract the archive file to a dedicated directory for the Governance Registry, which will hereafter be referred to as <GREG_HOME>.
Setting up JAVA_HOME:
You must set your JAVA_HOME environment variable to point to the directory where the Java Development Kit (JDK) is installed on the computer. Typically, the JDK is installed in a directory under C:/Program Files/Java, such as C:/Program Files/Java/jdk1.6.0_27. If you have multiple versions installed, choose the latest one, which you can find by sorting by date.
Environment variables are global system variables accessible by all the processes running under the operating system. You can define an environment variable as a system variable, which applies to all users, or as a user variable, which applies only to the user who is currently logged in.
You set up JAVA_HOME using the System Properties, as described below. Alternatively, if you just want to set JAVA_HOME temporarily for the current command prompt window, set it at the command prompt.
Execute Start Script:
In order to launch the management console, it is necessary to execute the start script wso2server.bat from the bin folder.
- Access Windows command prompt (go to "Start" -> "Run" and type "cmd" without quotes. Press "Enter").
- Execute the following command: cd <PRODUCT_HOME>\bin
where <PRODUCT_HOME> is the installation folder of the product. For example, c:\wso2\wso2greg-4.5.3\bin.
- Execute the following command:wso2server.bat
WSO2 server for OSB (Start server with this command):
To integrate OSB with G-Reg:
- Unzip G-Reg pack and start the server with -Duddi=enable. I.e., for UNIX: /sh -Duddi=enable.
- Login to OSB server and create a new session if you have not done so.
DB layer configuration for WSO2:
Setting up the database and users:
Follow the steps below to set up a MySQL database:
- Download and install MySQL on your computer using the following command: sudo apt-get install mysql-server mysql-client
- Start the MySQL service using the following command:
- Log in to the MySQL client as the root user (or any other user with database creation privileges).
- Enter the password when prompted.
sudo /etc/init.d/mysql startmysql -u root -p
In most systems, there is no default root password. Press the Enter key without typing anything if you have not changed the default root password.
- In the MySQL command prompt, create the database using the following command:
create database regdb;
mysql> create database <DATABASE_NAME> character set latin1;
1. Give authorization of the database to the regadmin user as follows:grant all privileges on regdb.* to regadmin@'%' identified by 'regadmin';
- Once you have finalized the permissions, reload all the privileges by executing the following command: FLUSH PRIVILEGES;
- Log out from the MySQL prompt by executing the following command: quit.
Setting up the drivers:
Download the MySQL Java connector JAR file, and copy it to the <PRODUCT_HOME>/repository/components/lib/ directory.
Setting up datasource configurations:
The H2 database that comes by default stores registry and user management related data. Follow the steps below to change the type of the default database or create new databases to manage registry or/and user management related data separately.
Changing the default database
Follow the steps below to change the type of the default H2 database.
- Edit the default datasource configuration in the <PRODUCT_HOME>/repository/conf/datasources/m aster-datasources.xml file. Replace the url, username, password and driverClassName settings with your custom values and also the other values accordingly as shown below.
Icon
Do not change the datasource name WSO2_CARBON_DB in the below configurations.
<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:mysql://localhost:3306/regdb</url>
<username>regadmin</username>
<password>regadmin</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>80</maxActive>
<maxWait>60000</maxWait>
<minIdle>5</minIdle>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
Creating database tables: To create the database tables, connect to the database that you created earlier and run the following scripts
You may have to enter the password for each command when prompted.
OR
|
Comments
Post a Comment