To sync a correct time on your Redhat server with a NTP publicly available time servers first you need to install ntpdate package:
[root@rhel7 ~]# yum install ntpdate
To check your current time use date command:
[root@rhel7 ~]# date
Thu Sep  4 17:20:42 WST 2014
Next, we can use pool.ntp.org timeserver to synchronize our time. This is be done with ntpdate command:
[root@rhel7 ~]# ntpdate pool.ntp.org
11 Dec 06:08:13 ntpdate[2225]: step time server 173.230.144.109 offset 8426822.014383 sec

Changing a timezone on Redhat 7 Linux server is a easy task which can be done on a command line with a few commands. First find your timezone using timedatectl command. The following linux command will list all timezones:
[root@rhel7 ~]# timedatectl list-timezones
To narrow down the search you can use grep to search for a specific city. For example:
[root@rhel7 ~]# timedatectl list-timezones | grep -i bratislava
Europe/Bratislava

In order to install of PIP the Python packaging tool on RHEL 7 Linux we first need to install its only pre-requisite and that is setuptools package otherwise we will get a following error message:
Downloading/unpacking pip
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement pip
Cleaning up...
No distributions at all found for pip
Storing debug log for failure in /root/.pip/pip.log
From this reason we first install setuptools:
[root@rhel7 ~]# wget https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.tar.gz --no-check-certificate
[root@rhel7 ~]# tar xzf setuptools-7.0.tar.gz
[root@rhel7 ~]# cd setuptools-7.0
[root@rhel7 ~]# python setup.py install
...
Installed /usr/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg
Processing dependencies for setuptools==7.0
Finished processing dependencies for setuptools==7.0

The following config will help you to configure a virtual network interface to allow you to have multiple additional network IP address on a single hardware network interface. For example our RHEL server has currently a single hardware network interface called eth0. This interface is used as a master network interface with an IP address of 10.1.1.110. To this network interface we will attach two additional virtual network interfaces eth0:0 - 10.1.1.111 and eth0:1 - 10.1.1.112. Let's get started by showing a current network configuration:
[root@rhel7 ~]# ip addr show
Show network configuration on RHEL7 linux
From the above output we can see that currently we have configured eth0 network interface only. Next, we are going to locate a corresponding network interface configuration file for eth0:
# grep -l DEVICE.*eth0 /etc/sysconfig/network-scripts/*

In this config we are going to configure a network interface to receive an IP configuration settings from DHCP server. First get the name of the network interface you would like to set as DHCP client. To do this you can run command:
# ip addr show
2: enp0s3:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:15:38:b7 brd ff:ff:ff:ff:ff:ff
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe15:38b7/64 scope link 
       valid_lft forever preferred_lft forever
Once we have located a name of the network interface in question open a corresponding configuration file. So as an example, for network interface epn0s3 vi will edit a /etc/sysconfig/network-scripts/ifcfg-enp0s3. Open this file and enter the minimum configuration settings in order to make this network interface act as a DHCP client:
DEVICE=enp0s3
BOOTPROTO=dhcp
ONBOOT=yes

There are number of ways how to find you what Redhat Linux version is my server running on. First check /etc/os-release file:
# cat /etc/os-release 
NAME="Red Hat Enterprise Linux Server"
VERSION="7.0 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.0"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.0 (Maipo)"

In this short config we will install FTP file Server on RHEL7 Linux using vsftpd. We will stick to the default vsftpd configuration which enables user accounts on our existing RHEL7 Linux system to login via FTP from a remote location, list and transfer files. Let's begin by the installation:

To install FTP server on Redhat 7 Linux we can use either tftp-server or vsftpd daemon. In this guide we use vsftpd:
[root@rhel7 ~]# yum install vsftpd
Next, we can start the vsftpd service by using a service command:
[root@rhel7 ~]# service vsftpd start
Redirecting to /bin/systemctl start  vsftpd.service
To make the FTP service startup persistent after system reboot use:
[root@rhel7 ~]# systemctl enable vsftpd
ln -s '/usr/lib/systemd/system/vsftpd.service' '/etc/systemd/system/multi-user.target.wants/vsftpd.service'

When setting up FTP server on Redhat 7 Linux box the following error message ftp: connect: No route to host may pop-up during FTP client session:
ftp server error client rhel7 ftp: connect: No route to host


In this quick config we will setup the Berkeley Internet Name Domain (DNS) service named. First, let's briefly describe our environment and proposed scenario. We will be setting up a DNS server to host a single zone file for domain linuxconfig.org. Our DNS server will act as a master authority for this domain and will resolve fully qualified domain (FQDN) linuxconfig.org and www.linuxconfig.org to an IP address 1.1.1.1.

Furthermore, our named daemon will be listening on a two local IP addresses, the loopback IP address 127.0.0.1 and local network interface 10.1.1.100. Lastly, the DNS server will allow queries from any external IP address.

DNS server Installation

Now that we have described our basic scenario let's begin with an DNS server installation. To install DNS server on RHEL7 use yum command below:
# yum install bind
...
RHEL_7_Disc/productid                         | 1.6 kB     00:00     
  Verifying  : 32:bind-9.9.4-14.el7.x86_64                       1/2 
  Verifying  : 32:bind-libs-9.9.4-14.el7.x86_64                  2/2 

Installed:
  bind.x86_64 32:9.9.4-14.el7                                        

Dependency Installed:
  bind-libs.x86_64 32:9.9.4-14.el7                                   

Complete!
Once the DNS installation is finished we will now make a quick configuration to make named daemon listen on our loopback and local network interface address:
[root@rhel7 ~] # ip addr show | grep inet
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
    inet 10.1.1.110/8 brd 10.255.255.255 scope global enp0s3
    inet6 fe80::a00:27ff:fe15:38b7/64 scope link

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:

Chrome browser is not a part of standard Redhat repositories and therefore its installation needs to be performed using external package provided by Google Inc. First download chrome browser package:
[rhel7@rhel7 ~]$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
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.

You may also be interested in: