suphp-0.7.2のsrpmを作ってみました。
■環境
項目 | バージョン | ダウンロード先 |
---|---|---|
CentOS | 6.5 64bit | 理研 |
suphp | 0.7.2 | suphpダウンロード先 |
■suphp公式
http://www.suphp.org/Home.html
■概要
ここでは、自作したsrpmでインストールする方法とソースからビルドしてインストールする方法の2通りについて手順を書いておきます。
Apache2.4は以下の手順でインストールしています。
http://www.kurobuti.com/blog/?p=7068
■suphp-0.7.2のSRPMダウンロード
suphp-0.7.2-1.src.rpm
MD5(suphp-0.7.2-1.src.rpm)= 6ef2b0aae7f2780a741ff3004ccd42e3
※注意
野良パッケージなので何かあっても私は責任を持ちません!!
目次
(1)SRPMからsuphpをインストール
1-1. suphpのsrpmをダウンロード
suphp-0.7.2のsrpmをダウンロードします。
[root@localhost ~]# wget http://www.kurobuti.com/download/suphp/0.7.2/suphp-0.7.2-1.src.rpm [root@localhost ~]# openssl md5 suphp-0.7.2-1.src.rpm MD5(suphp-0.7.2-1.src.rpm)= 6ef2b0aae7f2780a741ff3004ccd42e3
1-2. suphpのsrpmをインストール
ダウンロードしたsrpmをrpmコマンドでインストールします。
[root@localhost ~]# rpm -ivh suphp-0.7.2-1.src.rpm 1:suphp ########################################### [100%]
1-3. suphpのrpmパッケージ作成
suphpのrpmパッケージを作成します。
[root@localhost ~]# cd rpmbuild/SPECS/ [root@localhost SPECS]# rpmbuild -bb suphp.spec
※注意
suphp-0.7.2には、install-shなどが無いためautoreconfで作成する必要がります。
そのため、autoconfやlibtool(パッケージ)をあらかじめインストールしておく必要があります。
1-4. suphpのインストール
作成したsuphpのrpmパッケージをインストールします。
[root@localhost SPECS]# cd ../RPMS/x86_64/ [root@localhost x86_64]# rpm -ivh suphp-0.7.2-1.x86_64.rpm 準備中... ########################################### [100%]
(2)ソースからsuphpをインストール
2-1. suphpをダウンロード
suphp-0.7.2のソースをダウンロードします。
[root@localhost ~]# cd /usr/local/src/ [root@localhost src]# wget http://www.suphp.org/download/suphp-0.7.2.tar.gz
2-2. ダウンロードしたsuphpのアーカイブ解凍
ダウンロードしたsuphpのアーカイブを解凍します。
[root@localhost src]# tar zxvf suphp-0.7.2.tar.gz
2-3. install-shなど作成
autoreconfで必要なスクリプトを作成します。
[root@localhost src]# cd suphp-0.7.2 [root@localhost suphp-0.7.2]# autoreconf --force --install
※何故か0.7.2にはinstall-shなど同梱されていなかった。
※autoconf、libtool(パッケージ)が必要です。
もし、上記コマンドを実行せずにインストールしようとすると以下のエラーが発生します。
・エラー
[root@localhost suphp-0.7.2]# ./configure configure: error: cannot find install-sh, install.sh, or shtool in config "."/config
2-4. suphpのビルド、インストール
suphpをビルドしてインストールします。
[root@localhost suphp-0.7.2]# ./configure --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/bin/apxs [root@localhost suphp-0.7.2]# sed -i "s/if test \"\$major_version\" = \"2\.0\" \-o \"\$major_version\" = \"2\.2\"; then/if test \"\$major_version\" = \"2\.0\" -o \"\$major_version\" = \"2\.2\" \-o \"\$major_version\" = \"2\.4\"; then/" configure [root@localhost suphp-0.7.2]# make && make install
2行目は、Apache2.4に対応させるために置換しています。
■参考文献
1. http://stackoverflow.com/questions/3096989/libtool-version-mismatch-error
I’m using php 5.5.14 version
and apache 2.4 and apr version 1.5.1
CENTOS 6.5 64_BIT
[root@corp20 suphp-0.7.2]# ./configure –prefix=/usr/local/ –sysconfdir=/etc –with-apr=/usr/local/apr/bin/apr-1-config –with-apxs=/usr/local/apache/bin/apxs –with-apache-usr=apache –with-setid-mode=owner
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/apache/Makefile
config.status: creating src/apache2/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
THIS COMMAND IS SUCCESSFULLY RUN
THEN AFTER
I RUN THIS COMMAND
[root@corp20 suphp-0.7.1]# make
mod_suphp.c:1112: error: ‘request_rec’ has no member named ‘output_filters’
mod_suphp.c:1112: error: too many arguments to function ‘ap_pass_brigade’
mod_suphp.c: In function ‘suphp_register_hooks’:
mod_suphp.c:1126: error: ‘APR_HOOK_MIDDLE’ undeclared (first use in this function)
make[3]: *** [mod_suphp.lo] Error 1
make[3]: Leaving directory `/usr/local/src/suphp-0.7.1/src/apache2′
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/suphp-0.7.1/src’
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/suphp-0.7.1/src’
make: *** [all-recursive] Error 1
I GOT THIS ERROR, I TRIED TO SEARCH SOLUTION ON THE GOOGLE BUT NOT GET SUCCESS.
I HAD ALSO TRIED TO APACHE 2.2 VERSION AND ALSO APR VERSION BUT PROBLEM SAME.
ANYBODY COULD HELP ME, I’M EXPECTING VERY GRATEFUL ANSWER
Hi, pawan chauhan
See this
http://www.linuxquestions.org/questions/showthread.php?s=f14cf72eeb3c759557b8649833c99a40&p=5275915#post5275915
Please install the apr and apr-util headers.
and, please specify the header path(full path that “apr header file” and “apr-util header file” are installed.) to at configure of suphp.
If can not solve the problem, please continue to question
http://www.linuxquestions.org/questions/showthread.php?s=f14cf72eeb3c759557b8649833c99a40&p=5275915#post5275915