The php-mbstring is part of Redhat's server optional packages. If you have a current subscirption all you need to do is to enable this repository using:
[root@rhel7 ~]# subscription-manager repos --enable=rhel-7-server-optional-rpms
and use yum to install php-mbstring. In case that you do not have a current Redhat subscription you can install php-mbstring directly from IUS project repository:
[root@rhel7 ~]# wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/7/x86_64/ius-release-1.0-13.ius.el7.noarch.rpm
[root@rhel7 ~]# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
[root@rhel7 ~]# rpm -Uvh *release*.rpm

This tutorial will show how to setup a basing LAMP environment on RHEL7. This guide is logically split into three parts:
  • Installation of Apache Webserver
  • Installation of PHP support
  • Installation of MariaDB database
Each section will guide you step by step and will also provide simple tests to test each above step.
NOTES:
The default database MySQL was on replaced by MariaDB fork. It uses same php-mysql module to talk to MariaDB database from php script.

Installation of Apache Webserver

First we need to install Apache webserver. The package and service is called httpd:
[root@rhel7 ~]# yum install httpd
Start httpd service:
[root@rhel7 ~]# service httpd start
Redirecting to /bin/systemctl start  httpd.service
Enable firewall to allow http port 80 access:
[root@rhel7 ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent
[root@rhel7 ~]# firewall-cmd --reload

This guide will show a basic installation of the apache webserver on Redhat 7 Linux (RHEL7). The service and installation package is called as httpd. First we need to install a base apache package httpd:
[root@rhel7 ~]# yum install httpd
Now we can start httpd service:
[root@rhel7 ~]# service httpd start
Redirecting to /bin/systemctl start  httpd.service
Check the status of httpd service:
[root@rhel7 ~]# service httpd status
Redirecting to /bin/systemctl status  httpd.service
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
   Active: active (running) since Thu 2014-09-04 17:20:17 WST; 17s ago
 Main PID: 2234 (httpd)

If you get a following errors:
Sep 04 17:20:12 rhel7 httpd[2234]: AH00557: httpd: apr_sockaddr_info_get() failed for rhel7
Sep 04 17:20:12 rhel7 httpd[2234]: AH00558: httpd: Could not reliably determine 
the server's fully qualified domain name, using 127.0.0.1. Set the 'Server...his message
You can fix it by a following linux command:

SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


[root@rhel7 ~]# echo 'ServerName 127.0.0.1' >> /etc/httpd/conf/httpd.conf
[root@rhel7 ~]# service httpd restart

By default the port 80 for http connection is filtered on Redhat 7 as you can only access this port from the actual localhost and not from any other public host. To open a port 80 on RHEL 7 Linux we need to add an iptables rule. For this RHEL7 uses firewall-cmd. First add your port 80 rule with a following linux command:
[root@rhel7 ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent

Operating System

Red Hat Enterprise Linux Server release 7.0 (Maipo)

Description

The error:
httpd: apr_sockaddr_info_get() failed for rhel7
apears when starting apache webserver daemon httpd. It can be seen when executing httpd service status command:

ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.