Denbun POP version Manual
User's Manual | Administrator's Manual | Installation Guide | Initial Settings Guide
Back to Menu
 

Installing and configuring Denbun

This section describes how to install Denbun POP Version on Linux OS.
Before installation, please refer the system requirements .
To uninstall Denbun, please refer this guide.

* Before installation, download installation module for Denbun POP Version for Linux and transfer it to the server by FTP.
-> You can download Denbun POP Version for Linux here

Please take the following steps in order to install Denbun POP Version for Linux.
1. Create user named "dnpwml"
2. Install Denbun program
3. Restore Database
4. Configure textsearch-ja
5. Configure Apache
6. Configure PostgreSQL
7. Confirm the installation

The administrator user of PostgreSQL (it assumes postgres) is used for step 1 and 3, and basically the super user (root) is used for other steps.
1. Create a user
Create a user named "dnpwml" by using psql command.

[root@xxxxxx ~]# su - postgres
[postgres@xxxxxx ~]$ psql -d template1 -c \
> "CREATE USER dnpwml WITH PASSWORD 'dnpwml' CREATEUSER"
CREATE ROLE

2. Install Denbun program
Expand the file you transferred by FTP. In this example, it assumes that the file exists in "/home/guest" directory.
It assumes that "/tmp" is a temporary directory.
* Use "root" user for this operation.

[root@xxxxxx postgres]# cd /tmp
[root@xxxxxx tmp]# tar xvzf /home/guest/dnpwmlV20PR43lR9pg83.tar.gz

After the expansion, a directory named "dnpwml" is created in "/tmp" directory.

Change the owner of "/tmp/dnpwml" directory to the user for running Apache.
In this example, the user is "apache" and the group is "apache".
[root@xxxxxx tmp]# chown -R apache:apache /tmp/dnpwml

First of all, move the static contents of Denbun to the document root of Apache.
In this example, it is "/var/www/html".
The following directory is the static contents of Denbun.
(1) dnpwmlroot directory (gif images, JavaScripts)

This directory exists in "dnpwml" directory you expanded.
[root@xxxxxx tmp]# mv /tmp/dnpwml/dnpwmlroot /var/www/html


Next, move "dnpwml" directory itself to the cgi directory of Apache.
In this example, it is "/var/www/cgi-bin".
[root@xxxxxx tmp]# mv /tmp/dnpwml /var/www/cgi-bin
3. Restore Database
Restore the Denbun database from the database file (dnpwmldb.pgdmp) by using pg_restore command. Since the database file is included in the install program, the file exists in "/var/www/cgi-bin/dnpwml/admintools/dbfile" directory.
* Use "postgres" user for this operation.

[postgres@xxxxxx ~]$ pg_restore -C -Fc -d template1 \
> /var/www/cgi-bin/dnpwml/admintools/dbfile/dnpwmldb.pgdmp

* If a user named "postgres" does not exist in PostgreSQL, "ERROR: role " postgres" does not exist" error occurs while restoring. Even though the error occurred, there is no problem.
4. Configure textsearch-ja
Configure textsearch-ja on the restored database. Since the SQL required for textsearch-ja is included in the install program, it exists in "/var/www/cgi-bin/dnpwml/admintools/sql".
* Use "postgres" user for this operation.

Uninstall the existing textsearch-ja to reconfigure.
[postgres@xxxxxx ~]$ psql -U dnpwml -d dnpwmldb < /var/www/cgi-bin/dnpwml/admintools
/sql/uninstall_textsearch_ja.sql

* Even though the following errors occurred, there is no problem.
「ERROR: text search configuration "pg_catalog.japanese" does not exist」
「ERROR: text search parser "pg_catalog.japanese" does not exist」
「ERROR: text search dictionary "japanese_stem" does not exist」
「ERROR: text search template "pg_catalog.mecab" does not exist」

Install textsearch_ja on the database.
[postgres@xxxxxx ~]$ psql -U dnpwml -d dnpwmldb < /var/www/cgi-bin/dnpwml/admintools
/sql/textsearch_ja.sql

Setup textsearch_ja in order to use it from Denbun.
[postgres@xxxxxx ~]$ psql -U dnpwml -d dnpwmldb < /var/www/cgi-bin/dnpwml/admintools
/sql/denbun_ja.sql
4. Configure Apache
The following Apache configuration should be done.
(1) Set the environment variables for Denbun and PostgreSQL
Configure these variables in Apache configuration file (httpd.conf). The configuration file is included in "/etc/httpd/conf" directory if the Apache is packaged in a Redhat Enterprise Linux. Use an editor such as vi to edit the file.

Use SetEnv directive to add variables. You can add them at the end of the file.
[root@xxxxxx tmp]# vi /etc/httpd/conf/httpd.conf
      .
      .(Omitted)
      .
#Denbun POP, PostgreSQL Library Path
SetEnv LD_LIBRARY_PATH /usr/local/pgsql/lib:/var/www/cgi-bin/dnpwml/lib


Make sure the configuration and then restart Apache.
[root@xxxxxx ~]# /etc/rc.d/init.d/httpd configtest
Syntax OK
[root@xxxxxx ~]# /etc/rc.d/init.d/httpd restart
Stopping httpd:                         [ OK ]
Starting httpd::                         [ OK ]
[root@xxxxxx ~]#


The installation of Denbun POP Version completed now.
Uninstalling
Use rm command to delete the destination directory.
(If you type "\" just before "rm", no confirmation messages displayed)

Uninstalling Denbun for Mobile
If the Denbun for Mobile is installed, you have to delete the message file from the Denbun's message directory. This step requires the super user (root).

[guest@xxxxxx ~]$ su
Password:
[root@xxxxxx guest]# cd /var/www/cgi-bin/dnpwml/dnpwmllocal/ja
[root@xxxxxx ja]# \rm message.mobile
[root@xxxxxx ja]# \rm wmlmob


Next, delete the directory for Denbun for Mobile.
[root@xxxxxx ja]# \rm -r /var/www/cgi-bin/dnpmwml

The uninstallation of Denbun for Mobile completed.

Uninstalling Denbun
Delete the directories for Denbun program and static contents.
[root@xxxxxx ~]# \rm -r /var/www/cgi-bin/dnpwml
[root@xxxxxx ~]# \rm -r /var/www/html/dnpwmlroot


Delete the Denbun database and user
Use the following command to delete the database and user that were created by the installation process of Denbun POP Version.
* Use "postgres" user for this operation.
[root@xxxxxx ~]# su - postgres
[postgres@xxxxxx ~]$ dropdb dnpwmldb
[postgres@xxxxxx ~]$ dropuser dnpwml


Remove the settings for scheduler
Remove the scheduler settings configured by the installation process of Denbun POP Version.
* Use "root" user for this operation.
[guest@xxxxxx ~]$ su
Password:
[root@xxxxxx guest]# export EDITOR vi
[root@xxxxxx guest]# crontab -u apache -e


The cron settings for Apache will be displayed. Delete the line for "dnpscheduler.sh" and save it and quit.

e.g.)
30 8 * * 1,2,3,4,5 /var/www/cgi-bin/dnpwml/dnpscheduler.sh
|
Delete the line from "cron" file.

The uninstallation of Denbun completed.



 
Copyright (C) 2008-2011 NEOJAPAN,Inc. All Rights Reserved.