2011/04/10

さくらVPSでLAMPの設定

さくらVPSのCentOS 5.5でLAMP環境を設定した時のメモ


apache2
・インストール
yum install httpd

・起動
/etc/init.d/httpd start

ブラウザからアクセスすると、Apache2のページが表示される。
  • 設定ファイル: /etc/httpd/conf/http.conf
  • ログ: /var/log/httpd/access_log error_log

※ DocumentRootを「/var/www/html」から「/home/userName」に変更した時は、
/home/userNameのパーミッションを755に変更しないと、
ブラウザで表示した時に403エラーになる。
chmod 755 /home/userName

・起動時に有効にする
chkconfig httpd on

MySQL
・インストール
yum install mysql-server

・起動
/etc/init.d/mysqld start

・起動時に有効にする
chkconfig mysqld on

phpのインストール
yum install php php-mysql php-mbstring php-pear


0 コメント:

コメントを投稿

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Blogger Templates