This will give you a list of the timezones available for your server. Now that you have your timezone set, we should configure NTP. This will allow your computer to stay in sync with other servers, leading to more predictability in operations that rely on having the correct time.
Next, you need to start the service for this session. We will also enable the service so that it is automatically started each time the server boots:. Accessing data stored on disk is much slower than accessing RAM, but having swap available can often be the difference between your application staying alive and crashing. This is especially useful if you plan to host any databases on your system. Advice about the best size for a swap space varies significantly depending on the source consulted. Generally, an amount equal to or double the amount of RAM on your system is a good starting point.
Allocate the space you want to use for your swap file using the fallocate utility. After creating the file, we need to restrict access to the file so that other users or processes cannot see what is written there:. We now have a file with the correct permissions. To tell our system to format the file for swap, we can type:.
Our system is using the swap file for this session, but we need to modify a system file so that our server will do this automatically at boot. You can do this by typing:. You now have a very decent beginning setup for your Linux server. From here, there are quite a few places you can go.
First, you may wish to snapshot your server in its current configuration. If you are happy with your configuration and wish to use this as a base for future installations, you can take a snapshot of your server through the DigitalOcean control panel.
To do so, shutdown your server from the command line. While it is possible to snapshot a running system, powering down ensures that the files on disk are all in a consistent state:. From here, your path depends entirely on what you wish to do with your server. The list of guides below is in no way exhaustive, but represents some of the more common configurations that users turn to next:. By this point, you should know how to configure a solid foundation for your new servers. Hopefully, you also have a good idea for your next steps.
Feel free to explore the site for more ideas that you can implement on your server. When creating a new CentOS 7 server, there are some basic tasks that you should take to ensure that your server is secure and configured properly. This tutorial series will go over connecting to your server and general security best practices, and will also provide links to articles that will help you to start running your own web server or application.
Learning how to manage users effectively is an essential skill for any Linux system administrator. In this guide, we will discuss how to add and delete users and assign sudo privileges on an Ubuntu Quotas are used to limit the amount of disk space a user or group can use on a filesystem. Without such limits, a user could fill up the machine's disk and cause problems for other users and services.
In this tutorial we will install command line tools to create and inspect disk quotas, then set a quota for an example user. Accurate timekeeping has become a critical component of modern software deployments. In this article we will look at some basic time-related commands, verify that ntpd is active and connected to peers, and learn how to activate the alternate systemd-timesyncd network time service. One of the easiest way of guarding against out-of-memory errors in applications is to add some swap space to your server.
In this guide, we will cover how to add a swap file to a Debian 10 server. Twitter Facebook Hacker News. DigitalOcean home.
Community Control Panel. Hacktoberfest Contribute to Open Source. Language: EN. By Justin Ellingwood Become an author. Introduction After setting up the bare minimum configuration for a new server, there are some additional steps that are highly recommended in most cases. Prerequisites and Goals Before you start this guide, you should run through the CentOS 7 initial server setup guide.
Configuring a Basic Firewall Firewalls provide a basic level of security for your server. First install firewalld : sudo yum install firewalld The firewalld service has the ability to make modifications without dropping current connections, so we can turn it on before creating our exceptions: sudo systemctl start firewalld Now that the service is up and running, we can use the firewall-cmd utility to get and set policy information for the firewall. This is a very simple procedure that can be accomplished using the timedatectl command: First, take a look at the available timezones by typing: sudo timedatectl list-timezones This will give you a list of the timezones available for your server.
We will also enable the service so that it is automatically started each time the server boots: sudo systemctl start ntpd sudo systemctl enable ntpd Your server will now automatically correct its system clock to align with the global servers. Where To Go from Here?
Take a Snapshot of your Current Configuration If you are happy with your configuration and wish to use this as a base for future installations, you can take a snapshot of your server through the DigitalOcean control panel. By Justin Ellingwood. Actions Shares.
Embeds 0 No embeds. No notes for slide. Rhel5 essentials preview 1. This eBook is provided for personal use only. All rights reserved. The content of this book is provided for informational purposes only. Neither the publisher northe author offers any warranties or representation, express or implied, with regard to theaccuracy of information contained in this book, nor do they accept any liability for any loss ordamage arising from any errors or omissions.
RHEL 5 Essentials Related eBook Publications It is considered to be amongst the moststable and reliable operating systems and is backed by the considerable resources and technicalskills of Red Hat, Inc. For beginners, the book covers the basics ofconfiguring the desktop environment, resolving screen resolution issues and configuring emailand web servers. Installation topics such as network installation and dual booting withMicrosoft Windows are covered together with all important security topics such as configuringa firewall and user and group administration. For the experienced user, topics such as remote access, logical volume management LVM , diskpartitioning, swap management, Xen and KVM virtualization, Secure Shell SSH and file sharingusing both Samba and NFS are covered in detail to provide a thorough overview of thisenterprise class operating system.
RHEL can be installed either in a clean disk environment where an entiredisk is cleared of any existing partitions and dedicated entirely to RHEL or in a dual bootenvironment where RHEL co-exists with another operating system on the disk typically amember of the Microsoft Windows family of operating systems. In this chapter we will be covering the clean disk approach to installation. In addition to access to the installation images for RHEL, thissubscription also provides technical support for the operating system. If you already have a paidsubscription, log into your Red Hat account to download the operating system.
RHEL 5 Essentials2. If the system tries to boot from the hard disk drive you will need to enterthe BIOS set up for your computer and change the boot order so that it boots from the CD orDVD drive first. Once the system has booted you will be presented with the following screen:Installation may be performed using either the graphical or text mode installers.
The RHEL installer will then provide the option to test the installation media for errors. After ashort delay the first screen of the graphical installer will appear.
Click on the Release Notesbutton if you would like to learn about any key features or problems that exist in this release ofRHEL. Navigate through the next few pages to configure your preferred language and keyboardtype until you reach the partitioning screen. During these steps you may be prompted to enteran Installation Number.
If you have a subscription that includes additional packages, enter thatnumber here so that those packages may be accessed during the installation process. Any pre-existing partitions, together with any existing operating systems and associated data files contained therein will be deleted to make room for RHEL. This option should only be used if you are absolutely sure you no longer need anything that is currently stored on that disk, or have already backed up all user files. Once again, it is important to backup any user data that may still be needed.
For the purposes of this chapter we are assuming the entire disk is available to accommodatethe RHEL installation so select the Remove all partitions on selected drives and create defaultlayout menu option. Beneath the partition menu is the option to encrypt the system.
This book is designed to provide detailed information on the use and administration of the CentOS 5.x Linux distribution. For those new to CentOS, the book. Red Hat Enterprise Linux 5 Essentials is an online book designed to provide everything a user needs to know to install, use and administer an RHEL 5 Linux.
The choice of whether to useencryption will depend on the purpose for which the system is being used, its physical locationand type of data it is going to store. Keep in mind that as with any form of encryption there areperformance overheads associated with selecting this option. Having made the partitioning selection, choose which disk drives detected on your system areto be used for the installation and click Next to begin the partitioning process.
If your system resides on a network served by aDHCP server a server or device that automatically assigns network IP addresses to computerson the network you should leave the default settings unchanged in the Network Devicessection of the screen. If you need to manually specify an IP address, select the network devicefrom the list and click on the Edit button to display the Edit Interface dialog and enter your IPaddress and netmask information, then close the dialog and enter the gateway and DNSsettings for your network into the Miscellaneous settings section of the main screen.
If you manually specified your IP address, or have a DHCP server that does not automaticallyprovide clients with host names, select the option to manually specify the host name and enterit into the text box and click Next to proceed. Theoption is also provided to use UTC which automatically adjusts the time to account for daylightsavings time.
If the computer on which RHEL is being installed also runs another operatingsystem which already uses UTC such as Windows , leave this option unselected. The root, or super-user account is a special user that has administrative privileges on the system. Whilst you willgenerally use your own account to log into the system, you will need to gain root privileges inorder to configure the system and to perform other administrative tasks.
If you manually specified your IP address, or have a DHCP server that does not automaticallyprovide clients with host names, select the option to manually specify the host name and enterit into the text box and click Next to proceed. Xen Virtualization Essentials. This leads to very close similarities between them, e. If the computer on which RHEL is being installed also runs another operatingsystem which already uses UTC such as Windows , leave this option unselected. This is a very simple procedure that can be accomplished using the timedatectl command: First, take a look at the available timezones by typing: sudo timedatectl list-timezones This will give you a list of the timezones available for your server. Linux and Unix. Clearly we will stillneed to be able to boot from something locally to start the installation.
If, for example, you plan on using the system as a webserver you would need to install the Apache web server package. At this point in the installation the installer needs us to decide which packages should beinstalled along with the base operating system and displays the screen shown in the followingfigure:The exact options displayed will depend in part on the specific RHEL installation image that wasdownloaded from the Red Hat web site. This screen allows you to make general choices about the type of functions you need thesystem to perform. RHEL 5 EssentialsTo view or modify the specific package selections, make sure that the Customize Now option isselected before proceeding.
You will then be provided a complete overview of which packagesare selected for installation and which are not together with the ability to make changes tothese selections. The log file will be useful to identify any errors that occurredduring the installation, and the kickstart file can be used to install RHEL on other systems usingthe exact same configuration created here.
During the installation process, the installer will format and partition the disk drive, provide arunning commentary of the selected packages as they are installed and a progress bar. If you are using the DVD the installation willcomplete without further interaction.