SUNScholar/Handle Server
This wiki page relates to the system build and maintenance of: http://scholar.sun.ac.za
Introduction
This/These procedure/s assume/s that you have used the three step process to install an Ubuntu server with DSpace software.
Step 1 - Register as handle server
Visit: http://www.handle.net and http://www.handle.net/service_agreement.html to register to become a handle server.
Step 2 - Prepare an initial handle request
Login to the server:
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Prepare_Ubuntu/S01
Type the following in a terminal on your server:
sudo -i
/home/dspace/bin/make-handle-config
Step 3 - Send handle request email
Mail the file:
/home/dspace/handle-server/sitebndl.zip
to
hdladmin@cnri.reston.va.us
They will quickly create your global identifier and email you with the appropriate information.
Tip: Save the file to your USB stick and mail it from your default workstation.
Step 4 - Update handle server config file
After payment to CNRI and confirmation of the server registration by CNRI, then complete the following.
Step 1
Once you receive the email, print a copy on your default workstation then login to your Dspace server with Ubuntu as the "dspace" user.
Step 2
Open the handle config file.
sudo nano /home/dspace/handle-server/config.dct
Step 3
Replace all mention of 300:0.NA/123456789 with the handle of your server.
For example
300:0.NA/123456789
Became
300:0.NA/11105
For our http://ar1.sun.ac.za server.
Step 4
Copy and paste the following to the file to create a regular log per week if not already specified during setup above.
"log_save_config" = {
"log_save_weekday" = "Sunday"
"log_save_time" = "00:00:00"
"log_save_directory" = "/home/dspace/handle-server"
"log_save_interval" = "Weekly"
}
- NANO Editor Help
- Save the file by typing CTL+O and then pressing Enter.
- To exit "nano" type CTL+X.
- Delete line = CTL+K
- Undelete line = CTL+U
- Search = CTL+W
- Search and replace = CTL+\
- More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Sample "config.dct"
root@ar1:~# cat /home/dspace/handle-server/config.dct
{
"hdl_http_config" = {
"bind_address" = "146.232.21.83"
"num_threads" = "15"
"bind_port" = "8000"
"backlog" = "5"
"log_accesses" = "no"
}
"server_type" = "server"
"hdl_udp_config" = {
"bind_address" = "146.232.21.83"
"num_threads" = "15"
"bind_port" = "2641"
"log_accesses" = "no"
}
"hdl_tcp_config" = {
"bind_address" = "146.232.21.83"
"num_threads" = "15"
"bind_port" = "2641"
"backlog" = "5"
"log_accesses" = "no"
}
"log_save_config" = {
"log_save_weekday" = "Sunday"
"log_save_time" = "00:00:00"
"log_save_directory" = "/home/dspace/handle-server"
"log_save_interval" = "Weekly"
}
"no_udp_resolution" = "n"
"interfaces" = (
"hdl_udp"
"hdl_tcp"
"hdl_http"
)
"server_config" = {
"storage_type" = "CUSTOM"
"storage_class" = "org.dspace.handle.HandlePlugin"
"server_admins" = (
"300:0.NA/11105"
)
"replication_admins" = (
"300:0.NA/11105"
)
"max_session_time" = "86400000"
"this_server_id" = "1"
"max_auth_time" = "60000"
"backup_admins" = (
"300:0.NA/11105"
)
"case_sensitive" = "no"
}
}
Step 5 - Update DSpace config file
Step 1
Open the DSpace config file as follows:
nano /home/dspace/dspace-1.8.2-src-release/dspace/config/dspace.cfg
Update the handle prefix parameter with the handle number assigned to you as follows:
handle.prefix = XXXXXX
Replace the XXXXXX with your handle number. For example in our case, the line reads handle.prefix = 10019.1
Step 2
Update the handle server location folder parameter:
handle.dir = /home/dspace/handle-server
- NANO Editor Help
- Save the file by typing CTL+O and then pressing Enter.
- To exit "nano" type CTL+X.
- Delete line = CTL+K
- Undelete line = CTL+U
- Search = CTL+W
- Search and replace = CTL+\
- More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Step 6 - Rebuild DSpace
Rebuild the DSpace webapps using the custom rebuild script.
Step 7 - Update handle prefixes
If you need to update the handle prefix on items created before the registration process you can run the /home/dspace/bin/dspace update-handle-prefix script. You may need to do this if you loaded items prior to CNRI registration (e.g. setting up a demonstration system prior to migrating it to production). The script takes the current and new prefix as parameters. For example:
/home/dspace/bin/dspace update-handle-prefix 123456789 1303
will change any handles currently assigned prefix 123456789 to prefix 1303, so for example handle 123456789/23 will be updated to 1303/23 in the database.
Step 8 - Firewall Ports
Open ports 8000 and 2641 for internet access by the handle server on your local server and on the campus firewall. Check the firewall page.
Please note: Port 2641 is opened to listen via udp and tcp. Make sure your campus firewall administrator is aware of this.
Step 9 - Java environment
Step 10 - Start handle server
The handle server is only started during a boot up of the server. This is to prevent too many instances of the server running at the same time.
Type the following to start your handle server when the server boots up:
sudo nano /etc/rc.local
Copy and paste the following into a blank space in the file before the "exit" statement:
/home/dspace/bin/start-handle-server
- NANO Editor Help
- Save the file by typing CTL+O and then pressing Enter.
- To exit "nano" type CTL+X.
- Delete line = CTL+K
- Undelete line = CTL+U
- Search = CTL+W
- Search and replace = CTL+\
- More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Step 11 - Check for correct operation
Reboot your DSpace server to check that the handle server will start-up when the server is rebooted. Then check operation as follows after logging into the remote server as the "dspace" user:
Handle service
Type the following as the root user, to see if the handle service is running:
(Only one instance must be running - check the log file)
sudo ps ax | grep handle
See sample output below.
dspace@ar1:~/handle-server$ sudo ps ax | grep handle 4953 ? Sl 0:04 java -Djava.awt.headless=true >>> etc..
Notice that there is a process id assigned (PID). There should only be one PID.
Handle config
After the reboot and after the handle server has registered itself, there should be the following file.
ls -l /root/.handle/root_info
Handle log
If not, check the error logs.
nano /home/dspace/handle-server/error.log
Rebuild config
Rebuild the config by typing.
sudo /home/dspace/bin/make-handle-config
Start service manually
Type the following to start the server manually.
sudo /home/dspace/bin/start-handle-server
Example listing of files in "/home/dspace/handle-server" folder
See below.
dspace@ar1:~/handle-server$ ls -l total 60 -rw-r--r-- 1 root root 335 Oct 18 12:28 admpriv.bin -rw-r--r-- 1 root root 440 Oct 18 12:28 admpub.bin -rw-r--r-- 1 root root 16402 Oct 31 14:40 cache.jdb -rw-r--r-- 1 root root 1000 Oct 31 14:39 config.dct -rw-r--r-- 1 root root 182 Oct 31 14:36 contactdata.dct -rw-r--r-- 1 root root 339 Oct 31 14:40 error.log-20121028 -rw-r--r-- 1 root root 335 Oct 18 12:28 privkey.bin -rw-r--r-- 1 root root 441 Oct 18 12:28 pubkey.bin -rw-r--r-- 1 root root 1578 Oct 31 14:36 sitebndl.zip -rw-r--r-- 1 root root 519 Oct 31 14:36 siteinfo.bin drwxr-xr-x 2 root root 4096 Oct 31 14:40 txns
Command Line Help
Go to: http://www.ubuntu.sun.ac.za/wiki/index.php/SelfHelp for more help about the command line programs used in this procedure.
References
- http://www.handle.net/hs_manual/server_manual_6.html#SEC47
- https://wiki.duraspace.org/display/DSDOC3x/Installation#Installation-TheHandleServer
- https://wiki.duraspace.org/display/DSDOC18/Installation#Installation-TheHandleServer
- https://wiki.duraspace.org/display/DSDOC17/Installation#Installation-TheHandleServer
- http://www.dspace.org/1_6_2Documentation/ch03.html#N10C23
- http://wiki.datadryad.org/Handle_Server_Technology
Back to After Installation Tasks