Centos 6.9 On Cloud

1-click AWS Deployment 1-click Azure Deployment

Overview

CentOS is one of the preferred Operating Systems for web hosting servers. It is one of the countless Linux distributions available, but what distinguishes it from all the others is the long-term support, which ensures that you will always have a reliable and protected OS. Each CentOS version that is released is supported for 10 years, which is a lot longer than with any other OS on the market. CentOS also has a much more numerous developer community than other distributions, so in case you experience any problem or have any questions, you will be able to quickly get the info that you need. CentOS is regarded as one of the best server Operating Systems, since it’s very stable and secure, that makes it really reliable even if you host confidential info. Because it is open-source, you’ll be able to modify every part of it and personalize it according to your needs, not to mention that the overall cost for a CentOS-based server will be lower, as you will not have to pay license fees of any type.

The CentOS Linux distribution is a stable, predictable, manageable and reproducible platform derived from the sources of Red Hat Enterprise Linux (RHEL). We are now looking to expand on that by creating the resources needed by other communities to come together and be able to build on the CentOS Linux platform. And today we start the process by delivering a clear governance model, increased transparency and access. In the coming weeks we aim to publish our own roadmap that includes variants of the core CentOS Linux.

Since March 2004, CentOS Linux has been a community-supported distribution derived from sources freely provided to the public by Red Hat. As such, CentOS Linux aims to be functionally compatible with RHEL. We mainly change packages to remove upstream vendor branding and artwork. CentOS Linux is no-cost.

CentOS Linux is developed by a small but growing team of core developers. In turn the core developers are supported by an active user community including system administrators, network administrators, managers, core Linux contributors, and Linux enthusiasts from around the world.

Centos are Community Enterprise operating system which mainly focuses on the server. Although it has a desktop version too. you can assume it as the version of the Red Hat Enterprise Linux. The difference is that Red hat packages are more reliable because all their services are paid. They have to maintain the standard and the market value of the company. On the other hand, centos is a community based operating system, so the quality of their products may be less than that of red hat. updates may be not on time in the case of centos.

CentOS is available with every single virtual private server that we provide, at iHosting and you’ll be able to select it during the order process from among a couple of other Operating Systems. Determined by the software which you’d like to set up and run, you can select between the 32-bit and the 64-bit version and then your new VPS will be up and running soon after that. CentOS supports all the three hosting Control Panels that we supply – cPanel, DirectAdmin and Hepsia. This will allow you to choose if you’d like to employ the server for your own web sites and to manage it as one large account, or if you want to be able to create multiple hosting accounts and resell them to other people. Of course, you may also buy a VPS without Control Panel and you will get a server with an Operating System and the Apache web server software, but no other thing on it, so that you can set up just the software which you want for your apps.

CentOS is one of the Operating Systems that we provide with all our dedicated server plans. During the sign-up process, you will be able to choose between the 32-bit and the 64-bit release of the OS and ensure that the software environment on your new server meets the requirements of the apps that you intend to set up. In contrast to other Operating Systems, CentOS will also allow you to pick from a couple of hosting Control Panels, depending on what you need the server for. With Hepsia, for example, you’re able to control the whole server like an individual account irrespective of the number ofdomain names which you host, while with cPanel and DirectAdmin, you can generate a separate account for each and every domain, that can give you the opportunity to start a web hosting reseller business. If you don’t select any Control Panel, you’ll receive the server with CentOS only, as the software that comes with the Control Panels will not be installed. We also provide regular OS updates included in our own Managed Services package, so you will not have to invest effort and time downloading and setting up the most up-to-date and most secure software on the dedicated server.

Centos are Community Enterprise operating system which mainly focuses on the server. Although it has a desktop version too. you can assume it as the version of the Red Hat Enterprise Linux. The difference is that Red hat packages are more reliable because all their services are paid. They have to maintain the standard and the market value of the company. On the other hand, centos is a community based operating system, so the quality of their products may be less than that of red hat. updates may be not on time in the case of centos.

CentOS is available with every single virtual private server that we provide, at iHosting and you’ll be able to select it during the order process from among a couple of other Operating Systems. Determined by the software which you’d like to set up and run, you can select between the 32-bit and the 64-bit version and then your new VPS will be up and running soon after that. CentOS supports all the three hosting Control Panels that we supply – cPanel, DirectAdmin and Hepsia. This will allow you to choose if you’d like to employ the server for your own web sites and to manage it as one large account, or if you want to be able to create multiple hosting accounts and resell them to other people. Of course, you may also buy a VPS without Control Panel and you will get a server with an Operating System and the Apache web server software, but no other thing on it, so that you can set up just the software which you want for your apps.

CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor. CentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. (CentOS mainly changes packages to remove upstream vendor branding and artwork.)

Johnny Hughes has announced the release of CentOS 6.9, a Red Hat-sponsored Linux distribution built from the source code for the recently-released Red Hat Enterprise Linux (RHEL) 6.9. This is the projects legacy branch supported until November 2020. From the release announcement: “We are pleased to announce the immediate availability of CentOS Linux 6.9 and install media for i386 and x86_64 architectures. CentOS Linux 6.9 is derived from source code released by Red Hat, Inc. for Red Hat Enterprise Linux 6.9. All upstream variants have been placed into one combined repository to make it easier for end users. Workstation, server and minimal installs can all be done from our combined repository. There are many fundamental changes in this release, compared with the past CentOS Linux 6 releases, and we highly recommend everyone study the upstream release notes as well as the upstream technical notes about the changes and how they might impact your installation.

CentOS on cloud is a Linux distribution that attempts to provide a free, enterprise-class, community-supported computing platform functionally compatible with its upstream source, Red Hat Enterprise Linux (RHEL). In January 2014, CentOS announced the official joining with Red Hat while staying independent from RHEL, under a new CentOS governing board.
CentOS conforms fully with Red Hat’s redistribution policy and aims to have full functional compatibility with the upstream product. CentOS mainly changes packages to remove Red Hat’s branding and artwork.
The first CentOS release in May 2004, numbered as CentOS version 2, was forked from RHEL version 2.1AS. Since the release of version 7.0, CentOS officially supports only the x86-64 architecture, while versions older than 7.0-1406 also support IA-32 with Physical Address Extension (PAE). As of December 2015, AltArch releases of CentOS 7 are available for the IA-32 architecture, Power architecture and for the ARMv7hl and AArch64 variants of the ARM architecture.

Introduction

This is the first part in a series that will guide you through planning and deploying different scales of web application infrastructures on CentOS 6. We’ll start small by creating an all-in-one standalone box, hosting the web server and database server.

Your first goal before even thinking about building your server is understanding the web application it will eventually host. What will its workload be like? Will it be multimedia heavy? How dynamic is the content and how frequently will it update on screen? Will it just serve static web pages which are rarely modified? Your server configuration will vary wildly depending on the answers to those questions. For demonstration purposes, we are going to use WordPress for our web application. It was chosen because of its popularity and ease of installation. We won’t have to waste much time configuring it on our application server.

Our WordPress application will neither have dynamically updating content on screen nor loads of multimedia. It will be used for basic blogging consisting mostly of text with some multimedia. Its I/O profile will mostly be reads with a few writes when new content is added. We need to know this information to ensure the application is deployed properly and optimized as much as possible, which will be discussed in Part II of this series. It will be expected that you have some experience working with Linux-based operating systems. Therefore, this is a Level 200 lab.

Objectives

We’ll cover the following in this part of the lab series.

  1. Provision a single server for our web application
  2. Install and configure Apache, PHP, and MySQL
  3. Harden the server

The Scenario

We’ve been tasked with deploying a small web application server for a WordPress blog. We don’t expect too much traffic and we have a tight budget, so all required server roles will be hosted on the same server. Since this server will be public-facing on the Internet, we’ll have to do some hardening to protect it.

Before You Begin

You will need the following to follow along with this lab.

  • Virtual machine software to run the lab server (ESX, Hyper-V, VirtualBox, etc.)
  • One server capable of running CentOS 6 or higher.
  • An Internet connection for the server.
  • A CentOS 6 or higher ISO.

We’re starting off by creating an environment you will normally see on an entry-level VPS host or small application development server. In later labs, we’ll scale the server out for larger workloads.

Our web application will have the following configuration.

TABLE1 – Server Configuration
Processor2 CoresWeb ServerApache 2.2.15
RAM1 GBDatabase ServerMySQL Server 5.1
Hard Disk1 x 24 GBWeb ServerApache 2.2.15
Network Interfaces1Web ApplicationWordPress

 

Planning the file system and disk partition scheme

One of the most important steps in planning your application server is designing a file system and partition scheme. A proper design can go a long way for performance, reliability and security. A default partition scheme may be easy, but your placing your server in great risk by using it; therefore, it should never be done on a production server. The following are just guidelines to prime you for your own environment. Our ability to sufficiently carve out different file systems for our lab server is limited by the small amount of storage available. The following table details which directories should be placed on their own separate file systems and why.

TABLE2 – Volumes that should be their own mount points
/varThe /var directory in Linux contains variable data which may change frequently during the server operation, like log files. This directory has a nasty habit of monopolizing a file system’s free space, which will result in down time if its left on the / (root) partition.
/homeAside from increased security benefits, separating this partition makes upgrading or migrating to a new operating system easier. It also prevents a single user from consuming the / (root) partitions entire free space, which will bring the server down.
/webappsThe default root document location used by Apache on CentOS is /var/www/html. You can easily carve this off instead; however, using your own structure is ideal when you expect to host more than one web application on your server, as we will be doing in later in the series.

 

Deploying the Server

Now that we’ve planned our file system scheme, it’s time to install CentOS.

  1. Mount the ISO/DVD and start the CentOS 6.X installation.
  2. When prompted for a disk partition layout, choose Create Custom Layoutand make the following partitions and volumes. The sizes are based on a host with 24 GB of storage, however, you’ll want to match /var/log and /webapps to fit the requirements of your log retention and application storage requirements. What’s important is that you separate the paths into their own mount points.
TABLE3 – Server partitions and volumes
Mount PointFile SystemSizeNotes
MBR – Standard Partitions
/bootEXT2200 MBThe boot image is small and it doesn’t need the overhead added by EXT4’s journaling. Other than minimizing the complexity of the file system used by /boot, there are very few benefits for placing it on its own partition with a large majority of today’s Linux distros.
LVM – Logical Volumes
/EXT410 GB
/homeEXT41 GB
/varEXT45.5 GB.The log volume should be large enough to keep logs in you intend to keep for a certain period of time, for troubleshooting, legel hold, etc.
/webappsEXT45.5 GBThis is a comfortable size for a small web application, like a WordPress site with some locally hosted multimedia.
SWAP1.5 GBNot all web applications utilize the SWAP partition, but MySQL may when under heavy load. If you are unsure how much you need, size this partition to be 1.5x that of your physical RAM.
  1. Your partition layout should look similar to the following figure.
    There are a plethora of websites that explain more advance disk partition volume and file system planning, and I recommend that you read them. For now, this will be sufficient for our needs.
  1. FIG1– CentOS partition manager
  2. When prompted for the installation type, select Basic Server.
  3. After the installation completes, log onto the web server and update it.

yum update

Secure the Mount Points

The reason we separate certain paths into their own mount points is to be able to protect them from certain activity. We want to block users from running malicious or unauthorized executables from our /webapps file system, for example.

  1. Open fstab into a text editor, like VIM, for example.

vim /etc/fstab

  1. Following along with the disk layout above, find the following lines in fstab and add the highlighted options.

3.  /dev/mapper/vg_webapp001-lv_home    /home     ext4    defaults,nosuid,nodev,noexec   1 24.  /dev/mapper/vg_webapp001-lv_log     /var/log  ext4    defaults,nosuid,nodev   1 2/dev/mapper/vg_webapp001-lv_webapps /webapps  ext4    defaults,nodev,noexec   1 2

nodevPrevents device files from existing on the mount point’s file system. Unless you have some special requirements, device files should only exist in /dev.
noexecPrevents executable files from running on the mount points file system. In this tutorial, we have it set for our webapp mount. If your web application requires cgi, this will break the application and you should not add it.
  1. Save the modified fstab file and exit the text editer.
  2. Reboot the server or unmount and then remount the modified mount points to apply the changes.

Installing Centos 6.9

CentOS (Community Enterprise Operating System) is a free Linux operating system that has a 100% binary compatibility with RHEL (Red Hat Enterprise Linux). Because of this compatibility, many individuals and organisations choose CentOS as their choice of Linux. In the example that follows, we will show you how to install a minimal build server without a graphical user desktop. To install CentOS 6.9 (Minimal Build) simply follow the instructional guide below:

CentOS(Community Enterprise Operating System) is an open source Operating system. It is almost similar to RHEL(Red Hat Enterprise Linux) and can easily be downloaded from the CentOS site. It is generally used in the Data Center Where you don’t want buy or spend money on RHEL License and support.

In this tutorial we will discuss CentOS 6.4 installation steps with the Screenshots.

Step:1 Download the CentOS 6.X iso file from the CentOS Site :

http://wiki.centos.org/Download

Step:2 Now Burn the downloaded ISO file into DVD or USB drive

Step:3 Change the Server’s Boot Medium , select the DVD or USB drive depending upon your media. Below Screen will after booting with bootable media :

centos Installation Screen
Select  ‘Install & Upgrade existing system’ & press Enter

Step:4 Skip the Media Testing

Step:5 Click on Next & Start the Installation process

Centos Installation

Step:6 Select your respective the language and click on Next

Language Selection during installation

Step:7 Select Appropriate Keyboard

Step:8 Select the ‘Basic Storage Devices‘ as we are installing the OS on Server’s physical Hard drive

Basic Storage Devices

Step:9  As we are doing fresh installation so select ‘Yes, Discard any data

Discard Data on drive during installation

Step:10 Set the HostName and if you want to configure network during the installation then click on ‘configure network‘ and assgin the ip address,netmask and gateway according to your setup.

hostname and network configuration during centos installation

Step:11 Select your respective Time Zone & Click on Next

Time Zone in Centos

Step:12 Set the root password and Click on Next

Step:13 If you want to create customize parition table then select ‘Create Custome Layout‘ otherwise select ‘Replace Existing Linux System(s)’ , it will create the default paritions.

default parition table

Step:14 Select ‘Write Changes to Disk‘ , it will start formating the disk.

Write Changes to Disk on linux installation

Step:15 Select the Installation Type , in my case i am selecting ‘Minimal Desktop‘, If you are planning to install database server or webserver , then you should select the respective options & then click on Next

Minimal Centos Installation

Step:16 Installation Started as shown below:

Centos installation started

Step:17 Installation Completed ,Reboot your Machine

reboot machine after installation

Step:18 Login Screen after Installation

Centos Login Screen

Cognosys provides hardened images of CentOS on all public cloud i.e. AWS marketplace and Azure.

CentOS 6.9 Hardened On Cloud

 

 

Features

  1. CentOS is a Linux distribution that provides a free, enterprise-class, community-supported computing platform functionally compatible with its upstream source, Red Hat Enterprise Linux.
  2. The first CentOS release in May 2004, numbered as CentOS version 2, was forked from RHEL version 2.1AS.[1] Since the release of version 7.0.
  3. The performance stability. Servers based on Linux systems are considered as more fault-tolerant. CentOS for a dedicated server is not an exclusion.
  4. High efficiency. As any other Linux-based system, CentOS has better performance speed characteristics. And this is highly important for big projects functioning.
  5. High level of security. Over the last years CentOS for a dedicated server is used on more and more machines. The most of failures is fixed before the release.
  6. High performance speed – as the server resources are used only by a renter.
  7. Centos is just one of many widely available Linux-based operating systems that are available for free.
  8. CentOS 7 is compatible with the upstream vendor’s redistribution strategy and gains full industry support with security updates and training material.
  9. CentOS Linux distribution you can get the advantage of open source server software such as Apache Web Server, Samba, Sendmail, CUPS, vsFTPd, MySQL, and BIND.
  10. Centos can operate much faster than similar Linux-based operating systems because it only runs basic versions of software.
  11. New variable for disabling colored output for systemd : This update introduces the SYSTEMD_COLORS environment variable for systemd, which enables turning on or off systemd color output. SYSTEMD_COLORS should be set to a valid boolean value.
  12. New systemd option: RandomizedDelaySec : This update introduces the RandomizedDelaySec option for systemd timers, which schedules an event to occur later by a random number of seconds.
  13. Server performance has improved in many areas : Some operations in Identity Management run much faster now. For example, this enhancement enables better scalability in large deployments exceeding 50,000 users and hosts.
  14. Enhanced IdM topology management : Information about the Identity Management (IdM) topology is now maintained at a central location in the shared tree. As a result, you can now manage the topology from any IdM server using the command line or the web UI.
  15. Simplified replica installation : Installing a replica no longer requires you to log in to the initial server, use the Directory Manager (DM) credentials and copy the replica information file from the initial server to the replica.

 

Azure


Installation Instructions For CentOS

Installation Instructions For Centos

Note : How to find PublicDNS in Azure

Step 1) SSH Connection: To connect to the deployed instance, Please follow Instructions to Connect to Centos instance on Azure Cloud

1) Download Putty.

2) Connect to virtual machine using following SSH credentials:

  • Hostname: PublicDNS  / IP of machine
  • Port : 22

Username: Your chosen username when you created the machine ( For example:  Azureuser)
Password : Your Chosen Password when you created the machine ( How to reset the password if you do not remember)

Step 2) Other Information:

1.Default ports:

  • Linux Machines:  SSH Port – 22

2. To access Webmin interface for management please follow this link

Configure custom inbound and outbound rules using this link

Video

CentOS 6.9 Hardened On Cloud

Centos 6.9 On Cloud

Related Posts