Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 Do uruchomienia serwera systemu dLibra nie jest niezbędne posiadanie pliku licencji. W takim przypadku serwer zostanie uruchomiony z ograniczeniami uniemożliwiającymi utworzenie więcej niż trzech publikacji oraz trzech kont użytkowników. Jeżeli w systemie dLibra istnieją już obiekty (publikacje lub użytkownicy), których liczba przekracza ustalone limity, system zostanie uruchomiony lecz nie będzie można dodawać nowych obiektów.
Aby uruchomić serwer bez ograniczeń, należy dostarczyć stosowny plik licencji. Taki plik należy wygenerować samodzielnie korzystając z Panelu użytkownika (https://dl.psnc.pl/dlcrm/user). Dostęp do Panelu użytkownika możliwy jest po podaniu nazwy użytkownika i hasła, identycznego jak w przypadku dostępu do repozytorium dystrybucji. Dane dostępowe można uzyskać kontaktując się z pomocą techniczną zespołu dLibra.

Przed wygenerowaniem pliku licencji należy:

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,

  • w pliku server.xml jako wartość parametru serverHost podać adres IP lub nazwę domenową serwera
  • uruchomić serwer systemu dLibra.

    Info
    titleAdres The IP/nazwa domenowa zawarty w parametrze Domain Name Address Included in the _serverHost_ Parameter
    Adres

    The IP/

    nazwa domenowa zawarty w parametrze serverHost jest wykorzystywany przez serwer do komunikacji z aplikacjami klienckimi. Tak więc powinien tam być zawarty taki adres, który będzie mógł być wykorzystany przez aplikacje klienckie znajdujące się na innych maszynach. W związku z tym nie należy używać np. adresu

    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.


Po uruchomieniu serwera systemu dLibra w katalogu After the dLibra system has been started up, file services.dat will be created in the dlibra-server/conf zostanie utworzony plik services.dat. Plik ten jest niezbędny do wygenerowania licencji. Korzystając z zakładki Licencje w Panelu użytkownika 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) należy wskazać plik , file services.dat should be indicated, a następnie wygenerować plik licencji za pomocą przycisku Generuj. Na liście licencji pojawi się odnośnik, pozwalający na pobranie pliku licencji. Plik należy umieścić w katalogu domowym użytkownika, który będzie uruchamiał serwer dLibra.

 

Uruchamianie serwera

...

W trakcie normalnej pracy serwer powinien być uruchomiony w trybie usługi. Nie wymaga on wtedy, aby jakikolwiek użytkownik był zalogowany na komputerze, na którym uruchomiono serwer, a wszystkie informacje o pracy serwera trafiają do plików znajdujących się w podkatalogu logs katalogu głównego serwera. Uruchamianie serwera jako usługi w poszczególnych systemach operacyjnych opisano poniżej.

 

UNIX/Linux

...

  • start - uruchamia serwer dLibra w trybie usługi,
  • stop - zatrzymuje działający serwer dLibra,
  • restart - restartuje działający serwer dLibra,
  • console - uruchamia serwer dLibra w trybie konsolowym (patrz niżej).

 

MS Windows

...

  • start - uruchamia serwer dLibra w trybie usługi,
  • stop - zatrzymuje działający serwer dLibra,
  • restart - restartuje działający serwer dLibra,
  • install - serwer dLibra jako usługę systemu operacyjnego,
  • remove - wyrejestrowuje serwer dLibra z listy usług systemu operacyjnego,
  • console - uruchamia serwer dLibra w trybie konsolowym (patrz niżej).

 

MS Windows 64-bit

...

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. 
Image Added


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

  • installService.bat - instaluje serwer dLibra jako usługę,
  • runConsole.bat - uruchamia serwer dLibra w trybie konsoli,
  • startService.bat - uruchamia serwer dLibra w trybie usługi,
  • stopService.bat - zatrzymuje usługę serwera dLibra,
  • uninstallService.bat - wyrejestrowuje usługę serwera dLibra,
  • systemTrayIcon.bat - uruchamia ikonkę systemową dla serwera dLibra (serwer musi być wcześniej uruchomiony); za pomocą odpowiednich pozycji w menu i / lub graficznej konsoli możliwe są operacje uruchamiania, restartowania, itp. serwera dLibra.

Podczas uruchamiania serwera dLibra w środowisku 64-bit częściowo wykorzystywane są inne pliki konfiguracyjne. Są to pliki znajdujące się w podkatalogu conf/wrapper katalogu serwera, których nazwa kończy się ciągiem znaków yajsw. W pliku base-yajsw.conf należy podać parametry niezbędne do uruchomienia Javy analogicznie jak w pliku base.conf.

...

Przykładowy efekt uruchomienia serwera w tym trybie widoczny jest na poniższym obrazku.
Image Removed

Oznaką poprawnego uruchomienia serwera jest pojawienie się w logach następującego komunikatu:


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


Przerwanie pracy serwera w trybie konsolowym można uzyskać naciskając kombinację klawiszy While the server is running in the console mode, the user can interrupt it by pressing the Ctrl + C . Przed uruchomieniem serwera w trybie usługi zaleca się sprawdzenie jego działania w trybie konsolowym.

Inicjalizacja bazy danych

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 “Przy pierwszym uruchomieniu serwer systemu dLibra spróbuje samodzielnie zainicjować bazę danych bazując na podanych wcześniej parametrach konfiguracyjnych. Niezbędnym warunkiem rozpoczęcia inicjalizacji bazy danych jest istnienie w podkatalogu conf katalogu głównego serwera pliku o nazwie database-init.properties z wpisem init-scripts-path=<ścieżka <sciezka do katalogu ze skryptami inicjującymi>. Skrypty te domyślnie znajdują się w podkatalogu install-sql katalogu głównego serwera. Ścieżka może być zapisana w sposób bezwzględny lub względnie w stosunku do katalogu głównego serwera. Po udanej inicjalizacji bazy danych serwer usuwa plik database-init.properties. Jeżeli zajdzie potrzeba ponownej inicjalizacji bazy danych należy taki plik utworzyć samodzielnie i zrestartować serwer.

Gdyby zaszła konieczność samodzielnego inicjowania bazy danych, należy skorzystać ze skryptów znajdujących się we wspomnianym katalogu install-sql. W katalogu tym znajdują się podzielone na podkatalogi:

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 servicespliki do tworzenia struktury bazy danych dla poszczególnych usług

    No Format
    [id.usługi]/[id.usługi]-[numer.wersji]-[rodzaj.bazy]-schema-create.sql
    


  • grupa plików do usuwania bazy danych dla poszczególnych usługa group of files for deleting the database for particular services

    No Format
    [id.usługi]/[id.usługi]-[numer.wersji]-[rodzaj.bazy]-schema-drop.sql
    


  • grupa plików do inicjowania zawartości bazy danych dla tych usług, które tego wymagająa group of files for initiating the content of the database for those services which require that

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


Pliki te są zapisane w kodowaniu Those files are saved as UTF-8 i niezbędne jest, aby dane w nich zawarte zostały wprowadzone do bazy danych tak, aby nie nastąpiło przekłamanie związane ze zmianą kodowania znaków. Przykładowe oprogramowanie umożliwiające wprowadzenie takich danych do wielu różnych rodzajów baz danych to bezpłatny SQuirreL SQL bazujący na języku Java i protokole JDBC., 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 outW celu samodzielnego przygotowania bazy danych dla serwera systemu dLibra, należy najpierw stworzyć struktury bazy danych dla poszczególnych usług (pliki posiadające w nazwie schema-create.sql), a następnie wypełnić je danymi początkowymi (pliki posiadające w nazwie init.sql). Kolejność usług nie jest w tym wypadku istotna. Sposób wykonania opisanych wyżej poleceń zależał będzie od użytej bazy danych oraz od oprogramowania zainstalowanego na komputerze, z którego przeprowadzana będzie ta operacja.