1-click AWS Deployment 1-click Azure Deployment
Overview
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 on cloud 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.
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 7.4, a Red Hat-sponsored Linux distribution built from the source code for the recently-released Red Hat Enterprise Linux (RHEL) 7.4. 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 7.4 and install media for i386 and x86_64 architectures. CentOS Linux 7.4 is derived from source code released by Red Hat, Inc. for Red Hat Enterprise Linux 7.4. 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 7 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 7. 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.
- Provision a single server for our web application
- Install and configure Apache, PHP, and MySQL
- 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 | |||
Processor | 2 Cores | Web Server | Apache 2.2.15 |
RAM | 1 GB | Database Server | MySQL Server 5.1 |
Hard Disk | 1 x 24 GB | Web Server | Apache 2.2.15 |
Network Interfaces | 1 | Web Application | WordPress |
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 | |
/var | The /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. |
/home | Aside 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. |
/webapps | The 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.
- Mount the ISO/DVD and start the CentOS 6.X installation.
- 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 Point | File System | Size | Notes |
MBR – Standard Partitions | |||
/boot | EXT2 | 200 MB | The 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 | |||
/ | EXT4 | 10 GB | |
/home | EXT4 | 1 GB | |
/var | EXT4 | 5.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. |
/webapps | EXT4 | 5.5 GB | This is a comfortable size for a small web application, like a WordPress site with some locally hosted multimedia. |
SWAP | 1.5 GB | Not 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. |
- 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.
- FIG1– CentOS partition manager
- When prompted for the installation type, select Basic Server.
- 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.
- Open fstab into a text editor, like VIM, for example.
vim /etc/fstab
- 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
nodev | Prevents device files from existing on the mount point’s file system. Unless you have some special requirements, device files should only exist in /dev. |
noexec | Prevents 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. |
- Save the modified fstab file and exit the text editer.
- Reboot the server or unmount and then remount the modified mount points to apply the changes.
How to Install CentOS 7 Step by Step with Screenshots
CentOS (Community Enterprise Operating System) is forked from RedHat Linux, a Linux Distro fine-tuned for servers. In this tutorial, you will learn how to install CentOS 7 in a few easy steps.
Step 1: Download The ISO Image
To get a copy of CentOS 7 download from its source mirror. CentOS 7 is now shipping for 64 bit platforms, and currently there is no 32 bit ISO image. This is primarily due to the fact that most servers in production are 64 bit.
Step 2: Make A bootable Drive
After you have downloaded the ISO image, make a bootable USB drive. Since Centos 6.5, you can create usb drive bootable by simply transferring iso file to usb using dd command. Win32DiskImager or Etcher are the alternative solutions, as we found Unetbootin no longer works for CentOS 7.
# dd if=/iso/CentOS-7-x86_64-DVD-1602-99.iso of=/dev/sdb
* /dev/sdb is the usb device and make sure you have atleast 4.3 GB space.
Step 3: Begin Installation
To begin installation, click on the Install to Hard Drive icon on the desktop.
Step 4: Select Language And Keyboard
Select your preferred language as well as the Keyboard type you have. Take care not forget to choose the correct keyboard or else you will end up with a few scrambled keys.
Step 5: Change The Installation Destination
By default the Anaconda installer will choose automatic partitioning for your hard disk. Click on the Installation Destination icon to change this to custom partitioning.
Click on the hard drive you want to install CentOS 7 and under the Other Storage Options, choose I will configure partitioning then click Done.
Step 6: Select The Partitioning Scheme
Next select the partitioning scheme to use for the mount points. In this case choose Standard Partition.
Step 7: Create A Swap Space
You can create a swap space from one of the partitions and set the desired capacity, which is dependent on the RAM you have. Choose the File System for swap space as swap, and click on Reformat, though reformatting is optional. You can also name your swap space to whatever name you like but a name like swap is more descriptive.
Step 8: Create A Mount Point
The next step is to create a mount point where the root partition will be installed. Depending on your requirements you might need to put the boot, home and root partition on different mount points. For this case we shall have only one mount point /.
After this set the Label and Desired Capacity to whatever you wish. A rule of thumb is to use descriptive names for the Label especially if the computer is to be used by different system administrators.
Choose the file system as ext4 and click on reformat.
Step 9: Accept Changes
After completing Step 7 and Step 8 successfully click on Done button. A prompt window will appear with a summary of changes that will take place. If you are satisfied with them click Accept changes.
Step 10: Set Date And Time
Click on the clock icon under the localization menu and select a time zone from the map of the world, then click Done.
Step 11: Begin Installation
Now after configuring the System and Localization settings you can click on the Begin Installation button.
Installation will begin immediately and as it proceeds you need to set up a User account as well as the root password.
Step 12: Set Up Root Password
Click on the root password option and enter a password and confirmation of the same then click Done.
Step 13: Create a User Account
The next step is to create a user account. Enter the correct details and if this is the administrator account, tick Make this user administrator and Require a password to use this account for security purposes.
Step 14: Complete Installation
The installer should complete installing the software and the bootloader. Have a look on how to Set Linux Grub Password with Examples.
Once complete you should get a success message, after which you can click quit.
Logout from the Live system and login to your new installation.
Finally once you login to your CentOS 7 accept the EULA agreement and enjoy!
Cognosys provides hardened images of CentOS 7.4 on all public cloud ( AWS marketplace, Azure and Google Cloud Platform).
Deploy CentOS 7.4 securely on cloud i.e. AWS marketplace and Azure with Reliable Services offered by Cognosys at one-click with easy written and video tutorials.
Features
- 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.
- 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.
- The performance stability. Servers based on Linux systems are considered as more fault-tolerant. CentOS for a dedicated server is not an exclusion.
- High efficiency. As any other Linux-based system, CentOS has better performance speed characteristics. And this is highly important for big projects functioning.
- 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.
- High performance speed – as the server resources are used only by a renter.
- Centos is just one of many widely available Linux-based operating systems that are available for free.
- CentOS 7 is compatible with the upstream vendor’s redistribution strategy and gains full industry support with security updates and training material.
- 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.
- Centos can operate much faster than similar Linux-based operating systems because it only runs basic versions of software.
- 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.
- 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.
- 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.
- 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.
- 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
Other CentOS Versions on Azure Marketplace
Azure Marketplace – CentOs 8.2
Azure Marketplace – CentOs 8.1
Azure Marketplace – CentOs 8.0
Azure Marketplace – CentOs 7.8
Installation Instructions For CentOS
Installation Instructions For Centos
Step 1) SSH Connection: To connect to the deployed instance, Please follow Instructions to Connect to Centos instance on Google 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
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
Video
CentOS Installation
https://www.youtube.com/watch?v=nVME5ymmAJs