fc2ブログ

LAMP環境構築手順メモ

# adduser ユーザー名
# passwd ユーザ名
# yum -y update
# yum -y install zlib-devel
# yum -y install openssl-devel
# yum -y install curl-devel
# yum -y install libxml2-devel
# yum -y install gcc
# yum -y install ncurses-devel
# yum -y install gcc-c++
# yum -y install autoconf

作業用ディレクトリ作成
# mkdir src
# cd mkdir

Apacheインストール
# wget http://ftp.jaist.ac.jp/pub/apache//httpd/httpd-2.2.22.tar.gz
# tar xvof httpd-2.2.22.tar.gz
# cd httpd-2.2.22
# ./configure --prefix=/usr/local/apache2.2.22 --enable-modules='so ssl rewrite expires vhost-alias deflate cache disk-cache mem-cache'
# make
# make install
# ln -s /usr/local/apache2.2.22/ /usr/local/apache2

Apache起動設定
# cp build/rpm/httpd.init /etc/rc.d/init.d/httpd
# vi /etc/rc.d/init.d/httpd
httpd=${HTTPD-/usr/sbin/httpd}
httpd=${HTTPD-/usr/local/apache2/bin/httpd}
pidfile=${PIDFILE-/var/log/httpd/${prog}.pid}
pidfile=${PIDFILE-/usr/local/apache2/logs/httpd.pid}
CONFFILE=/etc/httpd/conf/httpd.conf
CONFFILE=/usr/local/apache2/conf/httpd.conf
# chkconfig httpd on

MySQLインストール
# cd /root/src
# wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.63.tar.gz/from/http://ftp.jaist.ac.jp/pub/mysql/
# tar xvof mysql-5.1.63.tar.gz
# cd mysql-5.1.63
# ./configure --with-charset=utf8 --with-extra-charsets=all --with-mysqld-user=mysql --with-innodb --prefix=/usr/local/mysql
# make
# make install

# groupadd mysql
# useradd mysql -g mysql
# /usr/local/mysql/bin/mysql_install_db --user=mysql
# cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
# cp /root/src/mysql-5.1.63/support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 755 /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld

PHPインストール
# cd /root/src
# wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-devel-5.1.63-1.glibc23.i386.rpm/from/http://ftp.iij.ad.jp/pub/db/mysql/
# rpm -ihv MySQL-devel-5.1.63-1.glibc23.i386.rpm

# wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-shared-compat-5.1.63-1.glibc23.i386.rpm/from/http://ftp.jaist.ac.jp/pub/mysql/
# rpm -ihv MySQL-shared-compat-5.1.63-1.glibc23.i386.rpm
# vi /etc/ld.so.conf.d/mysql-i386.conf
/usr/local/mysql/lib/mysql #ldconfig
#ldconfig

----
make時に以下のエラーが出るので、libmysqlclient.soをコピー
gcc: /usr/lib/mysql/libmysqlclient.so: No such file or directory
make: *** [libphp5.la] エラー 1
# cp /root/src/mysql-5.1.63/libmysql/.libs/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so
----

# wget http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz
# tar xvof icu4c-4_8_1_1-src.tgz
# cd icu/source/
# ./configure
# make
# make install
# cd ../../
# wget http://jp2.php.net/get/php-5.3.13.tar.gz/from/jp.php.net/mirror
# tar xvof php-5.3.13.tar.gz
# cd php-5.3.13
# ./configure --with-apxs2=/usr/local/apache2.2.22/bin/apxs --enable-mbstring --enable-mbregex --with-openssl=shared --with-pdo-mysql --with-mysql --with-mysqli --enable-intl --with-curl=/usr/include/curl/
# make
# make install
# vi /usr/local/apache2/conf/httpd.conf に追加
AddType application/x-httpd-php .php
# cp /root/src/php-5.3.13/php.ini-development /usr/local/lib/php.ini
# pear upgrade-all
# pecl install APC
# vi /usr/local/lib/php.ini
extension=apc.so

# pear channel-discover pear.phpunit.de
# pear channel-discover pear.symfony-project.com
# pear install phpunit/PHPUnit
スポンサーサイト



コメントの投稿

非公開コメント

プロフィール

yanchi52

Author:yanchi52
FC2ブログへようこそ!

最新記事
最新コメント
最新トラックバック
月別アーカイブ
カテゴリ
フリーエリア
カウントダウンタイマー
検索フォーム
カレンダー
08 | 2023/09 | 10
- - - - - 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
RSSリンクの表示
last.fm
twitter
リンク
ブロとも申請フォーム

この人とブロともになる

QRコード
QR