Some notes on the Room Booking system

Most of this is irrelevant now as we don't use Shezhu anymore, but it may be useful for historical interest.

Room booking is now done on the RBS system, see ServicesUnitRBS.

Install shezhu RPM and component.

There's a bit of a chicken and egg situation here, as you can't run the component properly for the first time because mysql and apache won't be setup correctly. Also note that the component will probably change the ownership of the shezhu files, as shipped by the RPM - this depends on the config of the component.

So...

Start the shezhu component, it will look OK, but it won't actually start its mysql or httpd. Now initialise shezhu mysql with /var/shezhu/bin/<a site>/setup. Note the admin passwd you use. [ I used the AT site, as it isn't actually used, other than for testing] You should also do this as the user that the component has configured shezhu to run as, in this case the 'shezhu' user (not root or apache). eg

[maelcum]shezhu: pwd
/var/shezhu/bin/at

[maelcum]shezhu: ./setup 
Choose and enter a MySQL system administrator password: 
Retype and confirm the MySQL system administrator password: 
Choose and enter a password for 'remoteat': 
Retype and confirm the password for 'remoteat': 
Choose and enter a password for 'timc': 
Retype and confirm the password for 'timc': 

admin passwd, the next up from the mail server one. It doesn't matter what you set the other passwds, as they'll get reset by the component/are not used?

There should now be a shezhu DB in /var/lib/shezhu/

Need to repeat for all sites to create initial DBs.

The '/usr/sbin/shezhuctl start' should now start apache (assuming your SSL certs are OK) and mysql.

[maelcum]shezhu: shezhuctl start
Starting up MySQL Server
Starting up HTTPD Server

This was just to confirm the config, you will normally use the component.

[maelcum]shezhu: shezhuctl stop
Shutting down HTTPD Server
Shutting down MySQL Server

Then as root:

[maelcum]root: om shezhu start
[OK] shezhu: start

The component should now work.

If you are restoring the service following a disaster, or are moving from another machine, Now you can restore the mysqldump files from the backups to this new machine.

Assuming you optained an as current copy of the data as possible with something like:

/usr/bin/mysqldump -uroot -pPASSWD --opt \
  --socket=/var/run/shezhu/mysqld.sock \
  --databases shezhuat  shezhubp shezhufh  shezhukb > backup-file.sql

Then restore on the new machine with:

/usr/bin/mysql -v -uroot -pPASSWD  \
  --socket=/var/run/shezhu/mysqld.sock < backup-file.sql

update backup script with passwd for the shezhu DBs.

Configuring

The system is quite simple, and the order that bookable resources are specified in the profile is significant. If you change the order, then existing booking will/may be reassigned to different resources.

MySQL tips

To list user permissions do:

show grants for 'select'@'localhost';

To list all databases, tables and details of a table:

mysql> show databases;
mysql> show tables;   # you need to have done a 'use database;' first
mysql> explain <Table_Name>;

-- NeilBrown - 23 Aug 2007

Topic revision: r3 - 30 Jun 2009 - 08:26:52 - NeilBrown
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies