Issue
I followed the phalcon documentation and added the repo to my system.
> curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.rpm.sh | sudo bash
...
The repository is setup! You can now install packages.
But then when I continue to follow documentation:
> yum install php70u-phalcon
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package php70u-phalcon available.
And searching for phalcon does not return anything:
> yum search phalcon
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Warning: No matches found for: phalcon
So where am I going wrong?
Solution
Unfortunately Phalcon documentation install guide just doesn't work. Believe or not it's easier to compile phalcon extension from scratch.
I have a cookbook that I always use when create a new EC2 instance and have to install phalcon extension:
Installing php7.2 and some of its extensions
amazon-linux-extras install php7.2 -y
yum install php-bcmath php-gd php-mbstring php-pecl-mcrypt php-mysqlnd php-opcache php-pdo php-pecl-igbinary php-pgsql php-process php-soap php-xml php-xmlrpc -y
Installing some packages needed for compiling phalcon
yum install php-devel gcc libtool pcre-devel re2c -y
cd /tmp
yum install git -y
Installing phalcon 3.4.x since I'm not feeling 4.0 reliable enough
git clone https://github.com/phalcon/cphalcon
cd cphalcon/build
git checkout origin/3.4.x
This code is just in case you don't have enough RAM
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=5120
chmod 600 /var/swap.1
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1
Compiling phalcon. It may take several minutes
sudo ./install
Enabling phalcon extension
echo "; Enable phalcon extension module
extension=phalcon.so" >> /etc/php.d/50-phalcon.ini
Restarting services
service httpd restart
service php-fpm restart
Again, this commands are just if you don't have enough RAM
/sbin/swapoff /var/swap.1
rm -rf /var/swap.1
Hope it helps ;)
Answered By - Volkkerine Answer Checked By - Cary Denson (WPSolving Admin)