ソースからCentOS 6.4へのPHPのインストールに問題があります。

ソースからCentOS 6.4へのPHPのインストールに問題があります。

質問:

ソースからPHPをインストールした後、機能はありません。 phpinfoテストページが機能しません。 yumを使用してリポジトリからインストールすると、機能が復元されます。

私がこれをする理由は次のとおりです。

結局、ImageMagick/MagickWand機能を追加したいと思います。明らかに、MagicWandはPHPでコンパイルする必要があり、私には合わない他のガイドラインを見つけました。

私が試したこと:

私が見つけたすべてのリソースは非常に単純でしたが、このプロセスが失敗した場合に何をすべきかを実際に扱うことはありません。

  1. 希望のディストリビューションを入手してください。最新バージョン(5.5.1)とCentOSリポジトリ(5.3.3)の内容を試してみました。
  2. 前提条件を取得します。ほとんどはlibxml2-devel、一部はhttpd-devel、gccを参照しています。
  3. ./configure - ビルドに関連するコンテンツが含まれています(さまざま)。
  4. 作成&&作成してインストールする
  5. ソースフォルダのphp.iniを/ etc /に入れます。
  6. httpdを再起動してください。

その過程で観察されたいくつかの文書の例は次のとおりです。

http://benramsey.com/blog/2012/03/build-php-54-on-centos-62/ http://www.thegeekstuff.com/2008/07/instruction-guide-to-install-php5-from-source-on-linux/

何が間違っているのかわかりません。しかし、正直なところ、私はソースで作業することはあまりありません。記録されていない定数が欠落しているようです。どんな提案がありますか?必要に応じて追加情報を提供できます。

ベストアンサー1

ソースからインストールするのは非常に悪い習慣です。インストールするだけですIUSコミュニティ倉庫

抜粋

IUSコミュニティプロジェクトは、特にRedhat Enterprise Linux用のPHP、Python、MySQL、およびその他の一般ソフトウェアの最新のアップストリームバージョン用に定期的に維持されている最新のRPMパッケージを提供することを目的としています。 IUSは、必要に応じてRHELをアップグレードするためのより良い方法と見なすことができます。

次の場所にリポジトリを追加できますyum

# rpm --import http://dl.iuscommunity.org/pub/ius/IUS-COMMUNITY-GPG-KEY

# rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/epel-release-6-5.noarch.rpm
# rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-11.ius.el6.noarch.rpm

次に、必要なパッケージをインストールします。

# yum search --enablerepo=ius-testing php55u
php55u-debuginfo.x86_64 : Debug information for package php55u
php55u.x86_64 : PHP scripting language for creating dynamic web sites
php55u-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php55u-cli.x86_64 : Command-line interface for PHP
php55u-common.x86_64 : Common files for PHP
php55u-dba.x86_64 : A database abstraction layer module for PHP applications
php55u-devel.x86_64 : Files needed for building PHP extensions
php55u-embedded.x86_64 : PHP library for embedding in applications
php55u-enchant.x86_64 : Human Language and Character Encoding Support
php55u-fpm.x86_64 : PHP FastCGI Process Manager
php55u-gd.x86_64 : A module for PHP applications for using the gd graphics library
php55u-gmp.x86_64 : A module for PHP applications for using the GNU MP library
php55u-imap.x86_64 : A module for PHP applications that use IMAP
php55u-interbase.x86_64 : A module for PHP applications that use Interbase/Firebird databases
php55u-intl.x86_64 : Internationalization extension for PHP applications
php55u-ldap.x86_64 : A module for PHP applications that use LDAP
php55u-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
php55u-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
php55u-mssql.x86_64 : MSSQL database module for PHP
php55u-mysqlnd.x86_64 : A module for PHP applications that use MySQL databases
php55u-odbc.x86_64 : A module for PHP applications that use ODBC databases
php55u-opcache.x86_64 : The Zend OPcache
php55u-pdo.x86_64 : A database access abstraction module for PHP applications
php55u-pear.noarch : PHP Extension and Application Repository framework
php55u-pgsql.x86_64 : A PostgreSQL database module for PHP
php55u-process.x86_64 : Modules for PHP script using system process interfaces
php55u-pspell.x86_64 : A module for PHP applications for using pspell interfaces
php55u-recode.x86_64 : A module for PHP applications for using the recode library
php55u-snmp.x86_64 : A module for PHP applications that query SNMP-managed devices
php55u-soap.x86_64 : A module for PHP applications that use the SOAP protocol
php55u-tidy.x86_64 : Standard PHP module provides tidy library support
php55u-xml.x86_64 : A module for PHP applications which use XML
php55u-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol

おすすめ記事