$Id: INSTALL_japanese.txt,v 1.2 2004/01/08 09:40:45 shota Exp $

                 OpenBazaar 0.0.3 󥹥ȡ롦
            ==============================================

                             2004ǯ19

+--------------------------------------------------------------------+
|ʸϡOpenBazaar 0.0.3Υ󥹥ȡˡ⤷ΤǤ  |
+--------------------------------------------------------------------+


ܼ
----

  0 󥹥ȡ
  1 󥹥ȡ
  2 ưɬפʴĶ
    2.1 ưĶ
    2.2 PHP
	2.3 apache
  3 󥹥ȡθ
  
0 󥹥ȡ
--------------------
  OpenBazaarưˤDinoLibɬפǤOpenBazaarΥ󥹥ȡ
Dinolib򥤥󥹥ȡ뤷ƤDinoLibӥɤ
http://openlab.dino.co.jp/?key=%5B%5Bdinolib%5D%5D
򻲾ȤƤ


1 󥹥ȡ
------------------
  ɡȤ饢֤ɤˡΤ褦
ǥ饤󡦥åפưȤǤޤ
оΤɤŬʥǥ쥯ȥǡɤѥåե
Фޤ(*1)
Υǥ쥯ȥ httpͳǥǤʤ꤬˾ޤǤ
ޤapacheμ¹ԥ桼ǤѡߥåͿƲ
RedHatʤɤΥǥȥӥ塼Ǥ/var/www/htmlǥեȤΥɥ
롼ȤʤΤǡ/var/wwwդǹԤȤ褤Ǥ礦
+--------------------------------------------------------------------+
|$ cd /var/www                                                       |
|$ tar xvzf /path/to/openbazaar-version.tar.gz                       |
+--------------------------------------------------------------------+

*----
*1 ե̾ϡºݤΥե̾ɤؤƤ
*2 OpenBazaardinolibɬפȤޤdinolibʤϡ
    http://openlab.dino.co.jp dinolibɤ󥹥ȡ
   Ƥ

  ǥ쥯ȥopenbazaar-versionβ'catalog''admin'ΣĤΥǥ
ȥ꤬ǤƤϤǤ顢WebФ֤ѥإܥå
󥯤ĥäƤ

+--------------------------------------------------------------------+
|# cd /var/www/html/openbazaar                                       |
|# ln -snf /path/to/openbazaar/catalog catalog                       |
|# ln -snf /path/to/openbazaar/admin admin                           |
+--------------------------------------------------------------------+

  '/var/www/html/'ϡApacheΥɥȡ롼ȤɽƤޤ
ºݤ˱Ѥ륵ФΥǥ쥯ȥ깽¤ɤѤƼ¹ԤƤ


./configure¹Ԥޤ
+--------------------------------------------------------------------+
|# ./configure \                                                     |
|   --with-dbhost=localhost --with-dbport=5432 \                     |
|   --with-dbname=openbazaar --with-dbuser=postgres \                |
|   --with-dbencoding=EUC_JP \                                       |
|   --with-http-server=http://webserver.example.com \                |
|   --with-http-catalog-path=/path/to/symlink_catalog/ \             |
|   --with-http-admin-path=/path/to/symlink_admin/ \                 |
|   --with-https-server=https://webserver.example.com \              |
|   --with-https-catalog-path=/path/to/symlink_catalog/ \            |
|   --with-https-admin-path=/path/to/symlink_admin/                  |
+--------------------------------------------------------------------+

ʲΤ褦ʥץ󤬤ޤ./configureΥץ./configure --help
ǳǧƤۤȤɤξ硢
--with-http-server --with-http-catalog-path  --with-http-admin-path
ɬפˤʤޤSSLѤhttpsĤΥץƱͤɬפˤʤޤ

 ./configureץΰ
----------------------------------------------------------------------
  --with-dbhost=DBHOST          database host
  --with-dbport=DBPORT          database port
  --with-dbname=DBNAME          database name default=osc
  --with-dbuser=DBUSER          database user default=postgres
  --with-dbpass=DBPASS          database password
  --with-dbencoding=DBENCODING  database encoding
  --with-pgbindir=DIR           PostgreSQL bin directory default=/usr/bin
  --with-http-server=server     http server location default=http://localhost
  --with-https-server=server    https server location default=http://localhost
  --with-http-catalog-path=DIR            catalog pathdefault=/
  --with-https-catalog-path=DIR            catalog pathdefault=/
  --with-http-admin-path=DIR            admin pathdefault=/
  --with-https-admin-path=DIR            admin pathdefault=/
  --with-httpduser=DIR          httpd user
  --with-dinolibdir=DIR         dinolib directory
  --with-smartydir=DIR          smarty directory default=lib/smarty
----------------------------------------------------------------------

