LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-06-2017, 06:42 AM   #1
superkulit
LQ Newbie
 
Registered: May 2016
Posts: 8

Rep: Reputation: Disabled
Centos 7 Installation Best Practices


I would like to know the best practices on how to install Centos 7, e.g. the amount of swap file, how to effectively partition the disk and the hardening part.
 
Old 02-06-2017, 06:50 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7 / 8
Posts: 3,529

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
Originally Posted by superkulit View Post
I would like to know the best practices on how to install Centos 7, e.g. the amount of swap file, how to effectively partition the disk and the hardening part.
  • Swap is generally personal preference, I tend to go with 4Gb and that's served me well.
  • Partitions, start with the default partition scheme and adjust depending on your needs. If you need a big "/home" then adjust accordingly. If you need a big "/var/www" then adjust or partition accordingly.
  • Hardening, https://benchmarks.cisecurity.org/do...s.linux.centos is a good start point.
 
Old 02-06-2017, 07:25 AM   #3
superkulit
LQ Newbie
 
Registered: May 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Consider the log partition sizes, does it needs to be in a separate partition as well, if log files consume your disk rapidly and it is located in the same partition where your systems are located, it will make your system unstable right?
 
Old 02-06-2017, 07:39 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7 / 8
Posts: 3,529

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
Originally Posted by superkulit View Post
Consider the log partition sizes, does it needs to be in a separate partition as well, if log files consume your disk rapidly and it is located in the same partition where your systems are located, it will make your system unstable right?
Consider the advice in the CIS guide:

Quote:
1.1.2 Ensure separate partition exists for /tmp
1.1.6 Ensure separate partition exists for /var (Scored)
1.1.7 Ensure separate partition exists for /var/tmp (Scored)
1.1.11 Ensure separate partition exists for /var/log (Scored)
1.1.12 Ensure separate partition exists for /var/log/audit (Scored)
1.1.13 Ensure separate partition exists for /home (Scored)
 
Old 02-06-2017, 07:47 AM   #5
superkulit
LQ Newbie
 
Registered: May 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks a lot for the guide, apologize for not checking first the link you sent. Again, I really appreciate your quick response.
 
Old 02-06-2017, 08:30 AM   #6
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7 / 8
Posts: 3,529

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
You're welcome. There are many, many, many examples of what people consider "best practice" when it comes to swap and partitioning, stick 4 linux guys in a room and they'll fight about it forever.
 
Old 02-06-2017, 09:02 AM   #7
superkulit
LQ Newbie
 
Registered: May 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
, Thanks again!
 
Old 02-06-2017, 01:11 PM   #8
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,191

Rep: Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327
Remember that it depends on what you are installing it on. Partitions for /var and /tmp may be very important on a server, but they are a waste of time on a desktop or laptop. If you let CentOS use LVM (also more suited to a server) or you have EFI, then you need /boot. If you have a modern computer with plenty of memory, you may not need swap. The only thing that's definite is that you need root and home partitions. I have 10GB for root, but I don't have vast amounts of software. See the CentOS and Red Hat documentation for more advice.

CentOS will have the firewall and SEL enabled by default, so it's pretty secure.
 
1 members found this post helpful.
Old 02-07-2017, 08:42 AM   #9
superkulit
LQ Newbie
 
Registered: May 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks David McCann! Also, does anyone knows if joining Linux to WIndows domain has advantages over standalone configurations. If so, could anyone provide any available guide of getting Centos server join to Winodws Domain
 
Old 02-07-2017, 08:48 AM   #10
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7 / 8
Posts: 3,529

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
Originally Posted by superkulit View Post
does anyone knows if joining Linux to WIndows domain has advantages over standalone configurations.
Depends on why you'd want it on the domain. Without your use-case scenario it's hard to tell.
 
Old 02-07-2017, 08:57 AM   #11
superkulit
LQ Newbie
 
Registered: May 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hadoop environment
 
Old 02-07-2017, 09:18 AM   #12
superkulit
LQ Newbie
 
Registered: May 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
My use case is Hadoop environment cluster running latest version of Centos OS,
 
Old 02-07-2017, 09:21 AM   #13
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7 / 8
Posts: 3,529

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Tells us nothing about why you think it should be part of a Windows domain.
 
Old 02-07-2017, 04:36 PM   #14
superkulit
LQ Newbie
 
Registered: May 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Ease of User management, security and audit purposes.
 
Old 02-07-2017, 05:53 PM   #15
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by DavidMcCann View Post
The only thing that's definite is that you need root and home partitions.
Not at all, /home is perfectly happy living on the root partition. All you need is / (and /boot if EFI), everything else is optional.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS 7 Installation ShannnonWebb Linux - Server 2 11-07-2016 05:19 PM
Welcome installation screen is not coming in centos i386 installation bkarthick Linux - Newbie 7 05-12-2015 05:02 PM
[SOLVED] Best practices? Setting up CentOS 5.5 + ESXi 4.0 -- Dell PowerEdge weazer Linux - Virtualization and Cloud 13 01-02-2011 10:41 AM
Driver installation: General advice and best practices alanhr Linux - Hardware 5 08-19-2008 06:49 AM
CentOS installation mike30188 Linux - Newbie 3 06-24-2005 01:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration