CentOSにMySQL,Apache,PHPをソースからインストール

はてなブックマーク - CentOSにMySQL,Apache,PHPをソースからインストール
このエントリーをはてなブックマークに追加
Share on Facebook

自宅での開発環境を整えたいと思い立ち、VMwareにCentOSを入れ、MySQL、apache、PHPをインストールした。

慣れているし柔軟なので、ソースから。

インストールするときにいろいろ足りないと聞かれて、yumでインストールしたものが大量にあった。次回は以下のコマンドで一発なはず。

yum install gcc gcc-c++ openssl-devel libxml2-devel.i386 curl-devel.i386 libjpeg-devel.i386 libpng-devel.i386 libgif-devel.i386 libmcrypt-devel.i386 ncurses-devel.i386 expat-devel

ではそれぞれ入れていきます。

まず、MySQL

./configure --with-charset=ujis --with-extra-charsets=all --with-mysqld-user=mysql --with-innodb --prefix=/usr/local/mysql

次にapache

./configure --prefix=/usr/local/apache2 --enable-ssl --enable-rewrite --enable-so --enable-shared --enable-dav

最後にphp

./configure --enable-mbstring --enable-soap --enable-zend-multibyte --with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-curl --with-curlwrappers --with-gd \
--with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-zlib-dir=/usr/lib --with-mcrypt

これでオッケーかな!

コメントをどうぞ

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt="">