{"id":5668,"date":"2024-01-04T07:57:39","date_gmt":"2024-01-04T07:57:39","guid":{"rendered":"https:\/\/natsav.com\/blog\/?p=5668"},"modified":"2024-01-25T11:40:32","modified_gmt":"2024-01-25T11:40:32","slug":"install-php-7-4-on-centos-7","status":"publish","type":"post","link":"https:\/\/natsav.com\/blog\/install-php-7-4-on-centos-7\/","title":{"rendered":"How to Install php 7.4 in centos 7"},"content":{"rendered":"<p><span style=\"color: #000000;\">To install PHP 7.4 on CentOS 7, you can use the Remi repository, which provides up-to-date versions of PHP. <\/span><br \/>\n<span style=\"color: #000000;\">Here&#8217;s a step-by-step guide:-<\/span><\/p>\n<p><strong><span style=\"color: #000000;\"><span style=\"text-decoration: underline;\">Step 1:- Enable the Remi Repository<\/span>:-<\/span><br \/>\n<\/strong><span style=\"color: #333333;\">a) Install the EPEL repository first, as Remi repository depends on it.<\/span><br \/>\n<span style=\"color: #333333;\"># [ sudo yum install epel-release ]<\/span><br \/>\n<span style=\"color: #333333;\">b) Now, enable the Remi repository.<\/span><br \/>\n<span style=\"color: #333333;\"># [ sudo yum install -y https:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm ]<\/span><br \/>\n<span style=\"color: #333333;\">c) Enable the Remi repository.<\/span><br \/>\n<span style=\"color: #333333;\"># [ sudo yum-config-manager &#8211;enable remi-php74 ]<\/span><\/p>\n<p><strong><span style=\"color: #000000;\"><span style=\"text-decoration: underline;\">Step 2:- Install PHP 7.4<\/span>:-<\/span><br \/>\n<\/strong><span style=\"color: #333333;\">Now, you can install PHP 7.4 along with common extensions.<\/span><br \/>\n<span style=\"color: #333333;\"># [ sudo yum install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json ]<\/span><\/p>\n<p><strong><span style=\"color: #000000;\"><span style=\"text-decoration: underline;\">Step 3:- Start PHP-FPM (if you installed it)<\/span>:-<\/span><br \/>\n<\/strong><span style=\"color: #333333;\">If you installed PHP-FPM, start and enable it to run on system boot.<\/span><br \/>\n<span style=\"color: #333333;\"># [ sudo systemctl start php-fpm ]<\/span><br \/>\n<span style=\"color: #333333;\"># [ sudo systemctl enable php-fpm ]<\/span><\/p>\n<p><strong><span style=\"color: #000000;\"><span style=\"text-decoration: underline;\">Step 4:- Verify the PHP Installation<\/span>:-<\/span><br \/>\n<\/strong><span style=\"color: #333333;\">You can check the installed PHP version with.<\/span><br \/>\n<span style=\"color: #333333;\"># [ php -v ]<\/span><br \/>\n<span style=\"color: #333333;\">This should display information about PHP, confirming that version 7.4 is installed.<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong><span style=\"text-decoration: underline;\">Conclusion<\/span>:-<\/strong><\/span><span style=\"color: #333333;\"> That&#8217;s it! You&#8217;ve successfully installed PHP 7.4 on CentOS 7 using the Remi repository. Adjust the package list as needed based on your specific requirements.<\/span><\/p>\n<p><span style=\"color: #333333;\"><strong>\u00a0<\/strong><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To install PHP 7.4 on CentOS 7, you can use the Remi repository, which provides up-to-date versions of PHP. Here&#8217;s a step-by-step guide:- Step 1:- Enable the Remi Repository:- a) Install the EPEL repository first, as Remi repository depends on it. # [ sudo yum install epel-release ] b) Now, enable the Remi repository. # [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5676,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[256],"tags":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/natsav.com\/blog\/wp-content\/uploads\/2024\/01\/php.png?fit=587%2C312&ssl=1","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5668"}],"collection":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/comments?post=5668"}],"version-history":[{"count":4,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5668\/revisions"}],"predecessor-version":[{"id":5678,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5668\/revisions\/5678"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media\/5676"}],"wp:attachment":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media?parent=5668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/categories?post=5668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/tags?post=5668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}