How to Install Default LOCALBASE (View System Only)

Author: Hirohisa Mori / joshua@globalbase.org + Tomohito Nakajima / nakajima@zeta.co.jp / ZETA Co. + [Transrate]Reiko Inoue Bendtsen c/o Suzaku Translations / (http://www.suzaku-translations.com/) +

* Abstract
* System Requirements
* [Step 1] Preparation of Package
* [Step 2] Setting of gbview
* [Step 3] Setting of httpagent
* [Step 4] -
* [Step 5] Setting of HTTP-GATEWAY
* [Step 6] Setting of Apache
* [Step 7] Connection of HTTP-GATEWAY and xl Server
* [Step 8] Embedding Text
* [Step 9] Final Confirmation

Abstract

This section explains how to install LOCALBASE with the default settings. The goal is to be able to launch the gbview agent and make settings in HTTP-GATEWAY such that one ( old) map is set to be displayed automatically at startup. In this setup, only the viewing functions are installed.

[UP] Go To Page Top

System Requirements

  1. GLOBALBASE Requirements
    The LANDSCAPE GLOBALBASE server must be installed on your PC. If it has not been intalled yet, please refer to Document "LANDSCAPE Startup Manual"for how to install the server.
    We recommend you to use the source code of ver.B.b10 or later for this installation.
  2. WWW Server Requirements
    Since HTTP-GATEWAY operates on a WWW server, an appropriate WWW server must be running. The WWW server does not necessarily have to be running on the same machine as the one on which the GLOBALBASE xl server is running, however; two different machines can easily be used, as far as HTTP-GATEWAY can connect to the XL server via the TCP/IP protocol.
    Since it is necessary to assign different port numbers to the LANDSCAPE and HTTP-GATEWAY servers, please refer to "Precautions on Configuration of LOCALBASE Server"and select the server setup etc. carefully.
    HTTP-GATEWAY must be able to run perl scripts as well as CGI scripts written in perl. The WWW server must have a perl interpreter installed that can operate on folders where CGI operations are allowed. Please refer to the relevant manuals and other materials for instructions on how to install perl, how to set CGI script permissions on WWW servers etc.


[UP] Go To Page Top

[Step 1] Preparation of Package

First, prepare and run the install script for HTTP-GATEWAY.

In Case LANDSCAPE Version is Earlier than ver.B.b11

>From the GLOBALBASE Website, download the source code package file called ver.B.XX.XX.tar.gz and decompress it. Find the directory called gateway in the ver.B.XX.XX/www directory. This is the directory that corresponds to the gateway directory used in versions ver.B.b11 and later; follow the installation method explained in the next section to proceed after decompressing the file. Please refer to the Download Manual [UNDEF REF (download)]for how to download the source code.

In Case LANDSCAPE Version is ver.B.b11 to ver.B.b16.10

If the installed LANDSCAPE server is ver.B.b11 or later, the HTTP-GATEWAY install script is stored in /usr/local/xl-gbs/xlsample/www/gateway.

Copy the gateway directory in /usr/local/xl-gbs/xlsample/www or in the decompressed directory of the downloaded source code to the prescribed location in the WWW server. For example:

$ cp -r ..../gateway hogehoge
 

hogehoge must be located in the directory from which the WWW server publishes contents. You will find two files called gateway/main.cgi and gateway/main.html, respectively. These files are used to generate the access page of HTTP-GATEWAY.

In Case LANDSCAPE Version is ver.B.b16.11 or later

The structure of /usr/local/xl-gbs/xlsample/www/gateway is different from that of the earlier versions. Under the gateway directory, there are the following three directories and README.

base
confs
packages
 

Under the packages directory, you will find two directories, aqua and skeleton, along with their subdirectories. Select and copy your favorite style from these directories. For example, in order to select the style in the packages/aqua/black directory, enter:

$ cp -r ..../gateway/packages/aqua/black hogehoge
 

In the copy destination, the files named main.cgi and main.html are used to generate the access page of HTTP-GATEWAY.

[UP] Go To Page Top

[Step 2] Setting of gbview

Edit the data in agent.definition.xl, which is located in the LANDSCAPE setting information directory, xlconf/std ( /usr/local/xl-gbs/xlconf/std in case of the default installation ) . This allows the xl server to launch gbview. In the default status of the xl server, the following code is commented out.

<!--
   <DefineAgent passwd="anonymous" dircheck="on">
	nichibun.ac.jp
	gbview
	user
	<CurrentEnvironment/>
	<Lambda Order="Applicative"> ()
		<Argments> ^"^host ^agent ^mode ^user" </Argments>
		^"(+ "gbview xlscript/gbs/a_gbview.xl / " mode " " user)"
	</Lambda>
   </DefineAgent>
-->
 

Remove the comment tags, i.e., <!-- and -->.

[MEMO] At this point, it does not matter whether "nichibun.ac.jp" is changed or not.


[UP] Go To Page Top

[Step 3] Setting of httpagent

Make sure that the httpagent function of the XL server is enabled. The function is enabled if a file named xlconf/std/httpagent.xl exists. Please refer to the xlsv Agenet Manual [UNDEF REF (xlsv-HttpAgent)]for the detailed information of the httpagent function of the XL server.

[UP] Go To Page Top

[Step 4] -

After the above steps, switch to superuser mode ( root) and reboot the xl server as follows:

# /etc/init.d/launch-xl stop
# /etc/init.d/launch-xl start
 

Please refer to the xl Server Manual [UNDEF REF (xlsv)]for the detailed information.

[CHECK] The server is running normally if a ps shell command shows two xlsv processes, two gbmp processes, two xllock processes and one gbview process running. Please note that the gbview process is launched slightly delayed compared to the others ( approximately 10seconds).


[UP] Go To Page Top

[Step 5] Setting of HTTP-GATEWAY

Decompress the source code you have downloaded in advance. Decompress ver.B.XX.tar.gz to an appropriate directory. ver.B.XX/www/gateway contains all the relevant HTTP-GATEWAY code; copy this directory to apache or another public directory of the WWW server.

After installing LANDSCAPE of ver.B.b16.12 and later, you will find several templates under /usr/local/xl-gbs/xlsamples/www/gateway/packages; please refer to "Display Styles of HTTP-GATEWAY"to check the styles. Each template directory has been named according to the format /usr/local/xl-gbs/xlsamples/www/gateway/packages/[styleName1]/[styleName2]. In case of package versions earlier than ver.B.b16.10, the corresponding directory is named /usr/local/xl-gbs/xlsamples/www/gateway/packages/old/skeleton. For example, if you would like to use the style indicated in the figure with the aqua/blue caption, the corresponding template is /usr/local/xl-gbs/xlsamples/www/gateway/packages/aqua/blue.

When you have decided upon a style, copy the template to the appropriate directory in the webserver publishing tree. For example, if you want to publish the Website of HTTP-GATEWAY using the URL http://hogehoge/gateway/main.html, copy the template as follows:

$ cp /usr/local/xl-gbs/xlsamples/www/gateway/packages/[styleName1]/[styleName2] hogehoge/gateway
 

( Note that it may be necessary to modify the hogehoge section so that it matches the directory structure set for your Apache server setup)

[UP] Go To Page Top

[Step 6] Setting of Apache

As already explained in the System Requirements section, the copy destination directory must allow execution of CGI and perl scripts. If these operations are not permitted, make the following settings in Apache.

First, move the working diretory to the hogehoge/gateway directly.

[MEMO] The permission flag above is already set if you are using xlsamples/gateway of ver.B.b13.01 or later.
In ver.B.b16.11, the permissions are pre-set for all sample files, but in versions earlier than that, you need to make sure that the correct permissions ( executable by users accessing via HTTP, which is normally not allowed in Apache ) are set for all files with extention .cgi . Furthermore, if you are setting up a Website that allows file upload, permit write access to the posted directory and edit/postedNum.txt as well.

chmod 755 *.cgi
chmod 755 edit/*.cgi
chmod 777 posted
chmod 666 edit/postedNum.txt
 

Note that the path setting of perl may vary depending on the OS. In case the path setting is inappropriate, the error "Illegal perl path setting etc." is generated if the gateway window is accessed via HTTP. In this case, it is possible to rewrite all the paths by executing the following shell command in the directory where the gateway samples are stored. In the example below, it is assumed that the path environment variable is set to /usr/bin/perl ; modify as required.

find . -name '*.cgi' -exec /usr/local/xl-gbs/xlscript/bin/replace {} /usr/local/bin/perl /usr/bin/perl \;
 

If you install the source code in a directory where execution is not permitted by default, make sure to change the setting to permit CGI execution. Moreover, set UTF-8 as the default character set of HTML contents sent from the server.

(Setting Example in Apache)

Make the settings using either method A or method B below.

A. Enter the following settings in httpd.conf:

<Directory “[directory where cgi is located]”>
    Options ExecCGI
    AddHandler cgi-script .cgi
    AddDefaultCharset UTF-8
</Directory>
 

B. Place a .htaccess file containing the following code in the target directory.

Options ExecCGI
AddHandler cgi-script .cgi
AddDefaultCharset UTF-8
 



[ATTENTION] The use of .htaccess files must be enabled in the settings on the webserver side.


[UP] Go To Page Top

[Step 7] Connection of HTTP-GATEWAY and xl Server

Enter the xl server to which HTTP-GATEWAY is connected and on which gbview is running in the server_conf.pl settings file in the copied directory as follows:

$host = "[Host name and IP address of the XL server]";
$path = "[Reference path name]";
$port = [Port number];
1;
 

For example, specify the information as follows:

$host = "202.231.40.35";
$path = "/heian/map.cgi";
$port = 9100;
1;
 

[Reference path name] is the path required to identify the gbvire agent when the XL server receives HTTP requests. This is set in the HttpAgent [UNDEF REF (xlsv-HttpAgent)]tag of xlscript/std/httpagent.xl. If the correct path is not set, connection requests are rejected by the xlsv server side.

[Port number] is the service port number of the XL server. In the default installation of the XL server, the port number is set to To check the current setting status, find the following entry in the xlscript/std/agent.xl file.

	<Define> ^ServerPort 8080 </Define>
 



[UP] Go To Page Top

[Step 8] Embedding Text

With the new gateway version included in ver.B.b16.11 and later, it is possible to edit full paragraphs of the generated pages. For example, let us try editing the data in main.html. The sections that can be edited are the header navigation and column sections. Locate the sections corresponding to the following two examples in main.html and edit the text.

<div id="header">
	<!--Header navigation, embed linkgs to related pages-->
	<!--Header Navigation Write the links for other pages -->

	<dl id="nav">
	<dt><a href="#">[Link0]</a></dt>
	<dd><a href="#">[Link1]</a></dd>
	<dd><a href="#">[Link2]</a></dd>
	<dd><a href="#">[Link3]</a></dd>
	</dl><h1>[Title for this document]</h1>
</div>
 

In the header navigation section, enter a link name for each instance of [LinkX] and the corresponding link destination URLs at the places indicated by # to link to other pages. You can use the editable sections as necessary.

<div class="column">
	<h2>[Title for this column]</h2>
	<div>
	[Write HTML-style Contents]
	</div>
</div>
 

Between the column tags, you can enter comments and explanation using HTML format. Please use this section as required as well.

[UP] Go To Page Top

[Step 9] Final Confirmation

Now the basic settings have been completed.

At this point, you can try to access gateway/main.html of HTTP-GATEWAY with the WWW browser. The gateway part varies depending on the copy destination directory; enter the directory you have set. A map similar to Fig.(WWW browser after completion of default installation) should appear in the window. Check that you can move the map up, down, left and right and zoom in/out it. If you can perform these operations without problems, the default installation has been successfully completed.


Figure WWW browser after completion of default installation





Figure Example of window of ver.B.b16.11 or later




[UP] Go To Page Top
  GLOBALBASE has particated in the open source software support program SORCE FORGE SourceForge.jp SourceForge.net Logo