ˤäơlib/cataloglib/adminʲΥǥ쥯ȥconfigure.php
ޤϥġ뤽줾եˤʤޤ
ΥեԽ뤳Ȥ./configureǻꤷͤѹǤޤΤǡȤ
ޤưƤȤϤΥեԽȤǤ礦

  ưɬפʥܥå󥯤ǥ쥯ȥޤ
+--------------------------------------------------------------------+
|# make setup                                                        |
+--------------------------------------------------------------------+

  ˡǡ١Υåȥåפ򤷤ޤ
+--------------------------------------------------------------------+
|# make initdb                                                       |
+--------------------------------------------------------------------+
ΥޥɤϡޤǤ˥ǡ١򥻥åȥåפƤϥǡ١
ƥǡ١ޤΤǡΥǡäʤϼ¹Ԥʤǲ

 
  ˥󥹥ȡ뤬λ顢ʲΤ褦ˤơեν񤭹߸¤
ᤷޤ

+--------------------------------------------------------------------+
|# chmod 644 /path/to/openbazaar/lib/catalog/configure.php           |
|# chmod 644 /path/to/openbazaar/lib/admin/configure.php             |
+--------------------------------------------------------------------+

  ֥饦ǥƤߤƤ줾ưƤХ󥹥ȡ
˴λƤޤʤġˤIDȥѥɤɬפǤǤ
ɤadminˤʤäƤޤΤǡɬѹ褦ˤƤ


2 ưɬפʴĶ
------------------


2.1 ưĶ
------------

  OpenBazaarưˤϡΤ褦ưĶɬפǤ

    - PHPưWeb(Apacheʤ)
    - PHP 4.2.0ʹ
    - PostgreSQL
	- dinolib0.9.4a
	

2.2 PHP
-------------

  PHPʲ˼ޤˤäơ¾PHPץȤ
ƶФϡ.htaccessʤɤǥǥ쥯ȥꤴȤԤäƤ

ӥȤⱿѤϡɬϤShift_JISˤʤ褦ꤷƤ
EUC-JPʤɤǤϷӤǸʸޤ
ǡlib/catalog/language/japanese.phpCHARSET
ƤȤǤ礦

 php.ini 
----------------------------------------------------------------------
[PHP]
output_buffering = On 
output_handler = mb_output_handler 
register_globals = Off

mbstring.language = Japanese
mbstring.internal_encoding = EUC-JP 
mbstring.http_input = auto 
mbstring.http_output = SJIS-win 
mbstring.detect_order = auto 
mbstring.substitute_character = none;

2.3 Apache
-----------------
  󥸥ŬOnˤ硢 catalogǥ쥯ȥΤ.htaccess⤷
httpd.confԽɬפޤ
ʲΤ褦򤹤ȥѥ꡼Ѵ졢ư褦ˤʤޤ
εǽѤϴġδ->åפ"󥸥кURL
"trueꤷƤ

 .htaccess 
----------------------------------------------------------------------
# search engine friendly URLS
 RewriteEngine ON
 RewriteBase /path/to/catalog
 RewriteRule ^(.*\.php)/-/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)$ /$1?$2=$3&$4=$5&$6=$7&$8=$9 [L]
 RewriteRule ^(.*\.php)/-/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)$ /$1?$2=$3&$4=$5&$6=$7 [L]
 RewriteRule ^(.*\.php)/-/(.*)/(.*)/(.*)/(.*)$ /$1?$2=$3&$4=$5 [L]
 RewriteRule ^(.*\.php)/-/(.*)/(.*)$  /$1?$2=$3 [L]

 
 СۥȤǱѤݤhttpd.conf 
----------------------------------------------------------------------
 <VirtualHost 192.168.1.127>
   ServerAdmin admin@example.com
   DocumentRoot /path/to/symlink_catalog
   ServerName openbazaar.example.com
   ErrorLog logs/openbazaar-error_log
   CustomLog logs/openbazaar-access_log common
   # search engine friendly URLS
   RewriteEngine ON
   #RewriteBase /
   RewriteRule ^(.*\.php)/-/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)$ $1?$2=$3&$4=$5&$6=$7 [L]
   RewriteRule ^(.*\.php)/-/(.*)/(.*)/(.*)/(.*)$ $1?$2=$3&$4=$5 [L]
   RewriteRule ^(.*\.php)/-/(.*)/(.*)$  $1?$2=$3 [L]
   RewriteRule ^(.*\.php)/-/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)$  $1?$2=$3&$4=$5&$6=$7&$8=$9 [L]
 </VirtualHost>

3 󥹥ȡθ
-------------------
  󥹥ȡ뤬λ饷åפ򤷤Ƥϡдԡ
եȥ򥤥󥹥ȡ뤷ͤλŻǤϤʤ⤷ޤ󡣤ξϡ
adminǥ쥯ȥURLIDѥɤȼԤΤ餻ƤƤ
