Skip to main content

Publishing server - Additional installation options

1. Installation by Command Line

Installation can also be called by command line as follows:

$priint_path\update\bin\silent-install.bat <installation-settings-file>

installation-settings-file is an XML file containing all necessary property settings to run an installation of publishing server. In fact the wizard based installation will write a file $priint\_path\\etc\\settings.install.xml and execute it this way.

Typical use case for the command line based installation is either to run unattended installations or to use special installation options not available through the wizard.

1.1. How to use command line installer

If you want to use the command line tool yourself the following approach is strongly recommended:

  1. Start wizard based installation and complete all pages
  2. On last page do not click the "Install" button but click "Save" to save the installation configuration to disk.
  3. Open the file settings.install.xml in a text editor and modify it according to your needs.
  4. Run the command line tool using your modified file.

2. Default Credentials

Credentials

ServerUserPassword
Local MySQL Database (root access)root@localhostrootroot
Database user in Glassfish (glassfish connection pool)priintadmin@localhostComet4
Glassfish AdministrationadminComet4
publishing serveradminwerk2admin

Older Versions In old versions of devstack (4.0.3 and before) MySQL had a "root" user with empty password and an "admin" user with password "Comet4". Some installations used different users for every database (same name as database with password "Comet4").

3. Network Ports

Since you may use priint:publishing hub developer stack together with other web development projects, we do not use the default ports for the difference services like Glassfish, MySQL or Apache. Since we are developing for the output system priint:comet no 4, we transferred all ports into the 40.000 region, so prefixed with 4 (or 40 or 400).

ServerService NameDefaultDevStackComment
Local MySQL Databasemysql demon330643306
Glassfish Domainhttp admin_listener484840048
http_listener808040080
https_listener818140081Not configured by default. Needs a valid certificate when used in production.
debugger900940009Only running if Glassfish was started with option "--debug".

4. Additional Installer Options

The following options can be used in settings.install.xml to control a new installation or in settings.local.bat to control an already existing installation.

4.1. Path to local database installation

Used if database server is on local machine (same machine as Glassfish). DBPath points to directory where database (or database tools) are installed. Typically:

SET DBPath=%DevstackPath%databaseMySQL

4.2. Address of Database Server

Remote address and port of database server.

SET DBHost=localhost
SET DBPort=43306

4.3. Credentials of Database Root User

Credentials are used in combination scripts that need root access to local database. Especially start/stop database server, create new database or user. Not used in remote database installations.

SET DBAdminUser=sa
SET DBAdminPassword=changeme

4.4. Credentials of Database User for Glassfish Access

Database account credentials to connect to databases from Glassfish. This password will be stored in plain text in settings.local.bat as well as in domain.xml of Glassfish domain.

SET DBUser=priintadmin
SET DBPassword=changeme

4.5. Local MySQL Settings

MySQLService variable contains name of MySQL Service for Windows.Setting MySQLService to an empty string means run as user application and not as Windows service.

You can set MySQL credentials explicitly and thereby overwriting DBUser, DBPassword, etc. This is useful in situations in scenarios with more than one RDBMS. E.g. when the local MySQL is used for PubServerKernel database and PublishingHubDB is run from an MSSQL server configured via DBType, DBUser etc.

SET MySQLService=PubServer\_MySQL

SET MySQLUser=priintadmin
SET MySQLPassword=priintadmin
SET MySQLAdminUser=root
SET MySQLAdminPassword=rootroot

4.6. Specific Database Settings

Each database can be set to individual settings.The setting names are constructed by: DB + <Setting> + <DatabaseUnit>. Settings are Type, Database, User, Password, AdminUser, AdminPassword, Instance, Host, Port. DatabaseUnits are PubServerKernel, PublishingHubDB, Comet4Admin, Comet4Data, Comet4Import. PublishingHubDB and Comet4Data can have several instances, The instances are numbered in sequence, e.g. PublishingHubDB, PublishingHubDB2, PublishingHubDB3, etc.

Example 1: Special settings adding two more comet data database.

SET DBDatabaseComet4Data2=priint\_comet\_data2
SET DBDatabaseComet4Data3=priint\_comet\_data3

Example 2: Special settings first PublishingHubDB database.

SET DBTypePublishingHubDB=MSSQL
SET DBDatabasePublishingHubDB=test\_PublishingHubDB
SET DBHostPublishingHubDB=dbserver03
SET DBPortPublishingHubDB=
SET DBInstancePublishingHubDB=test\_inst
SET DBUserPublishingHubDB=testuser
SET DBPasswordPublishingHubDB=\*\*\*\*\*\*

4.7. Glassfish Settings

GlassfishService variable contains the name of the Glassfish Service for Windows. Setting GlassfishService to an empty string means run as user application and not as Windows service.

GlassfishPortBase is only used when creating a domain from scratch during installation. For Glassfish default ports (8080 and 4848) set port base to empty string.

Glassfish admin credentials are copied to glassfish3.password.txt that is used in the starting process of Glassfish and for all other administrative tasks.

GlassfishDomainName is set to "pubserver". Do not change this setting.

SET GlassfishService=PubServer\_Glassfish
SET GlassfishPortBase=40000
SET GlassfishHttpPort=40080
SET GlassfishHttpsPort=40081
SET GlassfishAdminPort=40048
SET GlassfishUser=admin
SET GlassfishPassword=Comet4
SET GlassfishDomainName=pubserver

4.8. Credentials for Publishing Server

Admin user credentials used for publishing server and ison. These values will be used from the devstack update process, when checking-in files into the repository.

If you want to change this please read Section "Changing Password of publishing server Admin User".

SET PubserverUser=admin
SET PubserverPassword=werk2admin

4.9. Using ison in a multi-user environment

If different users may work concurrently with ison on the same machine you should modify the default workspace location. Please open settings.local.bat and add the line:

SET WorkspacePath=%UserProfile%ison-Workspace

5. Manual Installation of Databases

Manual installation of databases is required when using remote databases. This is typically a job of the database administrator of your organization.

Databases and db users have to be created BEFORE executing the Pubserver installation or update process.

Use the database tool of your choice (e.g. "MySQL Workbench" or "SQLDeveloper Studio"). Connect to your database server using root user ("root" on MySQL, "sa" on MSSQL).

Database scripts can be generated by the installation wizard: Say Download SQL" on the database tab. It will compile all needed SQL scripts into one file using the settings of the dialog.

Database scripts can also be executed from base file in the installation package: In each update package you will find a folder containing database administration SQL scripts. E.g. "database<DBTYPE>data".

For each database you need please execute the "install" and the "create" and "initialdata" scripts: Here an example using SQLSERVER and PubServerKernel database.

  • Adding the database and user
    • execute ..install.sql e.g. PubServerKernel.MSSQL.install.sql
  • Adding the database schema and initial data
    • execute ..create.sql and ..initialdata.sql e.g.
      • PubServerKernel.MSSQL.create.sql
      • PubServerKernel.MSSQL.initialdata.sql
  • Change Password for "priintadmin"
    • Scripts contain hard coded user name and password (usr=priintadmin, pwd=Comet4). Change password according to your needs. Different database tools have different ways to do this.

Have in mind, that later updates to the database again may require help from your database admin.

6. Running Glassfish and MySQL as Windows Service

If the variables GlassfishService and MySQLService in settings.local.bat are set to empty strings this means that applications will run in normal user mode. This is the default settings.

Important: Glassfish Service starter requires .NET Framework 3.5. This is not installed per default on Windows 2012 Servers. You will have to install it as a Feature (see https://technet.microsoft.com/en-us/library/dn482071.aspx for Details)

Screenshot of .NET 3.5 Installation on Windows 2012

After you have ensured that .NET 3.5 is installed on your system you can install Glassfish and MySQL as Windows service:

  • Do a default installation and check everything in user application mode first
  • Stop the publishing server (Glassfish and MySQL)
  • Add the following to settings.local.bat
    • SET GlassfishService=PubServer_Glassfish SET MySQLService=PubServer_MySQL
  • Run the following batch scripts from folder /etc with admin privileges
    • glassfish3.service.create.bat This will setup the Windows service and add a system environmental variable AS_JAVA (see note on JDK)
    • mysql.service.create.bat

Skip MySQL parts if you don't need MySQL.

Services are established in a simple way using .LocalSystem as user and no restrictive file permissions. If this does not fit the security policies of you organization you should change it accordingly.

Note on JDK Glassfish uses the system environment variable AS_JAVA to get the location of JDK if run as service. This is set by glassfish3.service.create.bat automatically to the devstack JDK. You can use this variable to point to another JDK version on your system. This can be helpful if you have implemented a organization wide policy for JDK updates. But be aware that WERK II does not necessarily test every JDK version provided by Oracle.

Note on Uninstall To un-install Glassfish and MySQL as Windows service:

  • Stop the publishing server (Glassfish and MySQL)
  • Run the following batch scripts from folder /etc with admin privileges
    • glassfish3.service.remove.bat This will remove the Windows service and optionally removes the system environmental variable AS_JAVA (see note on JDK)
    • mysql.service.remove.bat
  • Add the following to settings.local.bat
      SET GlassfishService=
    SET MySQLService=