60 likes | 194 Views
Control System Studio Training - Infrastructure: JMS, RDB. Kay Kasemir ORNL/SNS kasemirk@ornl.gov 2011, October 17-21 at CEA Saclay, France. Relational Database. Required for archive, alarm system, message log Dialects: MySQL, PostgreSQL, Oracle
E N D
Control System Studio Training-Infrastructure: JMS, RDB Kay Kasemir ORNL/SNS kasemirk@ornl.gov 2011, October 17-21 at CEA Saclay, France
Relational Database • Required for archive, alarm system, message log • Dialects: MySQL, PostgreSQL, Oracle • Details far beyond this training, but need to • Maybe start/stop RDB • Connect as administrator to create tables • Create user for archive, alarm system, … • Connect as user “archive” or “alarm”
Starting, Stopping MySQL Server … is really beyond this training session, but… • Start on Linux, Mac OS X, as root /usr/local/mysql/bin/mysqld_safe –user=mysql & • Stop, as any user /usr/local/mysql/bin/mysqladmin -u root -p shutdown
Start MySQL Shell • Connect as administrator mysql -u root –p Will prompt for password entry.Can also include password in comand line: mysql -u root –p’$root’ Note: Space after “-u” but no space for “–p” • Connect as archive user to archive database, prompting for password mysql –u archive –p archive Include password on command line: mysql –u archive –p’$archive’ archive
MySQL Connection from CSS • URL jdbc:mysql://localhost/archive • User, password What we set when creating the user, e.g. “archive”, “$archive” • Schema Was added to support MySQL, Oracle and Postgres. For MySQL, has to be emptySchema Example plugin_customization.ini: org.csstudio.archive.rdb/url=jdbc:mysql://localhost/archive org.csstudio.archive.rdb/user=archive org.csstudio.archive.rdb/password=$archive org.csstudio.archive.rdb/schema=
Java Message Server, JMS • Specifically: Apache ActiveMQ • Start cd [activemq_install_dir] bin/activemq • URL for CSS clients failover:(tcp://localhost:61616)