I want to figure out some issue in my CentOS server.
I have two packages that already installed in my server: php-cli and php-common. I see their details when i use the command yum info. However, when i use the command yum install php-cli, i get an offer to install these two packages, like they are not installed on the server at all. According to the info command, the packages that already installed have the same version of the packages that the server offering to install.
Anyone can explain that?
yum info php-cli
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.syn.co.il
* epel: mirror.nonstop.co.il
* extras: centos.syn.co.il
* rpmforge: apt.sw.be
* updates: centos.syn.co.il
Available Packages
Name : php-cli
Arch : x86_64
Version : 5.3.3
Release : 48.el6_8
Size : 2.2 M
Repo : updates
Summary : Command-line interface for PHP
URL : http://www.php.net/
License : PHP
Description : The php-cli package contains the command-line interface
: executing PHP scripts, /usr/bin/php, and the CGI interface.
yum info php-common
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.syn.co.il
* epel: mirror.nonstop.co.il
* extras: centos.syn.co.il
* rpmforge: apt.sw.be
* updates: centos.syn.co.il
Available Packages
Name : php-common
Arch : x86_64
Version : 5.3.3
Release : 48.el6_8
Size : 530 k
Repo : updates
Summary : Common files for PHP
URL : http://www.php.net/
License : PHP
Description : The php-common package contains files used by both the php
: package and the php-cli package.
yum install php-cli
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.syn.co.il
* epel: mirror.nonstop.co.il
* extras: centos.syn.co.il
* rpmforge: apt.sw.be
* updates: centos.syn.co.il
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-cli.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-48.el6_8 for package: php-cli-5.3.3-48.el6_8.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.3.3-48.el6_8 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
php-cli x86_64 5.3.3-48.el6_8 updates 2.2 M
Installing for dependencies:
php-common x86_64 5.3.3-48.el6_8 updates 530 k
Transaction Summary
=============================================================================================================================
Install 2 Package(s)
Total download size: 2.7 M
Installed size: 9.1 M
Is this ok [y/N]:
Doesn't look like those packages are installed, otherwise it would say Installed Packages, e.g.
Installed Packages
Name : php-cli
Arch : x86_64
Epoch : 0
Version : 7.0.14
Release : 1.fc25
Size : 13 M
Repo : #System
From repo : updates
Summary : Command-line interface for PHP
URL : http://www.php.net/
License : PHP and Zend and BSD
Description : The php-cli package contains the command-line interface
: executing PHP scripts, /usr/bin/php, and the CGI interface.
As per man page of 'yum'
"info Is used to list a description and summary information about available packages".
Thus it is listing only packages, Available in repositories.enter code here
Related
After I use yum installed the php7.0:
yum install php70w
now how to start it?
# whereis php
php: /usr/bin/php /usr/lib64/php /etc/php.d /etc/php.ini /usr/local/bin/php /usr/share/php /usr/share/man/man1/php.1.gz
I also can not find the php-fpm:
# find / -name php-fpm
I installed apache, in /usr/local/httpd/.
EDIT-1
# yum install php7.0 libapache2-mod-php7.0
loaded:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* epel: mirror.premi.st
* extras: mirrors.163.com
* updates: mirrors.163.com
* webtatic: sp.repo.webtatic.com
No package php7.0
No package libapache2-mod-php7.0
Error: there is no ..
First To see the available options for PHP modules and libraries, you can type this into your system:
sudo yum search php-
The results are all optional components that you can install. It will give you a short description for each:
php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php-cli.x86_64 : Command-line interface for PHP
php-common.x86_64 : Common files for PHP
php-dba.x86_64 : A database abstraction layer module for PHP applications
php-devel.x86_64 : Files needed for building PHP extensions
php-embedded.x86_64 : PHP library for embedding in applications
php-enchant.x86_64 : Enchant spelling extension for PHP applications
php-fpm.x86_64 : PHP FastCGI Process Manager
php-gd.x86_64 : A module for PHP applications for using the gd graphics library
. . .
To get more information about what each module does, you can either search the internet, or you can look at the long description in the package by typing:
yum info package_name
There will be a lot of output, with one field called Description which will have a longer explanation of the functionality that the module provides.
For example, to find out what the php-fpm module does, we could type this:
sudo yum info php-fpm
Along with a large amount of other information, you'll find something that looks like this:
. . .
Summary : PHP FastCGI Process Manager
URL : http://www.php.net/
License : PHP and Zend and BSD
Description : PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI
: implementation with some additional features useful for sites of
: any size, especially busier sites.
If, after researching, you decide you would like to install a package, you can do so by using the yum install command like we have been doing for our other software.
If we decided that php-fpm is something that we need, we could type:
sudo yum install php-fpm
If you want to install more than one module, you can do that by listing each one, separated by a space, following the yum install command, like this:
sudo yum install package1 package2 ...
At this point, your LAMP stack is installed and configured. We should still test out our PHP though.
I'm newbie, I'm trying to install php mod fastcgi for apache 2.2 on centos 6.8, but I got error with message: "No package mod_fastcgi available. Nothing to do".
Please help me, thank so much.
[root#host15 ~]# yum install -y mod_fastcgi
Loaded plugins: fastestmirror, priorities
Setting up Install Process
Loading mirror speeds from cached hostfile
base: mirror.digistar.vn
epel: mirrors.digipower.vn
extras: mirror.digistar.vn
remi: mirror.upb.edu.co
remi-php56: mirror.upb.edu.co
remi-safe: mirror.upb.edu.co
updates: mirrors.viethosting.com
2347 packages excluded due to repository priority protections
No package mod_fastcgi available.
Error: Nothing to do
This mod_fastcgi extension is dead for years, and not available in the repositories.
You can use, instead
mod_fcgid, see its documentation and package information
mod_proxy_fcgi, see its documentation and package information
The second one is a backport from httpd 2.4 to 2.2 of the default fastcgi implementation. To use it, see the ProxyPass directive.
It's a known fact that on Fedora/RHEL/CentOS 7.x based systems PHP 5.4.16 is the supported version. However, for my application I needed PHP 5.5 and I installed it from RHEL-recommended scl-utils repository as explained on https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/scl-utils.html
The problem is that I have successfully installed all required packages except php55-php-mcrypt:
yum install php55-php-mcrypt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.sonic.net
* epel: mirror.hmc.edu
* extras: mirror.keystealth.org
* updates: mirrors.easynews.com
No package php55-php-mcrypt available.
Error: Nothing to do
Could anyone recommend a way to get this package installed?
Explanation why "mcrypt" is a very bad idea, and is not part of standard repository : About libmcrypt and php-mcrypt
For people who want to use the official RHSCL packages on RHEL (which is also available in centos-scl repository), you can find additional packages in the community repositories:
php55 => php55more
rh-php56 => php56more
Else, yes my repository is an alternative, see the Configuration Wizard
Switch to the Remi repo. It has 5.5, 5.6 and 7.0 available and they are supported as long as the PHP project supports them. Better still, he breaks that support into separate repos, so you pick the one you want and install the php-* RPMs. When you're ready to upgrade, enable the next repo and just yum update.
RPM of PHP version 7.0.2 are available in remi-php70 repository for Fedora and Enterprise Linux (RHEL, CentOS).
RPM of PHP version 5.6.17 are available in remi repository for Fedora ≥ 21 and remi-php56 repository for Fedora and Enterprise Linux.
RPM of PHP version 5.5.31 are available in remi repository for Fedora 20 and in remi-php55 repository for Enterprise Linux.
I can't install any package related PHP, I get a yum error: No package php available.
My PHP version is 5.4.37 on Centos 7. I installed remi for other purposes and I think that the repository is not compatible with PHP version but I don't know how to fix it.
[root#server ~]# sudo yum install php php-pear
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centosmirror.netcup.net
* epel: mirrors.n-ix.net
* extras: centosmirror.netcup.net
* remi: mirror5.layerjet.com
* remi-safe: mirror5.layerjet.com
* updates: centosmirror.netcup.net
No package php available.
No package php-pear available.
Error: Nothing to do
You have, in yum configuration:
exclude=apache* httpd* mod_* mysql* MySQL* mariadb* da_* ftp exim* sendmail* php* bind-chroot*
This is very probably a "panel" enabled server (cpanel or others), which provides its own PHP stack.
So by design, you cannot install "php*" packages from standard repository or any other 3rd party repository. Such distribution is so altered, that it is often considered as "Not CentOS".
So, better to ask your php stack provider for how to update it (if possible, without breaking the panel application)
As suggested in other answer, this may be related to excludes set in yum.conf
The command below allows to run the installation of excluded packages without modifying the conf file:
yum --disableexcludes=main install php
BUT
It seems like it might be better to re-install PHP by the means of the control panel installed. IE Cpanel - EasyApache..
I have an unmanaged VPS server preinstalled with CentOs 6.6 and WHM/CPanel. I am trying to install php-ldap but it just says package not found. I have not been able to find anywhere what repository it should be in. How can I install ldap on my server to work with php 5.4? I am trying to manage Windows Server 2012 R2 Active Directory.
root#vps [~]# yum install php-ldap
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.5ninesolutions.com
* epel: fedora-epel.mirror.lstn.net
* extras: centos.arvixe.com
* updates: pubmirrors.dal.corespace.com
No package php-ldap available.
Error: Nothing to do
root#vps [~]#
On a cpanel serveur you probably have an "exclude" line in yum.conf (see I can't install any package related to PHP with yum) which prevent you to install/upgrade php from another repository.
To see the provider of "php", user this command
rpm -qf $(which php)
And the ldap extension, if available will be in the same namespace.
Notice switch the php stack from the cpanel provider to another repo can break it.
You need to understand that the base repos typically don't contain boutique builds for PHP. Your best bet is to install a different repo, like the Remi repo, which does contain that RPM.
While I'm at it, PHP 5.4 went End-of-life 4 days ago. Remi offers 5.5 and 5.6 so you should consider upgrading
Get the php version you are running by
php -v
if not worked try
rpm -qa |grep php
if the php version is 5.4 then use
sudo yum install php54w-ldap
if 5.6
sudo yum install php56w-ldap
and so on.