CentOS5.10 x64 + PukiWikiをローカル環境で構築した。その際の設定内容とかを転載。 当初PukiWiki環境を構築しようとして参照した解説サイトは手抜きだったり、嘘ばっかりで全然動かなかった。勉強にはなったけど(-"-) 多少苦労したし、今のPukiWiki環境自体が死んでしまったら情報確認できませんから。。バックアップです(苦笑)
@wikiのPukiWiki互換モードを選択したけど、どこまで使えるか。少し興味津々。
# yum -y install httpd
# vi /etc/httpd/conf/httpd.conf
ServerTokens OS ↓ ServerTokens Prod ←変更(サーバーの情報を隠す)
KeepAlive Off ↓ KeepAlive On
ServerAdmin root@localhost を書き換える
#ServerName www.example.com:80 ↓ ServerName www.centos.orz:80
<Directory "/var/www/html"> <Directory "/var/www/puki"> とするべきでした!!
Options Indexes FollowSymLinks ↓ Options Includes ExecCGI FollowSymLinks
AllowOverride None ↓ AllowOverride All
UserDir disable ↓ #UserDir disable
##AllowOverride FileInfo AuthConfig Limit Indexes AllowOverride All
下記を記入。
<Location />
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|ico|z|taz|t?gz|t?bz2? |zip|lzh|sit|rar|pdf|mp3|ogg|wma|rm|wmv|mov|mpe?g)$ \
no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>
mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.org
(例)echo '<h1>It works!</h1>' > /var/www/html/index.html
chown -R user_name /var/www/html
ln -s /usr/bin/perl /usr/local/bin/perl
/etc/rc.d/init.d/httpd start chkconfig httpd on chkconfig --list httpd
# yum -y install php
PHP 5.1.6 (cli) (built: Jul 12 2013 16:52:22) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
# yum remove php
yum -y install php php-mbstring php-mysqlでしたよ。
これでよさ気なんですけど。 yum -y install php php-mbstring
$modifier = 'anonymous';
上記のanonymousの部分をあなたの名前に書き換えましょう。日本語でもかまいません。
$modifierlink = 'http://pukiwiki.example.com/';
上記の「http://pukiwiki.example.com/」の部分をあなた(あなたのPukiWikiを管理している人)のWebサイトのURLに書き換える。 PukiWikiを設置するURLでなくてもかまいません。あなたのWebのトップページのURLにしておきましょう。
pukiwiki.ini.php の「$adminpass」の設定を確認
$adminpass = '{x-php-md5}!';
$adminpass = '{x-php-md5}' . md5('5f4dcc3b5aa765d61d8327deb882cf99');
echo -n 'password' | md5sum 5f4dcc3b5aa765d61d8327deb882cf99
# vi /etc/php.ini
short_open_tag = Off ↓ short_open_tag = On
max_execution_time = 30 ↓ max_execution_time = 300
error_reporting = E_ALL ↓ error_reporting = E_ALL & ~E_NOTICE
magic_quotes_gpc = On ↓ magic_quotes_gpc = Off
;default_charset = "iso-8859-1" ↓ default_charset = "UTF-8"
post_max_size = 8M ↓ post_max_size = 20M
upload_max_filesize = 2M ↓ upload_max_filesize = 20M
;date.timezone = ↓ date.timezone = Asia/Tokyo
;mbstring.language = Japanese ↓ mbstring.language = Japanese
;mbstring.internal_encoding = EUC-JP ↓ mbstring.internal_encoding = UTF-8
;mbstring.http_input = auto ↓ mbstring.http_input = UTF-8
;mbstring.http_output = SJIS ↓ mbstring.http_output = pass
;mbstring.encoding_translation = Off ↓ mbstring.encoding_translation = On
;mbstring.detect_order = auto ↓ mbstring.detect_order = auto
;mbstring.substitute_character = none; ↓ mbstring.substitute_character = none;