evergreen-admin:sip
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
evergreen-admin:sip [2010/05/06 11:54] – jatzberger | evergreen-admin:sip [2011/04/01 08:51] – Permission numbers vary between versions. This code uses the permission code instead. sylvar | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====Installing the SIP Server for Evergreen==== | + | ======Installing the SIP Server for Evergreen====== |
Author: Bill Erickson\\ | Author: Bill Erickson\\ | ||
This is a rough intro to installing the SIP server for Evergreen. | This is a rough intro to installing the SIP server for Evergreen. | ||
- | ===Getting the code=== | + | NOTE: This documentation is also available in the Evergreen documentation at [[http:// |
+ | |||
+ | =====Getting the code===== | ||
+ | Current SIP code lives at github: | ||
+ | < | ||
+ | cd /opt | ||
+ | git clone git:// | ||
+ | </ | ||
+ | Or use the old style: | ||
< | < | ||
$ cd /opt | $ cd /opt | ||
Line 11: | Line 19: | ||
</ | </ | ||
- | ===Configuring the Server=== | + | =====Configuring the Server===== |
- < | - < | ||
$ cd / | $ cd / | ||
Line 23: | Line 31: | ||
- '' | - '' | ||
- | ===Adding SIP users==== | + | =====Adding SIP users===== |
- | - in the < | + | - in the < |
- | - In Evergreen, create a new profile group called SIP. This group should be a sub-group of Users (not Staff or Patrons). | + | - In Evergreen, create a new profile group called SIP. This group should be a sub-group of Users (not Staff or Patrons). |
+ | < | ||
COPY_CHECKIN | COPY_CHECKIN | ||
COPY_CHECKOUT | COPY_CHECKOUT | ||
Line 35: | Line 44: | ||
VIEW_USER_FINES_SUMMARY | VIEW_USER_FINES_SUMMARY | ||
VIEW_USER_TRANSACTIONS</ | VIEW_USER_TRANSACTIONS</ | ||
+ | |||
+ | OR use SQL like: | ||
+ | <code sql> | ||
+ | INSERT INTO permission.grp_tree (id, | ||
+ | VALUES (8, ' | ||
+ | |||
+ | INSERT INTO | ||
+ | permission.grp_perm_map (grp, perm, depth, grantable) | ||
+ | SELECT | ||
+ | g.id, p.id, 0, FALSE | ||
+ | FROM | ||
+ | permission.grp_tree g, | ||
+ | permission.perm_list p | ||
+ | WHERE | ||
+ | g.name = ' | ||
+ | p.code in ( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | -- VERIFY: | ||
+ | SELECT * | ||
+ | FROM permission.grp_perm_map JOIN permission.perm_list ON | ||
+ | | ||
+ | WHERE grp=8; | ||
+ | </ | ||
+ | |||
+ | Keep in mind that the id (8) may not necessarily be available on your system. | ||
- For each account created in the < | - For each account created in the < | ||
Note: The expiration date will affect the SIP users' connection, you might want to make a note of this somewhere. | Note: The expiration date will affect the SIP users' connection, you might want to make a note of this somewhere. | ||
- | ===Running the server=== | + | =====Running the server===== |
< | < | ||
$ sudo su opensrf | $ sudo su opensrf | ||
Line 44: | Line 88: | ||
</ | </ | ||
- | ===Logging | + | =====Logging===== |
+ | ==Syslog== | ||
It is useful to log SIP requests to a separate file especially during initial setup by modifying your syslog config file. | It is useful to log SIP requests to a separate file especially during initial setup by modifying your syslog config file. | ||
- Edit syslog.conf.< | - Edit syslog.conf.< | ||
- | - Add this:< | + | - Add this:< |
- | - Syslog expects | + | - Syslog expects |
- Restart sysklogd< | - Restart sysklogd< | ||
- | ===Testing Your Connection=== | + | ==Syslog-NG== |
+ | - Edit logging config < | ||
+ | - Add:< | ||
+ | # SIP2 for Evergreen | ||
+ | filter | ||
+ | destination eg_sip { file("/ | ||
+ | log { source(s_all); | ||
+ | </ | ||
+ | - Syslog-ng expects the logfile to exist so create the file.< | ||
+ | - Restart syslog-ng < | ||
+ | |||
+ | == syslog-ng(remote logging server) == | ||
+ | |||
+ | Use this configuration in the destination server' | ||
+ | |||
+ | < | ||
+ | # -------------------------------------------------------------------------------- | ||
+ | # Destination | ||
+ | # -------------------------------------------------------------------------------- | ||
+ | |||
+ | destination d_external_sip { # f_sip | ||
+ | file("/ | ||
+ | template(" | ||
+ | |||
+ | |||
+ | # -------------------------------------------------------------------------------- | ||
+ | # Filter | ||
+ | # -------------------------------------------------------------------------------- | ||
+ | |||
+ | filter f_sip { match(" | ||
+ | |||
+ | # -------------------------------------------------------------------------------- | ||
+ | # Log Statement | ||
+ | # -------------------------------------------------------------------------------- | ||
+ | |||
+ | log { source(s_external); | ||
+ | |||
+ | Add the lines below to the syslog-ng.conf on the remote server you wish to forward logs from. | ||
+ | |||
+ | < | ||
+ | #SIP | ||
+ | source s_file_sip { file("/ | ||
+ | log { source(s_file_sip); | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | =====Testing Your Connection===== | ||
* In the top level CVS checkout of the SIPServer code | * In the top level CVS checkout of the SIPServer code | ||
< | < | ||
$ cd SIPServer/t | $ cd SIPServer/t | ||
</ | </ | ||
- | * Edit SIPTest.pm, change the $instid, $server, $username, and $password variables. | + | * Edit SIPtest.pm, change the $instid, $server, $username, and $password variables. |
< | < | ||
$ PERL5LIB=../ | $ PERL5LIB=../ | ||
Line 69: | Line 161: | ||
* Don't be dismayed at " | * Don't be dismayed at " | ||
- | ===More Testing=== | + | ====More Testing==== |
Once you have opened up either the SIP OR SIP2 ports to be accessible from outside you can do some testing via telnet. | Once you have opened up either the SIP OR SIP2 ports to be accessible from outside you can do some testing via telnet. | ||
You can try this with localhost if you so wish, but we want to prove that SIP2 works from non-localhost. | You can try this with localhost if you so wish, but we want to prove that SIP2 works from non-localhost. |
evergreen-admin/sip.txt · Last modified: 2022/02/10 13:34 by 127.0.0.1