Update Cent OS packages? - php

I just Installed Cent OS 6.5 and I am amazed with a few things.
Why the PHP version is only 5.3.3, MySQL 5.1.73, Apache 2.2.15?
If I run the yum commands to update them no updates are found.
Is there a reason the default installation contains so old versions and how to update them to the latest one please?

Running these two commands should install a newer version of the EPEL repo, enabling you to install a newer version of PHP, etc, but you should find the repository which has the versions which you require.
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

Please try below
yum update php*
If you have rpm package then you can use rpm -U option to upgrade existing packages.

Related

how to upgrade from php 7.0 to php 7.3 on Debian 9.1

I have a Debian 9.1 droplet on DigitalOcean. 1GB Memory, 30GB Disk.
I've previously installed php 7.0 using
apt install php php-fpm
I also ran the following commands to install php modules:
apt-get install php-mysql
apt-get install php-curl
apt-get install php-zip
apt-get install php-apcu
apt-get install php-xml
How do I now upgrade from 7.0 to 7.3?
Just to give you an idea of how you can do it:
Basically, you need to follow two steps:
Install the 7.3 version as you did for 7.0 (you can pass the version number to install the exact version number)
You need to configure your PHP CLI to use the new version 7.3 instead of 7.0.
The above steps can be done for every version.
Here is documentation of how you can do it in case of migration from 7 to 8.
NOTE: The documentation will help you to install a version of PHP and configure CLI so you need to make sure to do the updates as per 7.3.
sudo-apt update
sudo apt-get install php-fpm
This will go try to update it if see you already have php-fpm...
Your repository should be updated to understand there is new version of php that is available for download
you can also remove & purge it and try to download it again...
but also consider some services needs to be updated and set to use last version of php that is currently installed...
Like Nginx ,in that you should update for .conf file to read php 7.3 or any installed versions
you can also check how many versions php do you have by going to directory by this command cd /etc/php and do ls

Installation error ImageMagick on Linux CentOS release 6.8

for the Joomla component to work, I need the ImageMagick package, which I decided to install under this instruction https://codebeer.ru/ustanovka-imagemagick-v-centos-7/
But during the installation after the command yum install gcc php-devel php-pear
Received an Error:
php71w-common conflicts with php-common-5.3.3-49.el6.x86_64
Version of my Linux CentOS 6.8
It is required to correctly install the package and the extension for PHP ImageMagic.
All installation instructions have already tried, unfortunately the error does not pass, but the package is not installed, I'm new to setting up servers, so I ask for help.
As you should always do, backup your server/data before making any possible breaking changes *
I'm assuming you're using php71 .. webtatic from the 'w' suffix. ( Same flavor I personally use )
** Unless you're actively using PHP5.x still **, just yum remove the conflicting PHP5 package
yum remove php-common
Then re-yum your imagick package and you should be all good.

How to install a newer version of PHP than what Yum installs?

I have installed PHP by executing the following command:
yum install php
It installs PHP 5.3.3 in my server... but I want to install PHP 5.4. How can I do that?
Saw it on https://webtatic.com/packages/php54/
To install, first you must add the Webtatic EL yum repository information corresponding to your CentOS/RHEL version to yum:
CentOS/RHEL 7.x:
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
CentOS/RHEL 6.x:
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
CentOS/RHEL 5.x:
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
Now you can install php by doing:
yum install php54w
yum installs approved versions of packages. The approved version depends on a few things, such as your distribution and whether the package itself has been tested and deemed as working. This testing can sometimes lag well behind the development of the packages. Chances are that the version that you have installed is the latest approved version.
Building PHP isn't manually terribly difficult, so that's probably your best option. Uninstall the version you have from yum and checkout the official instructions on how to clone and build yourself.
Either that or look around for other packages in yum that give you a newer version (see #barbarity's answer).
Reference http://ahmed.amayem.com/replacing-yum-plugin-replace-one-yum-install-package-php-with-another-on-linux-centos-6/
Check available packages
rpm -q php
Installing the webtatic release RPM(For CentOs 6.x)
sudo rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
Check for available packages in other repo
yum info php55w
Trying to update using yum update
sudo yum update php
Updating using yum remove then yum install
yum info php-common
Removing php-common
sudo yum remove php-common
Installing php55w and php55w-common
sudo yum install php55w php55w-common
Now restart your apache server then check the php version.

Conflict when installing PHP intl extension for composer on Centos 7

I am trying to do a Magento 2 DRC installation on a remote linux server, running Centos 7, Apache 2.4.6, MariaDB and PHP v5.6.9. When I try to install Composer I get the following message:
$ cd /var/www/html/magento2 && composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-intl * is missing from your system.
I have installed ext-intl using:
yum list php*intl
and
yum install php-intl
But is still gives me the same message.
I have tried various other installations to get around the problem, to no avail. Any suggestions would be gratefully erceived as it is stalling the project.
Would it help to downgrade to PHP 5.5?
You can follow the below steps for magento2 installation on Centos 7.
http://gotechnies.com/install-magento2-centos-7/
There are few easy steps to install Magento 2(M2) on Centos Distro.
Step 1-:
First of all we need to add few EPEL repositories for the php5.6, mysql-server5.6, and phpmyadmin.
# EPEL Repository for php5.6
$ rpm -iUvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ rpm -iUvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# EPEL Repository for mysql-server5.6
$rpm -iUvh http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
# EPEL Repository for phpMyadmin on Centos 7
$ rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
$ yum -y update
Step 2-:
Install Require packages like apache, php5.6, mysql-server, phpmyadmin.
$ yum install-y httpd php mysql-server phpmyadmin php56w-mcrypt php56w-intl php56w-xsl git
To allow the phpmyadmin in apache 2.4 add the line
Require all granted
Readmore go to above link
Magento2 installation on RHEL/Centos 7 with Php7.
Subscribing to the IUS Community Project Repository
Since PHP 7.x is not yet packaged in official repositories for the major distributions, we’ll have to rely on a third-party source. Several repositories offer PHP 7 RPM files. We’ll use the IUS repository.
IUS offers an installation script for subscribing to their repository and importing associated GPG keys. Make sure you’re in your home directory, and retrieve the script using curl:
curl 'https://setup.ius.io/' -o setup-ius.sh
sudo bash setup-ius.sh
Install Required Packages-:
sudo yum install -y mod_php70u php70u-cli php70u-mysqlnd php70u-json php70u-gd php70u-dom php70u-simplexml php70u-mcrypt php70u-intl httpd mysql-server git
See my Article for Complete Installation magento2-php7-centos7-mysql5.7
The extension has to be installed and activated for the command line PHP, not only for the web server PHP. If you run php -i, which is the CLI equivalent of running phpinfo(), you should see a section containing info about the "intl" extension. If this is missing, you'd also see the path to the "php.ini" file that is being used - this is where you should double check whether or not the extension is activated or not.
Most of the time, it is not.

Install phpMyAdmin in Centos 6

I am installing mysql and php on CentOS 6. While trying to install phpMyAdmin i am getting the following error on command prompt
No package phpMyAdmin available.
Nothing to do
I am following the below tutorial to install and configure my server. This is my first attempt to install and setup my server
LINK
Please guide me
Thank you
I wanted the latest version (4.0.5), not the 3.5 version in EPEL and found this information which worked perfectly for me:
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum --enablerepo=remi install phpmyadmin
from http://www.if-not-true-then-false.com/2012/install-phpmyadmin-on-fedora-centos-red-hat-rhel/
Phpmyadmin isn't shipped with Centos. But there are unofficial repositories for phpmyadmin. I suggest you install the EPEL.
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
or
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
and than install using the enablerepo flag
yum --enabledrepo=epel install phpmyadmin
At the moment the phpmyadmin package in the epel repo is not the latest version (4.0.3), but it's the most recent 3.5.x version.
A small warning: don't install phpmyadmin from the RPMforge repo. Since this repo is somewhere at version 2.
It's about two months since the questions was asked, so I don't expect to be of any use to the original question author, but there are always people visiting old questions with the same problem.
To get the packages we need, we'll have to add an additional repo to our system. The EPEL repo (Extra Packages for Enterprise Linux) contains many additional packages, including the phpMyAdmin package we are looking for.
The EPEL repository can be made available to your server by installing a special package called epel-release. This will reconfigure your repository list and give you access to the EPEL packages.
To install, just type:
sudo yum install epel-release
Now that the EPEL repo is configured, you can install the phpMyAdmin package using the yum packaging system by typing:
sudo yum install phpmyadmin
You can't find it as the directions state you need to add the package (myAdmin) to your repository first, update then install with Yum. You need to search an alternate way to add to your repo , then update ya repo, then install :)
For that you can download phpMyAdmin from here
after downloading use rpm -ivh packagename.rpm or follow your tutorial it wont show above error
You can just download phpmyadmin from here:
https://www.phpmyadmin.net/
and unzip and move to apache root directory
then you can check that in your url.
sudo yum install epel-release
-some version this command not works
To Install Phymyadmin sometimes this command not works
so use this below command
sudo amazon-linux-extras install epel

Categories