PURL Server

From NCBO Wiki
Revision as of 02:44, 11 May 2009 by Nipunb (talk | contribs) (New page: ==Set Up== *2 Windows boxes. *Machine 1 - Master *IP: master.ip *Has MySQL 5.1 *Installing PURL using MySQL as the backend on Machine 1. **1. Download PULR 1.4 **2. Install specifying My...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Set Up

  • 2 Windows boxes.
  • Machine 1 - Master
  • IP: master.ip
  • Has MySQL 5.1
  • Installing PURL using MySQL as the backend on Machine 1.
    • 1. Download PULR 1.4
    • 2. Install specifying MySQL as your backend.Imp Note: You would have a create a database schema'purls' on your MySQL using command line. The PURL installation would not do that for you. In other words, the PURL installation expects you to have a schema called 'purls'. This is will be used as the backend for storing the URLs.
    • 3. Go to the folder where you installed PURL, by default it is: C:\Program Files\PURLZ-Server-1.4
    • 4. Navigate to the bin folder, click on startup.bat to start the server. Imp Note: Default username password for the PURL server is: admin/password
    • 5. Create a backup of purls on Machine 1. On the command line, execute the following command:
 mysqldump --user=root --password  --opt purls > c:\purls_backup.sql
  • Machine 2 - Slave
  • IP: slave.ip
  • Has MySQL 5.1

Instructions for creating the replication

  • 1. On Machine 1:
    • Log on to MySQL
 mysql -u root -p
  
  • 2. On Machine 1:
    • Run the command
 grant replication slave, replication client on *.* to 'replicator'@'slave.ip' identified by 'password';
  
  • 3. On Machine 1:
    • Configure the master:Add the following lines to my.ini file in C:\Program Files\MySQL\MySQL 5.1 folder. Add the lines in the section [mysqld] after the line that specifies the port
  server-id=1
  log-bin="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/bin.log"
  log-error="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/error.log"
  log-bin-index="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/log-bin.index"
  binlog-do-db=purls
  
  • 4.Restart the MySQL service on the master
  • 5. On Machine 2:
    • Create a new empty database 'purls'
  • 6. On Machine 2:
    • Restore the purls database
    • On the command promt run the command
 mysql -u root -p purls < C:\path_to_purls_backup\purls_backup.sql
  
  • 7. On Machine 2: Configure the slave: Add the following lines to my.ini file in C:\Program Files\MySQL\MySQL 5.1 folder. Add the lines in the section [mysqld] after the line that specifies the port
  server-id=2
  master-host=171.65.32.120
  master-port=3306
  master-user=replicator
  master-password=password
  replicate-do-db=purls
  
  log-bin="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/bin.log"
  log-bin-index="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/log-bin.index"
  log-error="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/error.log"
  relay-log="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/relay.log"
  relay-log-info-file="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/relay-log.info"
  relay-log-index="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/relay-log.index"
  


  • 8.Restart the MySQL service on the slave
  • 9. On the slave, log into MySQl
    • i) start slave;
    • ii)show slave status\G;

Make sure slave I/O running is yes Make sure slave_SQL_running is yes