TITLE:PHPの導入 *PHPの導入 [#t649d222] **PHPのインストール [#m29a102f] ここまでの過程で、PHPのベースはインストールされている。 php.i386 5.1.6-15.el5 installed php-cli.i386 5.1.6-15.el5 installed php-common.i386 5.1.6-15.el5 installed php-ldap.i386 5.1.6-15.el5 installed php-mysql.i386 5.1.6-15.el5 installed php-odbc.i386 5.1.6-15.el5 installed php-pdo.i386 5.1.6-15.el5 installed php-pear.noarch 1:1.4.9-4 installed 追加で必要なパッケージをインストールする。 # yum install php-devel php-dba php-imap php-gd php-mbstring php-mcrypt php-mhash php-xml php-xmlrpc **PHPの設定 [#m2eb4051] PHPの設定ファイルは、/etc/php.iniにある。 ちなみに、モジュール関係の設定は、/etc/php.d以下ににある。 # vi /etc/php.ini 設定内容としては、次の内容を追加すると良いかも。 output_buffering = Off output_handler = none ... expose_php = Off ... memory_limit = 128M ... post_max_size = 20M ... magic_quotes_gpc = On ... extension_dir = "/usr/lib/php/modules" ←ここはデフォルトのまま ... file_uploads = On upload_max_filesize = 20M ... sendmail_path = /usr/sbin/sendmail -t -i ←ここはデフォルトのまま ... session.save_path = "/var/lib/php/session" ←ここはデフォルトのまま session.use_only_cookies = On session.bug_compat_warn = 0 session.entropy_length = 32 session.entropy_file = /dev/urandom session.hash_function = 1 ... default_charset = UTF-8 mbstring.language = Japanese mbstring.encoding_translation = Off mbstring.http_input = auto mbstring.http_output = UTF-8 mbstring.internal_encoding = UTF-8 mbstring.substitute_character = none 設定できたら、httpdを再起動。 # service httpd restart **eAcceleratorのインストール [#z1b39ad3] DAGからインストールするだけ。楽ちんだー(笑) # yum --enablerepo=rpmforge install php-eaccelerator **PHPの設定 [#m2eb4051] **eAcceleratorの設定 [#t6cee133] eAcceleratorの設定は、/etc/php.d/eaccelerator.iniにある。 # vi /etc/php.d/eaccelerator.ini あとは、[[Vineのときの設定>Install Log/VineLinux4.1/php_accelerator]]を参考に、次のような内容に編集する。 ; Enable eAccelerator extension module zend_extension = /usr/lib/php/modules/eaccelerator.so ; Options for the eAccelerator module eaccelerator.cache_dir = /var/cache/php-eaccelerator eaccelerator.shm_size = "16" ←ここを変更 eaccelerator.enable = 1 eaccelerator.optimizer = 1 eaccelerator.check_mtime = 1 eaccelerator.filter = "" eaccelerator.shm_max = 0 eaccelerator.shm_ttl = "86400" ←ここを変更 eaccelerator.shm_prune_period = "86400" ←ここを変更 eaccelerator.shm_only = 0 eaccelerator.compress = 1 eaccelerator.compress_level = 9 eaccelerator.keys = "shm_and_disk" eaccelerator.sessions = "shm_and_disk" eaccelerator.content = "shm_and_disk" eaccelerator.debug = 0 設定できたら、httpdを再起動。 # service httpd restart あれ、コントロール用のスクリプト(control.php)はどこだろう。 # find / -name "control.php" -print /usr/share/doc/php-eaccelerator-5.1.6_0.9.5.2/control.php ***参考 [#x00fab42] -http://oku.edu.mie-u.ac.jp/~okumura/linux/?PHP -http://oku.edu.mie-u.ac.jp/~okumura/linux/?Moodle%201.9 -http://webtech.akijapan.com/htaccess/mbstring.html |