yum list available

yum list all available packages in a repo

To list all packages available on a specific repo, run

Example:

yum list available

This command list all packages available in repo “litespeed”

Install PHP 7 on CentOS VestaCP

To install PHP 7. you need to first enable epel and remi repo.

Remove existing PHP

Install PHP 7.3

start php-fpm

Set php 7.3 as default PHP for cli

Restart apache

rpm verify packages

To verify a package installed on system, you can use

Example

Here bind package have /etc/named.conf file modified.

To verify all packages on system, run

CentOS 7 resolv.conf make changes permanent

On rebooting CentOS 7 server, changes made to resolv.conf is lost. This is becaise one of the network interface is configured to use DNS server.

To fix, edit

Remove the line

Now NetworkManager will not modify /etc/resolv.conf file on boot.

Or you can set valid DNS servers in network config file like

If your network configuration use DHCP, set set PEERDNS=no.

Another solution is to make file immutable with

Related Posts

Domain Resolver

OpenLiteSpeed Benchmark

Install OpenLiteSpeed on CentOS

To install OpenLiteSpeed web server on CentOS, install repository for your CentOS version

For CentOS 6

For CentOS 7

For CentOS 8

To install OpenLiteSpeed, run

Before you can install PHP, you need epel repository enabled with

Install PHP with

Set symlink

Start OpenLiteSpeed with

To stop OpenLiteSpeed, run

By default, OpenLiteSpeed will run on port 8088

You can login to Admin Interface at

By default, you see an example application. The configuration file for this is at

Default DocumentRoot is /usr/local/lsws/Example/html. To change, edit file

Find

Replace $VH_ROOT/html/ with whatever path you need. You need to restart OpenLiteSpeed to make the change go live

CentOS 7 VestaCP Upgrade PHP to 7.x

On CentOS 7 VestaCP install PHP 5.6 by default. This is very old version of PHP. To upgrade PHP to latest version 7.x, you can install remi repo.

Install EPEL repo

Install yum-utils

Install remi repo

Select PHP version you need

Here i selected PHP 7.3. You can select differnt PHP versions with commands like.

Make sure you only enable one PHP version. If you enabled a PHP version from remi repo, disable it with

Once you have desired version enabled, run yum upgrade

Or only for PHP, run

WHM php.ini editor

Disable PHP disable_functions on Cpanel Server

On a Cpanel Server using CentOS 7 + php-fpm, site phpinfo() shows few functions are set to disabled in disable_functions.

PHP disable_functions

I checked server wide PHP configuration in WHM for the PHP version the site is using. There is no disable_functions specified.

WHM php.ini editor

This is because in Cpanel server running in PHP-FPM, you need to edit php-fpm pool config file at

Replace ea-php73 with whatever PHP version you selected for this web site.

Remove the line

Restart php-fpm with

See Cpanel Server