Centos 7 üzerine PHP 7.2 yi yum yöneticisi ile nasıl kurulur, buyrun buradan;
İlk olarak makinede php varsa kaldırın;
# yum remove php* -y
Daha sonra epel-release reposunu dahil edelim.
# yum install epel-release # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
Artık php7.2 paketlerine ulaşabiliyoruz, listesine şöyle bakabiliriz;
# yum --enablerepo=remi-php72 search php | grep php72
Şimdi yüklemeye hazırız.
# yum --enablerepo=remi-php72 install php72.x86_64 php72-php.x86_64 php72-php-bcmath.x86_64 php72-php-cli.x86_64 php72-php-common.x86_64 php72-php-dba.x86_64 php72-php-devel.x86_64 php72-php-fpm.x86_64 php72-php-gd.x86_64 php72-php-geos.x86_64 php72-php-json.x86_64 php72-php-mbstring.x86_64 php72-php-mysqlnd.x86_64 php72-php-pdo.x86_64 -y
Herşey yolunda gitti ise şu çıktıya benzer bişi görebiliriz.
# php -v
PHP 7.2.1 (cli) (built: Jan 3 2018 07:51:38) ( NTS ) Copyright (c) 1997-2017 The PHP Group
PHP-FPM Başlatma;
Eğer service php-fpm restart komutunu verince şu hatayı alıyorsanız;
# service php-fpm restart Redirecting to /bin/systemctl restart php-fpm.service Failed to restart php-fpm.service: Unit not found.
Php 72-fpm paketinin ismi biraz değiştiği için aslında bu komutu;
# service php72-php-fpm.service restart
olarak verirseniz servis başlayacaktır. Ama kolaylık olsun eskisi gibi kullanmak istiyorum derseniz;
# ln -s /usr/lib/systemd/system/php72-php-fpm.service php-fpm.service
komutunu verin ve artık “service php-fpm restart” diyerek servisinizi başlatabilirsiniz.
www.conf nerede derseniz: /etc/opt/remi/php72/php-fpm.d/www.conf
* * Eğer nginx kullanıyorsanız /etc/opt/remi/php72/php-fpm.d/www.conf dosyasını editleyip;
user = nginx
group = ngnix
yapmayı unutmayın. Dosyayı kaydettikten sonra, son dokunuş;
# service php-fpm restart