AMP
Apache 2.2 PHP 5.1 MySQL 5.0 を導入。
このエントリでオプションの設定をしたので、そのまま portinstall を使用する。
まずは Apache から。
$ portinstall www/apache22
次に MySQL を。
$ portinstall databases/mysql50-server
画像編集用ライブラリを使用するので、まずは gd と ImageMagick をインストール。
$ portinstall graphics/gd $ portinstall graphics/ImageMagick
最後に PHP を。
$ portinstall lang/php5 $ portinstall lang/php5-extensions $ rehash
apache の設定はこのエントリを参考に。
設定が終わったら下記のコマンドで apache を立ち上げる。
$ apachectl start
エラー云々言われたら config ファイルを確認する。
次に MySQL の設定。
まずは起動から。
$ /usr/local/etc/rc.d/mysql-server start
次に root のパスワードの設定。
$ mysqladmin -u root password 'PASSWORD' $ mysql -u root -p Enter password: ********
最後に匿名ユーザーの削除。
mysql> delete from user where User=''; mysql> delete from user where password = "";
設定が終わったら rc.conf に起動用の記述をしておく。
$ vi /etc/rc.conf
apache2_enable="YES" #apache2ssl_enable="YES" # SSL を使用する場合はコメントアウトを外す mysql_enable="YES"