You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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 main 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


Użytkownik może uruchomić skrypt dlibra-server.bat znajdujący się w katalogu głównym serwera z następującymi parametrami:

  • 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


W wersji 5.0 serwer dLibry zyskał możliwość uruchamiania w 64-bitowym środowisku MS Windows. Dodatkowym wymaganiem jest zainstalowana Java w wersji 64-bit. W celu uruchomienia serwera dLibra należy skorzystać ze skryptów zebranych w katalogu bat umieszczonego w katalogu głównym serwera:

  • 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.


Tryb wyświetlania komunikatów na konsolę przeznaczony jest do diagnostycznych uruchomień serwera. Aby uruchomić serwer w tym trybie należy w katalogu głównym serwera wydać polecenie dlibra-server.bat console dla systemów z rodziny MS Windows lub ./dlibra-server.sh console dla systemów UNIX/Linux.

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


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 Ctrl+C. Przed uruchomieniem serwera w trybie usługi zaleca się sprawdzenie jego działania w trybie konsolowym.

Inicjalizacja bazy danych

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 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:

  • pliki do tworzenia struktury bazy danych dla poszczególnych usług

    [id.usługi]/[id.usługi]-[numer.wersji]-[rodzaj.bazy]-schema-create.sql
    
  • grupa plików do usuwania bazy danych dla poszczególnych usług

    [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ą

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

Pliki te są zapisane w kodowaniu 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.

W 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.

  • No labels