As these forums are for Directadmin administrators and users I assume you are one of them. And here we don't use rpm or yum, we build PHP from sources:
XML-RPC support in PHP is not enabled by default. You will need to use the --with-xmlrpc[=DIR] configuration option when compiling PHP to enable XML-RPC support. This extension is bundled into PHP as of 4.1.0.
I have no experience with command lines in Custom Build or Centos.
I only use DirectAdmin.
I've tried everything but get php-xmlrpc not installed.
I need this for Linking Moodle and Joomla
Please can someone give me the correct commands
The guide https://help.directadmin.com/item.php?id=252 has all the information on what files and how to edit. If it's something that scares you, it's OK. In this case you might consider hiring somebody to do it for you.