Tampilkan postingan dengan label CentoS. Tampilkan semua postingan
Tampilkan postingan dengan label CentoS. Tampilkan semua postingan

Senin, 02 Februari 2015

How To Install Linux-dash Web Based Monitoring System In RHEL/CentOS

Linux-dash is a web-based lightweight monitoring dashboard for Linux machines. This application will display real-time, various system properties, such as CPU load, RAM usage, disk usage, Internet speed, network connections, RX/TX bandwidth, logged-in users, running processes etc. It will not store long term statistics, Thus it doesn’t have a backend database.

In this article i will show you how to install and setup Linux dash, Here my web server is Nginx.

Installation

First of all we should enable, EPEL repository.

Next, we need to install nginx with the following command.

yum install nginx

Install php-fpm component

yum install git php-common php-fpm

Now, we have to configure nginx for Linux-dash. So create /etc/nginx/conf.d/linuxdash.conf as follows.

nano /etc/nginx/conf.d/linuxdash.conf

server {
 server_name $domain_name;
 listen 8080;
 root /var/www;
 index index.html index.php;
 access_log /var/log/nginx/access.log;
 error_log /var/log/nginx/error.log;

 location ~* \.(?:xml|ogg|mp3|mp4|ogv|svg|svgz|eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico)$ {
 try_files $uri =404;
 expires max;
 access_log off;
 add_header Pragma public;
 add_header Cache-Control "public, must-revalidate, proxy-revalidate";
 }

 location /linux-dash {
 index index.html index.php;
 }

 # PHP-FPM via sockets
 location ~ \.php(/|$) {
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 fastcgi_split_path_info ^(.+?\.php)(/.*)$;
 fastcgi_pass unix:/var/run/php-fpm.sock;
 if (!-f $document_root$fastcgi_script_name) {
 return 404;
 }
 try_files $uri $uri/ /index.php?$args;
 include fastcgi_params;
 }
}

Next job is to configure php-fpm. Open  /etc/php-fpm.d/www.conf in your Favorite editor.

nano /etc/php-fpm.d/www.conf

Make sure to set “listen”, “user” and “group” fields as below. You can leave the rest of the configuration unchanged.

. . .
listen = /var/run/php-fpm.sock
user = nginx
group = nginx
. . .

Now, We are going to Download and install linux-dash under /var/www

git clone https://github.com/afaqurk/linux-dash.git
cp -r linux-dash/ /var/www/
chown -R nginx:nginx /var/www

Next, restart Nginx web server as well as php-fpm

/etc/init.d/nginx restart
/etc/init.d/php-fpm restart

Set nginx and php-fpm to auto-start upon boot

chkconfig nginx on
chkconfig php-fpm on

In this example, we have configured linux-dash to use TCP port 8080. So make sure that the firewall is not blocking TCP port 8080.

Monitor a Linux server with linux-dash

You can access Linux-dash by pointing you browser to http://ip.add.re.ss:8080/linux-dash/

The web dashboard consists of several widgets, each of which displays particular system properties. You can customize the look of the web dashboard by rearranging and/or closing some of the widgets.


Minggu, 01 Februari 2015

How To Install Openfire On Linux CentOS 7

Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It is also known as Jabber. It uses the only widely adopted open protocol for instant messaging, XMPP. The full name of XMPP is Extensible Messaging and Presence Protocol. It is a real-time communication protocol (which includes chat) based on XML. Installation and the management of Openfire is pretty simple.

Jumat, 30 Januari 2015

how to Install Bash Autocomplete feature on CentOS/Fedora Linux

In this article I will show how to easy install Bash Autocomplete feature on Fedora Linux or CentOS/RHEL.
You need to use YUM command to install bash-completion package on your Fedora Linux or CentOS/RHEL.
Type following command to install bash-completion package:
# yum install bash-completion -y

Example output:
# yum install bash-completion -y
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.viralvps.com
 * extras: ftp.nluug.nl
 * rpmforge: ftp.nluug.nl
 * updates: mirror.widexs.nl
Resolving Dependencies
--> Running transaction check
---> Package bash-completion.noarch 0:20060301-1.el6.rf will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
 Package                Arch          Version                    Repository       Size
=======================================================================================
Installing:
 bash-completion        noarch        20060301-1.el6.rf          rpmforge        125 k

Transaction Summary
=======================================================================================
Install       1 Package(s)

Total download size: 125 k
Installed size: 470 k
Downloading Packages:
bash-completion-20060301-1.el6.rf.noarch.rpm                    | 125 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : bash-completion-20060301-1.el6.rf.noarch                            1/1
  Verifying  : bash-completion-20060301-1.el6.rf.noarch                            1/1

Installed:
  bash-completion.noarch 0:20060301-1.el6.rf

Complete!

To use feature auto competition, your need to press TAB key (Example: yum install ht [tab][tab]):


Kamis, 29 Januari 2015

How to easy Installation ZPanel in Centos 6.4

In this article I will tell you about one interesting free control panel which is Zpanel and I will show you how to install it on a Dedicated/VPS server with Centos 6.4.

zPanel is a php-based free control panel ( free alternative to CPanel) for windows, mac, and linux servers. The program run on top of an Apache, MySQL, PHP stack on which platform is used.

Install zPanel

Log in to your server via SSH (use Putty or Terminal) as root.
First install pre-required packages:
tri@linux#yum install wget ld-linux.so.2 curl -y

Download zPanel installer:
64 bit installer
tri@linux#wget http://www.zvps.co.uk/downloads/centos/10-1-0/installer-10-1-0-centos-64.sh.x.tar.gz

32 bit installer
tri@linux#wget http://www.zvps.co.uk/downloads/centos/10-1-0/installer-10-1-0-centos-32.sh.x.tar.gz

Unzip installer:
64 Bit Installer
tri@linux#tar -xvzf installer-10-1-0-centos-64.sh.x.tar.gz

Or
32 Bit Installer
tri@linux#tar -xvzf installer-10-1-0-centos-32.sh.x.tar.gz

Change the script to be executable:
64 Bit Installer
tri@linux## chmod +x installer-10-1-0-centos-64.sh.x

Or
32 Bit Installer
tri@linux# chmod 777 installer-10-1-0-centos-32.sh.x

Run the ZPanelX installer:
64 Bit Installer
tri@linux# ./installer-10-1-0-centos-64.sh.x

Or
32 Bit Installer
tri@linux# ./installer-10-1-0-centos-32.sh.x

Follow the  images instructions below for installation
Zpanel installation


End zPanel installation
The zadmin, MySQL root & postfix passwords are all stored in /root/passwords.txt after installation.
Zpanel login screen
zPanelcp


How to Easy Install VestaCP on Debian/Ubuntu and Centos/RHEL Linux

"Vesta is an open source hosting control panel currently supports RHEL 5.x/6.x, CentOS 5.x/6.x and Ubuntu LTS 12.04, Ubuntu 13.04 and Ubuntu 13.10. It comes with all necessary software to run and manage your websites hosted on your VPS, including:
Web Server (Apache with Nginx as Reverse Proxy)"

  • DNS server
  • Database Server
  • Mail Server
  • FTP Server
  • Nginx out of the box
  • SSL certificates & SNI
  • Wildcard support
  • Configuration Templates
  • DKIM support
  • Fast Backups
  • System Monitoring
  • AntiSpam / Antivirus
  • WHMCS billing support
  • EPEL integration
  • Simple and Clean GUI
  • Powerfull CLI
  • Reliable Platform
  • Open Data Format

Install VestaCP on RHEL/CentOS and Debian/Ubuntu linux
First, login to your server via ssh as root and type following command:
# curl -O http://vestacp.com/pub/vst-install.sh
# chmod +x vst-install.sh
# ./vst-install.sh
Install VestaCP 
The installer asks to confirm disabling SELinux and start the install process. Type Y and hit Enter.
Type your valid email address where they will is VestaCP send your admin password.
Wait for the finish installer process.
VestaCP Complite Installation

Now open up your favorite browser and login to VestaCP web-based UI using your VPS IP at port 8083.
https://ip.add.re.ss:8083/

Login as admin and use given password:
VestaCP Login
You should now see the main UI of VestaCP hosting control panel.
Main UI of VestaCP




How to Install and Use Fping app on RHEL/Centos

"fping is a program like ping which uses the Internet Control Message Protocol ( ICMP ) echo request to determine if a target host is responding. fping differs from ping in that you can specify any number of targets on the command line, or specify a file containing the lists of targets to ping. Instead of sending to one target until it times out or replies, fping will send out a ping packet and move on to the next target in a round-robin fashion. In the default mode, if a target replies, it is noted and removed from the list of targets to check; if a target does not respond within a certain time limit and/or retry limit it is designated as unreachable. fping also supports sending a specified number of pings to a target, or looping indefinitely (as in ping ). Unlike ping, fping is meant to be used in scripts, so its output is designed to be easy to parse."

How to install fping program

First, download fping source package (latest version is 3.10):
# wget http://fping.org/dist/fping-3.10.tar.gz

To install an application fping follows these steps:
# tar -xvf fping-3.10.tar.gz
# cd fping-3.10
# ./configure
# make
# make install

You can can compile fping with support for IPv6 addresses follow next steps:
# ./configure --prefix=/usr/local --enable-ipv4 --enable-ipv6
# make
# make install

Example usage fping program

Fping multiple ip address:
# fping 8.8.8.8 8.8.4.4 104.28.25.20
8.8.4.4 is alive
8.8.8.8 is alive
104.28.25.20 is alive

Fping range of ip address:
# fping -s -g 192.168.1.1 192.168.1.5
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.1
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.3
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.5
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.1
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.3
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.5
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.1
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.3
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.5
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.1
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.3
ICMP Network Unreachable from 83.231.213.65 for ICMP Echo sent to 192.168.1.5
192.168.1.1 is unreachable
192.168.1.2 is unreachable
192.168.1.3 is unreachable
192.168.1.4 is unreachable
192.168.1.5 is unreachable

       5 targets
       0 alive
       5 unreachable
       0 unknown addresses

       5 timeouts (waiting for response)
      20 ICMP Echos sent
       0 ICMP Echo Replies received
      12 other ICMP received

 0.00 ms (min round trip time)
 0.00 ms (avg round trip time)
 0.00 ms (max round trip time)
        4.191 sec (elapsed real time)


Fping complite network
# fping -g -r 3 192.168.1.1/24

Show fping version
# fping -v
fping: Version 3.10
fping: comments to david@schweikert.ch

How to Patch Linux Ghost RHEL/CentOS and Ubuntu/Debian

About GHOST Vulnerabilities

The GHOST vulnerability is a serious weakness in the Linux glibc library. It allows attackers to remotely take complete control of the victim system without having any prior knowledge of system credentials.

How to Patch Ghost On CentOS/RHEL

There is a patch available for CentOS 5, CentOS 6, CloudLinux5 and CloudLinux 6 in the repos.. soon for Debian as well. Here is how to patch in CentOS (or other yum / rhel flavor)
First, let’s see if you’re patched already by typing:
# rpm -q --changelog glibc|grep CVE-2015-0235

If you’re patched already, you’ll see:
- Fix parsing of numeric hosts in gethostbyname_r (CVE-2015-0235, #1183532).

Example:


IF you do not see that, check to if the update is in your repos yet:
# yum clean all && yum update glibc

If it says “No Packages marked for Update” then try again later…
If it shows you an update is available, run the update, then reboot (because there are a lot of various services that use glibc and restarting is a lot easier than finding and restarting each one).
# shutdown -r now

How to Patch Ghost On Ubuntu/Debian
For currently supported versions of Ubuntu or Debian, update all of your packages to the latest version available via apt-get dist-upgrade:
$ sudo apt-get update && sudo apt-get dist-upgrade

Then respond to the confirmation prompt with y.
When the update is complete, reboot the server with this command:
$ sudo reboot

A reboot is necessary since the GNU C Library is used by many applications that must be restarted to use the updated library.

Rabu, 28 Januari 2015

How to Install Openvz on CentOs


CentOS is one of the most popular free and open source server operating systems. OpenVZ is a popular open source system for creating virtual private servers. Combine the two together, and you have a low-cost yet powerful VPS system. The following is a brief installation guide to get OpenVZ running on CentOS.

Add the OpenVZ repository to Yum:

#cd /etc/yum.repos.d
#wget http://download.openvz.org/openvz.repo
#rpm –import http://download.openvz.org/RPM-GPG-Key-OpenVZ

Edit openvz.repo and disable the [openvz-kernel-rhel5] repository (enabled=0) and enable the [openvz-kernel-rhel6] repository.

Install the OpenVZ kernel:

Search using:
#yum search vzkernel

Choose the kernel you want and install:
yum install vzkernel

(This should automatically update Grub to your new kernel. If not, you may need to manually edit your grub configuration).

Install OpenVZ user tools:

#yum install vzctl vzquota

Edit /etc/sysctl.conf and ensure you have these settings:
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1

If your IP addresses for your virtual machines will be on a different subnet than your host machine, you need to make sure you have this in /etc/vz/vz.conf:

NEIGHBOUR_DEVS=all

Disable SELinux bye editing /etc/sysconfig/selinux:

# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – No SELinux policy is loaded.
SELINUX=disabled

Reboot

You should now have a working OpenVZ installation. You should then test it to verify that the kernel is running and that you are able to create containers.

How to install PPTP VPN server in Centos 6.4 Linux


In this article we show you how to install and properly configure a PPTP VPN server in RHEL/CentOS linux. With this VPN you’ll have access to transfering your data encrypted and using a ethernet interface that uses your Server IP address. This tunneling technology is compatible with several devices like desktop operating systems, mobile phones and tablets.
First need enable tun module (tunelling kernel module):
echo 'modprobe tun' >> /etc/rc.modules
chmod +x /etc/rc.modules

At next boot will be loaded tun module in kernel
Make sure you begin with a clean install by removing any previously installed packages:
yum remove -y pptpd ppp
iptables --flush POSTROUTING --table nat
iptables --flush FORWARD
rm -rf /etc/pptpd.conf
rm -rf /etc/ppp

Installation procedure
First, install the poptop package from sourceforge:
rpm -Uhv http://poptop.sourceforge.net/yum/stable/rhel6/pptp-release-current.noarch.rpm
yum -y install make libpcap iptables gcc-c++ logrotate tar cpio perl pam tcp_wrappers dkms kernel_ppp_mppe ppp pptpd

Now, we need to enable IP forwading, set internal IP addresses and point the DNS Servers that will be used by the pptp server:
mknod /dev/ppp c 108 0
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "mknod /dev/ppp c 108 0" >> /etc/rc.local
echo "echo 1 > /proc/sys/net/ipv4/ip_forward" >> /etc/rc.local
echo "localip 172.16.36.1" >> /etc/pptpd.conf
echo "remoteip 172.16.36.2-254" >> /etc/pptpd.conf
echo "ms-dns 8.8.8.8" >> /etc/ppp/options.pptpd
echo "ms-dns 8.8.4.4" >> /etc/ppp/options.pptpd

Then, create your users credentials for the PPTP server. This credentials will be used to log in to the PPTP server on every client/device you connect from:
nano /etc/ppp/chap-secrets

Your chap-secrets file should look like this:
# Secrets for authentication using CHAP
# client server secret IP addresses
yourusername pptpd yourpassword *

Save and close the file.
Next, you need to add the following iptables rules in order to open the correct ports and properly forward the data packets:

# VPN rules (pptpd)
iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i eth0 -p gre -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -p tcp -s 172.16.36.0/24 -j TCPMSS --syn --set-mss 1356

Save and restart your iptables firewall:
service iptables save
service iptables restart

Make sure you load your iptables after every reboot:
chkconfig iptables on
chkconfig pptpd on

And finally, restart iptables and pptpd services:
service iptables start
service pptpd start

Selasa, 27 Januari 2015

How to migrate OpenVZ to KVM/VMWare

To migrate your OpenVZ virtual server to a KVM/VMWARE just follow these steps:

  • First thing you do is to install a KVM machine with the same operating system.  Preferably  the same point revision too!
  • Now logon to your OpenVZ box and run

# yum install mingetty

  • This will install a load of dependencies –  they are all required and provide the core functions to enable your machine to boot successfully!
  • Edit the file /etc/inittab and add in the following:
# Run gettys in standard runlevels

1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

This will enable the machine to actually get a logon prompt!

  • Now.. sync the OpenVZ box to the new box

rsync –exclude=/etc/fstab –exclude=/boot –exclude=/proc –exclude=/lib/modules/ –exclude=/etc/udev –exclude=/lib/udev –exclude=/sys -e ssh –delete –numeric-ids -avpogtStlHz / root@IPTOKVM:/

This will copy every thing from the old box to the new box, but will exclude the kernel files that you will need to boot the machine!  Trust me.. it works!
  •     Power down your OpenVZ Box
  •     Reboot and start your KVM box.

This process has worked for me pretty much every time when migrating Centos 5 and Centos 6.  I am pretty certain that the same basic idea will work with other distros.

Install mod_pagespeed in RHEL/CentOS/Fedora and Debian/Ubuntu linux


mod_pagespeed (Website speed optimizer) is an open-source Apache module that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. It has several filters that automatically optimize files like HTML, CSS, JavaScript, JPEG, PNG and other resources.

Installing mod_pagespeed module for Apache in RHEL/CentOS/Fedora 32 and 64 bit


First install at:
#yum install at

Now download mod_pagespeed:
32 bit:
#wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.rpm

For installatio on RHEL/CentOS/Fedora, please execute (also as root):
#rpm -U mod-pagespeed-stable_current_i386.rpm

64 bit:

#wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
#rpm -U mod-pagespeed-stable_current_x86_64.rpm

Installing mod_pagespeed module in Debian/Ubuntu

To install the packages, on Debian/Ubuntu, please run (as root) the following command:
32 bit:
#wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb
#dpkg -i mod-pagespeed-stable_current_i386.deb
#apt-get -f install

64 bit:

#wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
#dpkg -i mod-pagespeed-stable_current_amd64.deb
#apt-get -f install

Verifying mod_pagespeed Module for Apache

To verify mod_pagespeed module create info.php under root directory of Apache and add following lines of code to it.
Now,navigating your web browser to http://ip.add.re.ss/info.php. You will see “X-Mod-Pagespeed” section in the HTTP header.

How to Install MariaDB, Apache/PHP on RHEL/CentOS 7

This howto guide explains you’ll how to install Apache Server with latest MariaDB and PHP on RHEL, CentOS 7 linux using Remi repository via Yum tool.

Install REMI repository

First enable remi repository:
First enable remi repository:
#rpm -ivh http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm

Installing MariaDB (MySQL)
To install MySQL, we do install mariadb like this:
#yum -y install mariadb-server mariadb

Now, ceate the system startup links for MySQL and start the MySQL server:
#systemctl start mariadb.service
#systemctl enable mariadb.service

Set passwords for the MySQL root account:
Set passwords for the MySQL root account:
#mysql_secure_installation

[root@localhost ~]# mysql_secure_installation
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): <--ENTER
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n]
New password: <--yourmariadbpassword
Re-enter new password: <--yourmariadbpassword
Password updated successfully!
Reloading privilege tables..
... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] <--ENTER
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] <--ENTER
... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] <--ENTER
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] <--ENTER
... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
[root@localhost ~]#

Install Apache server


CentOS 7.0 ships with apache 2.4. Apache2 is directly available as a CentOS 7.0 package, therefore we can install it like this:
#yum -y install httpd

Now, configure your system to start Apache at boot time:
#systemctl start httpd.service
#systemctl enable httpd.service

In CentOS 7.0 uses Firewall-cmd. Use following command to allow http and https external access.
#firewall-cmd --permanent --zone=public --add-service=http 
#firewall-cmd --permanent --zone=public --add-service=https
#firewall-cmd --reload

Now direct your browser to http://ip.add.re.ss/, and you should see the Apache2 placeholder page:
CentOS 7 default apache page
CentOS 7 default apache page

Installing PHP

We can install PHP width MySQL support and some common PHP modules that are required by CMS Systems like WordPress, Joomla and Drupal use following commands:
#yum -y install php php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel

The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.
#nano /var/www/html/info.php

Now we call that file in a browser (e.g. http://ip.add.re.ss/info.php):

Example info.php page

How to Install and enable Iptables firewall on CentOS 7 Linux

In this tutorial we will show you how to install and enable an iptables firewall on CentOS 7 Linux.
First, need to disable and remove firewalld firewall. Type Following commands:
sudo systemctl stop firewalld.service
sudo systemctl disable firewalld.service
yum remove firewalld -y