CentOS-6_64bit Apache php
---------------------
・webサーバapache2.2.15 php5.3.3のインストール

パッケージがインストールされているか確認する。
$rpm -q httpd
httpd-2.2.15-5.el6.centos.i686(このように表示されればインストールされている)

$rpm -q php
php-5.3.2-6.el6_0.1.i686

$rpm -q php-mbstring
php-mbstring-5.3.2-6.el6_0.1.i686



インストールされていないパッケージがあれば次のようにインストールする。
#yum install httpd

#yum install php-pgsql

#yum install php php-mbstring


・php タイムゾーンの設定 vi /etc/php.ini date.timezone = "Asia/Tokyo"
・apacheの設定変更 vi /etc/httpd/conf/httpd.conf User apache~ Group apache を #User apache~ #Group apache~ User nobody~ Group nobody に変更 apacheというユーザで動いているapacheをnobodyに変更 #UserDir disabled UserDir public_html <Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Options MultiViews -Indexes SymLinksIfOwnerMatch IncludesNoExec //Indexesの前に-を入れることでファイル一覧禁止 <Limit GET POST OPTIONS> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS> Order deny,allow Deny from all </LimitExcept> </Directory>
・編集後、設定ファイルの書式に間違いがないかチェック httpd -t Syntax OK
・ファイアーウォールとSELINUX解除 $ /etc/rc.d/init.d/iptables stop $ chkconfig iptables off $ chkconfig --list iptables iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off # vi /etc/sysconfig/selinux SELINUX=enforcing    ↓ SELINUX=disabled
・編集後、Apacheを起動して、自動起動の設定をする。 /etc/init.d/httpd start(apache起動) chkconfig httpd on(自動起動) win7上から192.168.1.xx へアクセス。 無事Apacheの画面が表示された。 --------------------------------------------------------------------------------