[[WorldCraft wiki]]

参考ページ: http://efeel/survey/sys/README.txt

- まず perl のリンクを張る
  ln -s /usr/bin/perl /usr/local/bin/

- php パッケージを導入する。
  pear upgrade-all
  pear channel-update pear.php.net
  pear install --alldeps Numbers_Words-0.16.4
  pear install --alldeps --force Image_Graph
  pear install -a -f Mail
  pear install -a -f Mail_MIME
  yum install php-gd php-pgsql php-mbstring php-dom

- php pear パッケージの Image_Canvas にフォントファイルを配置
 cd /usr/share/pear/Image/Canvas
 wget http://www.efeel.to/tmp/wc/usr_share_pear_Image_Canvas_Fonts.tar
 tar -xf usr_share_pear_Image_Canvas_Fonts.tar
 rm usr_share_pear_Image_Canvas_Fonts.tar

- Pg.pm 導入

 cd /tmp
 wget  http://www.efeel.to/tmp/wc/Pg-2.1.1.tar.gz
 gzip -cd Pg-2.1.1.tar.gz | tar -xf -
 cd Pg-2.1.1
 yum install postgresql-devel
     
 rpm -ql postgresql-libs-8.1.23-1.el5_6.1 | grep libpq.so
 ※libpq.so のあるデリレクとりを下記環境変数に設定
 POSTGRES_LIB=/usr/lib64/; export POSTGRES_LIB
     
 rpm -ql postgresql-devel | grep libpq-fe.h
 ※libpq-fe.h のあるデリレクとりを下記環境変数に設定
 POSTGRES_INCLUDE=/usr/include; export POSTGRES_INCLUDE
     
 perl Makefile.PL
 sudo su postgres
 PGDATABASE=test;  export PGDATABASE
 make test
 ※$conn->oidStatus のテストのみ NG だが問題ない
 sudo su
 make install


- efeel package 導入

 cd /opt/efeel
 mkdir  -p  www/survey
 cd www/survey
 wget http://www.efeel.to/tmp/wc/efeel_survey_sys_20120902.tar.gz 
 gzip -cd efeel_survey_sys_20120902.tar.gz | tar -xf -
 rm efeel_survey_sys_20120902.tar.gz 
 cd /opt/efeel/www
 chown -R apache:apache  survey
 chmod  -R  755  survey
 chown -R itoshun:worldcraft  survey
 chmod  777  survey
 chmod  666  /opt/efeel/www/survey/sys/passwdlist

- efeel package のカスタマイズ

 cd /opt/efeel/www/survey/sys
 echo 'root:jMKHa44XdyW82' > passwdlist
 chown apache:apache passwdlist
 chmod 0700 passwdlist

 vi  /opt/efeel/www/survey/sys/php/g.php
 $pg_define = pg_pconnect("port=5432 dbname=define");
 ....
 $con = pg_connect("port=5432 dbname=result");

 vi   /opt/efeel/www/survey/sys/survey_template/admin/dat.pl
 $pguser              = '';
 $pgpasswd            = '';
 $adminmail           = 'efeel@worldcraft.co.jp';
 $bcc_mail            = 'efeelbcc@worldcraft.co.jp';
 $syshome             = '/opt/efeel/www/survey/sys';
 $default_smtp_server = 'localhost';
 $http = 'https';                 # http ¤« https ¤«
 $site_name      = 'efeel';
 $site_title     = 'efeel';
 $ads_option     = 'no';
     
 vi  /opt/efeel/www/survey/sys/survey/sys/survey_template/admin/htaccess
 AuthUserFile /opt/efeel/www/survey/sys/survey/sys/passwdlist
 
- 必要なデータベースを作成します。

 postgres% createdb -E EUC_JP sys 
 postgres% createdb -E EUC_JP result
 postgres% createdb -E EUC_JP define

- 必要なテーブルを作成します。

 postgres% psql sys
 create table ticket ( id serial, email text, count int4, start date, period int4);
 create table passwd ( email text, passwd text);
 create table survey_config (
         name text, email text, regist timestamp, start date, period int4,
         sendmail bool default 'f',  
	  key_in_url bool default 'f', 
	 status int4 default '0',  answers int4 default '0',
         answer_unlimited int4 default '0', extension int4 default '0',
         answer_interval int4 default '3600',
         backto text, hosts text, passwd text, public_on_list int4,
         server_name text
 );
     
 create table survey_design (
         name text, pattern int4 default '2',
         title text default 'Survey',
         logo text, explain text, fgcolor text, bgcolor text, background text,
         preview        boolean default 'true',
         linkToAnswers  boolean default 'true',
         linkToCounting boolean default 'true',
         ads            boolean default 'true'
 );

- 必要なユーザを作成・権限設定します。

  $ su - postgres
  $ psql sys
   create user apache;
      grant all on schema public to apache;
      grant all on passwd        to apache;
      grant all on survey_config to apache;
      grant all on survey_design to apache;
      grant all on ticket        to apache;
      grant all on ticket_id_seq to apache;
 $

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS