Install PHP CLI with MySqli extension/module on Linux

So you want to use PHP from the command line or you have PHP from the command line but you don't have mysqli installed.

run the following shell script:

#!/bin/bash
echo "Are you logged in as root?";
select yn in "Yes" "No"; do
case $yn in
Yes ) echo "Okay here we go"; break;;
No ) exit;;
esac
done
echo "INSTALL PHP (cli):";
yum install php;
echo "INSTALL PHP PEAR:";
yum install php-pear;
echo "INSTALL MYSQL: (mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, sqlite3, etc..)";
yum install php-mysql;
exit;

comments powered by Disqus