Page tree
Skip to end of metadata
Go to start of metadata

NOTE

If the server makes use of an external database, then the first action during the starting up of the dLibra system should be starting up an instance of that database.

 

The dLibra License System


A license file is not required for starting up the dLibra system. Without a license file, the server will be started up with restrictions, which will make it impossible to create more than three publications and three user accounts. If there are already more objects (publications or users) in the dLibra system than the allowed number mentioned above, the system will be started up, but it will not be possible to add any more objects.

In order to start up the server without restrictions, an appropriate license file should be provided. That file should be generated by the user in the “User panel(https://dl.psnc.pl/dlcrm/user). The user can access the “User panel” by entering the username and password, identical as the ones for the distribution repository. The user can obtain the access data by contacting the technical support of the dLibra system.

The following actions must be carried out before the license file is generated:

  • entering the server IP address or domain name in the server.xml file, as the value of the serverHost parameter, and
  • starting up the dLibra system server,

    The IP/Domain Name Address Included in the _serverHost_ Parameter

    The IP/domain name address included in the serverHost parameter is used by the server to communicate with client applications. Therefore, it should be an address which can be used by client applications on other machines – it should not be, for example, 127.0.0.1.

After the dLibra system has been started up, file services.dat will be created in the dlibra-server/conf catalog. That file is necessary for generating a license. With the use of the “Licenses” tab in the “User panel” (https://dl.psnc.pl/dlcrm/user) , file services.dat should be indicated, and then a license file should be generated with the help of the “Generate” button. On the license list, there will appear a link for downloading the license file. That file should be placed in the home directory of the user who will be starting up the dLibra server.

Starting up the Server

The dLibra server can run in one of two modes: the service mode or the console message display mode.

During normal work, the server should run in the service mode. In such circumstances, there is no need for the user to be logged on the computer on which the server is running, and all information about the server work are passed on to files in the “logs” subdirectory of the root directory. Running the server as a service in particular operating systems is described below.

UNIX/Linux


The user can run the dlibra-server.sh script in the root directory of the server, with the following parameters:

  • start – runs the dLibra server in the service mode,
  • stop – stops the running dLibra server,
  • restart – restarts the running dLibra server, and
  • console – runs the dLibra server in the console mode (see below).


MS Windows

The user can run the dlibra-server.bat script in the root directory of the server, with the following parameters:

  • start – runs the dLibra server in the service mode,
  • stop – stops the running dLibra server,
  • restart – restarts the running dLibra server, and
  • install – installs the dLibra server as a service of the operating system,
  • remove – deregisters the dLibra server from the list of the services of the operating system,
  • console – runs the dLibra server in the console mode (see below).
MS Windows 64-bit


Since version 5.0, the dLibra server has been able to run in 64-bit MS Windows. There is an additional requirement that 64-bit Java be installed. In order to run the dLibra system, use the scripts collected in the bat catalog in the root directory of the server:

  • installService.bat – installs the dLibra server as a service,
  • runConsole.bat – runs the dLibra server in the console mode,
  • startServlce.bat – runs the dLibra server in the service mode,
  • stopServlce.bat – stops the dLibra server service,
  • unlnstallServlce.bat – deregisters the dLibra server service,
  • systemTraylcon.bat – runs the system icon for the dLibra server (the server must be running); with the use of appropriate items on the menu and/or in the graphics console, it is possible to run, restart, etc. the dLibra server.

While the dLibra server is being started up in a 64-bit environment, some other configuration files are used.  They are in the “conf/wrapper” subdirectory of the server directory and end with the yajsw string.  In the “base-yajsw.conf” file, the parameters necessary for running Java should be entered, in analogy to the “base.conf” file.

The message to console display mode is for diagnostic running of the server. In order to run the server in that mode in systems from the MS Windows family, command dlibra-server.bat console should be given in the root directory of the server; for UNIX/Linux systems, command ,/dlibra-server.sh console should be used.


A sample effect of running the server in that mode. is illustrated below. 


When the server is run correctly, the following message appears in the logs:


jvm 1 | INFO: Server startup in..... ms


While the server is running in the console mode, the user can interrupt it by pressing the Ctrl + C key combination. Before starting up the server in the service mode, it is recommended to check how it works in the console mode.

Initiating the Database

When the dLibra server is run for the first time, it tries to initiate the database on its own, based on the previously defined configuration parameters. For the database to be initiated, there must be file “database-init.properties” in the “conf” subdirectory of the root directory of the server, with the “init-scripts-path=<sciezka do katalogu ze skryptami inicjujacymi>” sequence of characters in it. By default, those scripts are in the “install-sql” subdirectory of the root directory of the server. The path can be saved in an absolute or relative manner with respect to the root directory of the server. After a successful initialization of the database, the server deletes the “database-init.properties” file. If the database has to be initiated again, the user must create such a file on the user’s own and restart the server.

If the user has to initiate the database on the user’s own, the scripts from the “install-sql” directory should be used. In that directory, there are the following files (divided into subdirectories):


  • files for creating database structures for particular services

    [id.usługi]/[id.usługi]-[numer.wersji]-[rodzaj.bazy]-schema-create.sql
    
  • a group of files for deleting the database for particular services

    [id.usługi]/[id.usługi]-[numer.wersji]-[rodzaj.bazy]-schema-drop.sql
    
  • a group of files for initiating the content of the database for those services which require that

    [id.usługi]/[id.usługi]-[numer.wersji]-[rodzaj.bazy]-data-init.sql
    

Those files are saved as UTF-8, and the data in them must be entered to the database without defects resulting from a change of the character encoding. One example of software which makes it possible to enter such data into many kinds of databases is the free “SQuirreL SQL” software based on the Java language and on the JDBC protocol.

To initiate the database on the user’s own, the user should first create the database structures for particular services (files containing the schema-create.sql sequence of characters in their names) and then fill it in with initial data (files containing the init.sql sequence of characters in their names). The order of the services is immaterial here. The way in which those tasks will be done will depend on the database in use and on the software installed on the computer from which the operation will be carried out.

  • No labels