Deploying and Configuring Cobar
- Go to the /home/cobar-server-1.2.8-SNAPSHOT/bin directory.
1cd /home/cobar-server-1.2.8-SNAPSHOT/bin
- Modify the startup.sh file.
- Open the file.
1vim startup.sh - Press i to enter the insert mode and replace line 38 with the following content:
1JAVA_OPTS="-server -Xms10240m -Xmx10240m -Xmn8g -Xss328k"
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Go to the /home/cobar-server-1.2.8-SNAPSHOT/conf directory.
1cd /home/cobar-server-1.2.8-SNAPSHOT/conf
- Modify the schema.xml file.
- Open the schema.xml file.
1vim schema.xml - Press i to enter the insert mode. Replace the MySQL information marked in the figure below with the actual MySQL information in the environment. schema.xml contains the IP addresses, port numbers, user name, and password of the MySQL database.
1 2 3 4 5 6 7 8 9 10 11
<!-- Data source definition. A data source is the representation of a specific backend data connection.--> <dataSource name="dsTest" type="mysql"> <property name="location"> <location>192.168.200.56:3306/dbtest1</location> <location>192.168.200.56:3306/dbtest2</location> <location>192.168.200.56:3306/dbtest3</location> </property> <property name="user">root</property> <property name="password">123456</property> <property name="sqlMode">STRICT_TRANS_TABLES</property> </dataSource>

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the schema.xml file.
- View the server.xml file.
1 2
cd /home/cobar-server-1.2.8-SNAPSHOT/conf cat server.xml

The database name provided by the system is dbtest and the password is test.
Parent topic: Running Cobar