Version 6 (modified by 8 years ago) (diff) | ,
---|
Default CentOS 7 configuration
#Install default packages $ yum update #install the Fedora Extra Packages for Enterprise Linux (EPEL) repository #http://www.rackspace.com/knowledge_center/article/install-epel-and-additional-repositories-on-centos-and-red-hat $ yum install epel-release $ yum install docker $ yum install collectd $ yum install mailx #Create sysop users $ useradd sanmai $ usermod -aG wheel sanmai $ useradd dietuyt $ usermod -aG wheel dietuyt $ useradd wilelb $ usermod -aG wheel wilelb #Set passwords for the users: passwd <user> #Configure sshd #no root login PermitRootLogin no #no username/password login PasswordAuthentication no #forward mail from root to sysops@clarin.eu $ echo "root: sysops@clarin.eu" >> /etc/aliases $ newaliases $ service postfix restart #test the configuration $ echo test | mail -s "test message" root #Enable services systemctl enable docker.service
Auto start service on boot
systemctl enable httpd.service
Docker storage configuration http://www.projectatomic.io/blog/2015/06/notes-on-fedora-centos-and-docker-storage-drivers/ https://access.redhat.com/articles/1492923 https://forums.docker.com/t/docker-storage-config-on-centos-7-1/3164
CollectD
Installation:
yum install epel-release yum install collectd cp /etc/collectd.conf /etc/collectd.conf.orig <edit /etc/collectd.conf according to the example below> systemctl enable collectd.servic service collectd restart
Example collectd configuration
############################################################################## # Global # #----------------------------------------------------------------------------# # Global settings for the daemon. # ############################################################################## #Hostname "localhost" #FQDNLookup true #BaseDir "/var/lib/collectd" #PIDFile "/var/run/collectd.pid" #PluginDir "/usr/lib64/collectd" #TypesDB "/usr/share/collectd/types.db" #----------------------------------------------------------------------------# # When enabled, plugins are loaded automatically with the default options # # when an appropriate <Plugin ...> block is encountered. # # Disabled by default. # #----------------------------------------------------------------------------# #AutoLoadPlugin false #----------------------------------------------------------------------------# # Interval at which to query values. This may be overwritten on a per-plugin # # base by using the 'Interval' option of the LoadPlugin block: # # <LoadPlugin foo> # # Interval 60 # # </LoadPlugin> # #----------------------------------------------------------------------------# Interval 10 #Timeout 2 #ReadThreads 5 #WriteThreads 5 # Limit the size of the write queue. Default is no limit. Setting up a limit is # recommended for servers handling a high volume of traffic. #WriteQueueLimitHigh 1000000 #WriteQueueLimitLow 800000 ############################################################################## # Logging # #----------------------------------------------------------------------------# # Plugins which provide logging functions should be loaded first, so log # # messages generated when loading or configuring other plugins can be # # accessed. # ############################################################################## LoadPlugin logfile <Plugin logfile> LogLevel info File "/var/log/collectd/collectd.log" Timestamp true PrintSeverity false </Plugin> ############################################################################## # LoadPlugin section # #----------------------------------------------------------------------------# # Lines beginning with a single `#' belong to plugins which have been built # # but are disabled by default. # # # # Lines begnning with `##' belong to plugins which have not been built due # # to missing dependencies or because they have been deactivated explicitly. # ############################################################################## LoadPlugin cpu LoadPlugin df <Plugin df> MountPoint "/" IgnoreSelected false ReportByDevice false ReportReserved false ReportInodes true ValuesAbsolute true ValuesPercentage true </Plugin> LoadPlugin disk <Plugin disk> </Plugin> LoadPlugin interface <Plugin interface> Interface "eth0" IgnoreSelected false </Plugin> LoadPlugin load LoadPlugin memory LoadPlugin network <Plugin network> Server "metrics.clarin.eu" "25826" </Plugin> LoadPlugin processes LoadPlugin users Include "/etc/collectd.d"