![]() ![]() These are also most of the extensions you’ll need if you are installing WordPress.Īnd that’s all. Here’s how to install some of the most common PHP extensions: yum install php-fpm php-curl php-cli php-json php-mysql php-opcache php-dom php-exif php-fileinfo php-zip php-mbstring php-hash php-imagick php-openssl php-pcre php-xml php-bcmath php-filter php-pear php-gd php-mcrypt php-intl php-iconv php-zlib php-xmlreader To install a PHP package, just run the yum install php- command. There are some PHP extensions that are often used and needed for various apps and use-cases. Which should give you a result similar to: PHP 8.1.2 (cli) (built: 23:52:03) (NTS gcc x86_64) Step 4: Install PHP extensions You can verify if PHP was installed by running php -v Update the repos again: yum update Step 3: Install PHP on CentOSĪnd finally, after you enabled the PHP 8.1 module, you can install PHP 8.1 (or whatever version you enabled) with the following command: yum install php You can also install any other version of PHP by updating the command for the PHP module above. If you’re using CentOS 8, run: yum module enable php:remi-8.1 If you’re using CentOS 7, run: yum-config-manager -enable remi-php81 If you’re using CentOS 8, run: yum install If you’re using CentOS 7, run: yum install Next, we’ll need the Remi RPM repository. Step 1: Update CentOSĪs always, you need to update your CentOS first: yum update Step 2: Install and configure necessary packagesįirst, you need to install the necessary (extra) packages: yum install epel-release yum-utils So if you just run the yum install php command on CentOS, you’ll get outdated versions.įollow our tutorial to get the latest version of PHP on CentOS. CentOS 7 also has no PHP installed and the default version in the repos is 5.4.16 – which is way past its EOL. ![]() As of writing, by default, CentOS 8 has no PHP installed, and the default version in the repos is PHP 7.2.24 – which is already past its EOL. You can get a Linux VPS from any provider.ĭepending on what kind of a distro setup you’re using and when you’re reading this, CentOS might have different versions included in their repos. We tested this tutorial on CentOS 7 and CentOS 8 servers from Linode, but these instructions will work on any other RHEL-based distro. SSH access to the server (or just open Terminal if you’re on a desktop). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |