Installing php 8 standalone on rhel just for command line

Forum for you who has PHP installation issues

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 1
Joined: Sat Feb 06, 2021 11:17 am

Sat Feb 06, 2021 11:26 am

I currently have a windows server that I installed php on by just unzipping it into a folder and then updating the php config to run standalone scripts from the command prompt and bat files. We are moving to rhel 8.x and I want to do the same thing. I follow the instructions here: but when I get to the php install, it says it is going to install apache and nginx and then php for nginx. On the windows machine, I would did not install it so it was pathed. I just did c:\php\php.exe when I wanted to run something.

2 questions, can I use the installer to install php standalone? If not, can I just uncompress a compatible version into a folder as I did on windows and will it just run if I do /php/php?
php-forum Fan User
php-forum Fan User
Posts: 90
Joined: Mon Jun 08, 2020 2:00 am

Sun Feb 07, 2021 10:09 am

Just use:

Code: Select all

sudo dnf install php php-cli
That will install the interpreter and the CLI, but won't give you the apache / nginx stuff.
Post Reply