Apache installation with mod_fcgi for httpd24 centos 6.9 - centos6

I have installed php and apache in my centos 6.9 for apache version 2.4 and php version 5.6 as below:
yum install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum install epel-release
yum repolist
yum --enablerepo=extras install centos-release-scl
yum install httpd24
yum install -y libapache2-mod-fastcgi rh-php56-fpm rh-php56 rh-php56-php rh-php56 rh-php56-cli
but I can't see mod_fcgi.so is in /opt/rh/httpd24/root/etc/httpd/modules directory.
Hence I downloaded the mod_fcgi from http://httpd.apache.org/download.cgi#mod_fcgid.
Need an way so that I can install it existing apache modules
Many thanks in advance

Using httpd24 from Software Collection, you already have mod_proxy_fcgi, other old modules are deprecated.
I recommend you to read PHP Configuration Tips about such configuration (notice, this was written for CentOS 7 but works on CentOS 6 using httpd24)

Related

How to configure and build lzma on CentOS 6?

I am trying to configure and build lzma version 5.0.3 or higher on CentOS 6. I try install R version 3.5.2.
./configure --enable-R-shlib
But this error
Checking if lzma version >= 5.0.3... no
I installed lzma version 4.999.
There is no 5.x.x version package available for CentOS 6
They are having beta version at 4.9.9
Click to check
I suggest you to upgrade your CentOS 6 to CentOS 7
And then you will get support in OS to install latest distribution of this and other packages
sudo yum install xz
And also you can go to this link and download it manually and install it us
sudo rpm -i {package}
R 3.5.2 is available in EPEL repository.
Just install it from packages:
yum install epel-release
yum install R

RuntimeException: The bcmath extension is required by NumberFormatter

I have installed drupal commerce module. I am getting the below error while viewing a product page.
RuntimeException: The bcmath extension is required by NumberFormatter. in CommerceGuys\Intl\Formatter\NumberFormatter->__construct() (line 113 of /home/web/docroot/vendor/commerceguys/intl/src/Formatter/NumberFormatter.php).
You have bcmath error and you need to install PHP bcmath extension.
sudo apt install php7.2-bcmath
You can check enabled extensions with php function. get_loaded_extensions()
Install php-bcmath with dependencies
yum install php-bcmath
Based on your PHP version you have to install bcmath extension.
for 7.2
sudo apt install php7.2-bcmath
for 7.4
sudo apt install php7.2-bcmath
Once done with installation you have to restart apache server then only it will start.
sudo service apache2 restart

How to install PHP 7.1 on EC2 running on Amazon Linux AMI 2018.03 having nginx as web server?

How to install PHP 7.1 on Amazon EC2 t2.micro Instance running Amazon Linux AMI 2018.03 having nginx as web server?
Reference to PHP7
With reference to this answer, change Step 1 to the following:
1. Install Apache 2.4 and PHP 7.1 on Amazon Linux AMI
# Remove current apache & php
sudo yum remove httpd* php*
# Install Apache 2.4
sudo yum install httpd24
# Install PHP 7.1
sudo yum install php71
# Install additional commonly used php packages
sudo yum install php71-gd
sudo yum install php71-imap
sudo yum install php71-mbstring
sudo yum install php71-mysqlnd
sudo yum install php71-opcache
sudo yum install php71-pdo
sudo yum install php71-pecl-apcu
Basically replacing php70 with php71.
Continue with step 2 and the rest as per the original tutorial.
I followed below steps to install PHP7.1 which had already Nginx as web server for Amazon Linux AMI 2018.03
#Remove Old PHP
yum remove php*
#Update Reposistory
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
#Update Amazon AMI
yum upgrade -y
#Install PHP
#List of PHP packages https://webtatic.com/packages/php71/
yum install php71w php71w-cli php71w-fpm
yum install php71w-mysql php71w-xml php71w-curl
yum install php71w-opcache php71w-pdo php71w-gd
yum install php71w-pecl-apcu php71w-mbstring php71w-imap
yum install php71w-pecl-redis php71w-mcrypt
#change listen mode to CGI
sed -i 's/127.0.0.1:9000/\/tmp\/php5-fpm.sock/g' /etc/php-fpm.d/www.conf
/etc/init.d/php-fpm restart
touch /tmp/php5-fpm.sock
chmod 777 /tmp/php5-fpm.sock
service nginx restart
The reason I am still using /tmp/php5-fpm.sock file so that I do not need to change PHP7 sock file in all website nginx conf and assuming server do not have PHP5 as as on first step it has been removed.
A reliable way to achieve the same output is by following commands on Amazon Linux AMI 2.
# Remove current php & apache
sudo service httpd stop
sudo yum remove httpd* php*
sudo yum install httpd
amazon-linux-extras install php7.1

Upgrading nginx on Centos 6.8

I'm trying to update Nginx on Centos 6.8. I tried
sudo vi /etc/yum.repos.d/nginx.repo
and then changing the nginx.repo to
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
and then ran:
sudo yum update && sudo yum install nginx
But when I check the version with nginx -v, it's still version 1.9.2.
I also tried quitting and reloading, but neither did anything.
Also tried:
cd /opt
wget http://nginx.org/packages/centos/6/x86_64/RPMS/nginx-1.10.1-1.el6.ngx.x86_64.rpm
yum update nginx-1.10.1-1.el6.ngx.x86_64.rpm
Could someone point me in the right direction?
Download the latest epel-release rpm from http://dl.fedoraproject.org/pub/epel/6/x86_64/
Install epel-release rpm:
# rpm -Uvh epel-release*rpm
Install nginx rpm package:
# yum --enablerepo=epel-testing install nginx

Installing SaltStack on RHEL 7?

I need help on installing saltstack on RHEL 7.
RHEL 7 server is from AWS Amazon.
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
I'm getting an error during installation:
$ wget -O - http://bootstrap.saltstack.org | sudo sh
2014-08-04 09:41:45 (932 KB/s) - written to stdout [177548/177548]
INFO: Found function install_red_hat_enterprise_linux_7_stable_deps
INFO: Found function install_red_hat_enterprise_linux_stable
INFO: Found function install_red_hat_enterprise_linux_stable_post
INFO: Found function install_red_hat_enterprise_linux_restart_daemons
INFO: Found function daemons_running
INFO: Running install_red_hat_enterprise_linux_7_stable_deps()
ERROR: Stable version is not available on RHEL 7 Beta/RC. Please set installation type to git.
ERROR: Failed to run install_red_hat_enterprise_linux_7_stable_deps()!!!
Is this version of RHEL 7 not supported for saltstack?
Run the following commands to install from the latest develop branch:
curl -o install_salt.sh -L https://bootstrap.saltstack.com
sudo sh install_salt.sh -M git develop
Remove the -M from the command above if you don't want to install a salt-master and only want to install salt-minion.
I have a similar problem, I tried to install it from epel 7 beta, but there's another problem, see https://bugzilla.redhat.com/show_bug.cgi?id=1127348. Finally I was able to install it by combining pip and yum. I don't have the exact sequence of commands, but sth. like this should work:
yum install --skip-broken salt python-pip
pip install jinja2
I have tried installing SaltStack on CentOS 7 , which should be similar to Redhat 7, and you could try it, hope it works for you:
**[updated]** http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
and then you could
yum install -y salt-master
or
yum install -y install salt-minion
to install it.
You need to enable the rhel-7-server-optional-rpms repo in subscription-manager.

Resources