How to Disabled SELinux using Command Line on CentOS 6/RHEL 6

In this short article, I’ll show you an easy way to disable SELinux in RHEL or CentOS 6 6. You only need to run the following command line. After that, make sure you reboot your CentOS server for changes to take effect.

1. Verify the SELINUX setting before changes :

[root@centos66 ~]# sestatus
SELinux status:                 enforcing

Check the config file :

[root@centos66 ~]# cat /etc/sysconfig/selinux
..
..
SELINUX=enforcing
..
..

2. Issue the following command to changes the config file :

[root@centos66 ~]# sed -i 's/(^SELINUX=).*/SELINUX=disabled/' /etc/sysconfig/selinux

3. Verify the SELINUX status again :

[root@centos66 ~]# sestatus
SELinux status:                 disabled

Check the config file again :

[root@centos66 ~]# cat /etc/sysconfig/selinux

It will change the following, SELINUX=disabled

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

4. Reboot the CentOS/RHEL server :

[root@centos66 ~]# reboot

How to Upgrade Zimbra Collaboration Suite 8.0.7 to 8.5.0 on CentOS 6.5 x86_64

On August 26 2014, the new zimbra version 8.5.0 has been released and it surprise us with the new major features available. The following are the major new features and enhancements in Zimbra Collaboration 8.5.0.

MariaDB

  • MariaDB is a drop-in replacement for MySQL
  • MariaDB 10.0 is used with XtraDB storage engine
  • No data reload required, as uses same database set

ActiveSync Performance and Scalability

  • Improved ActiveSync performance and scalability

Please refer to official release note. I have prepared the steps to upgrade zimbra from version 8.0.7 to zimbra 8.5.0. Please note that this entire procedure, is based on a single zimbra server, not in a multi-server zimbra system.

1. In Zimbra 8.5.0 installation steps, it is necessary to have unzip package installed. If you don’t have unzip package installed, please install by issue the following command :

[root@Zimbra8 ~]# yum install unzip -y

2. Extract the downloaded zimbra file :

[root@Zimbra8 ~]# tar xzvf zcs-8.5.0_GA_3042.RHEL6_64.20140828192005.tgz

3. Enter the extracted directory :

[root@Zimbra8 ~]# cd zcs-8.5.0_GA_3042.RHEL6_64.20140828192005

4. Start the upgrade :

[root@Zimbra8 zcs-8.5.0_GA_3042.RHEL6_64.20140828192005]# ./install.sh --platform-override

Full example :

[root@Zimbra8 zcs-8.5.0_GA_3042.RHEL6_64.20140828192005]# ./install.sh --platform-override

Operations logged to /tmp/install.log.18026
Checking for existing installation...
    zimbra-ldap...FOUND zimbra-ldap-8.0.7_GA_6021
    zimbra-logger...FOUND zimbra-logger-8.0.7_GA_6021
    zimbra-mta...FOUND zimbra-mta-8.0.7_GA_6021
    zimbra-dnscache...NOT FOUND
    zimbra-snmp...FOUND zimbra-snmp-8.0.7_GA_6021
    zimbra-store...FOUND zimbra-store-8.0.7_GA_6021
    zimbra-apache...FOUND zimbra-apache-8.0.7_GA_6021
    zimbra-spell...FOUND zimbra-spell-8.0.7_GA_6021
    zimbra-convertd...NOT FOUND
    zimbra-memcached...FOUND zimbra-memcached-8.0.7_GA_6021
    zimbra-proxy...FOUND zimbra-proxy-8.0.7_GA_6021
    zimbra-archiving...NOT FOUND
    zimbra-cluster...NOT FOUND
    zimbra-core...FOUND zimbra-core-8.0.7_GA_6021
ZCS upgrade from 8.0.7 to 8.5.0 will be performed.

Saving existing configuration file to /opt/zimbra/.saveconfig


PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
ZIMBRA, INC. ("ZIMBRA") WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.

License Terms for the Zimbra Collaboration Suite:
  http://www.zimbra.com/license/zimbra-public-eula-2-5.html



Do you agree with the terms of the software license agreement? [N] y



Checking for prerequisites...
     FOUND: NPTL
     FOUND: nc-1.84-22
     FOUND: sudo-1.8.6p3-12
     FOUND: libidn-1.18-2
     FOUND: gmp-4.3.1-7
     FOUND: libaio-0.3.107-10
     FOUND: libstdc++-4.4.7-4
     FOUND: unzip-6.0-1

Checking for suggested prerequisites...
     FOUND: perl-5.10.1
     FOUND: sysstat
     FOUND: sqlite
Prerequisite check complete.
Checking current number of databases...

Do you want to verify message store database integrity? [Y] y
Verifying integrity of message store databases.  This may take a while.
mysqld is alive
No errors found

Checking for installable packages

Found zimbra-core
Found zimbra-ldap
Found zimbra-logger
Found zimbra-mta
Found zimbra-dnscache
Found zimbra-snmp
Found zimbra-store
Found zimbra-apache
Found zimbra-spell
Found zimbra-memcached
Found zimbra-proxy


The Zimbra Collaboration Server appears already to be installed.
It can be upgraded with no effect on existing accounts,
or the current installation can be completely removed prior
to installation for a clean install.

Do you wish to upgrade? [Y]

Select the packages to install
    Upgrading zimbra-core
    Upgrading zimbra-ldap
    Upgrading zimbra-logger
    Upgrading zimbra-mta

Install zimbra-dnscache [N]
    Upgrading zimbra-snmp
    Upgrading zimbra-store
    Upgrading zimbra-apache
    Upgrading zimbra-spell
    Upgrading zimbra-memcached
    Upgrading zimbra-proxy
Checking required space for zimbra-core
Checking space for zimbra-store
Checking required packages for zimbra-store
zimbra-store package check complete.

Installing:
    zimbra-core
    zimbra-ldap
    zimbra-logger
    zimbra-mta
    zimbra-snmp
    zimbra-store
    zimbra-apache
    zimbra-spell
    zimbra-memcached
    zimbra-proxy

The system will be modified.  Continue? [N] y

Shutting down zimbra mail

Backing up the ldap database...done.

Removing existing packages

   zimbra-ldap...done
   zimbra-logger...done
   zimbra-mta...done
   zimbra-snmp...done
   zimbra-store...done
   zimbra-spell...done
   zimbra-memcached...done
   zimbra-proxy...done
   zimbra-apache...done
   zimbra-core...done

Removing deployed webapp directories
Installing packages

    zimbra-core......zimbra-core-8.5.0_GA_3042.RHEL6_64-20140828192005.x86_64.rpm...done
    zimbra-ldap......zimbra-ldap-8.5.0_GA_3042.RHEL6_64-20140828192005.x86_64.rpm...done
    zimbra-logger......zimbra-logger-8.5.0_GA_3042.RHEL6_64-20140828192005.x86_64.rpm...done
    zimbra-mta......zimbra-mta-8.5.0_GA_3042.RHEL6_64-20140828192005.x86_64.rpm...done
    zimbra-snmp......zimbra-snmp-8.5.0_GA_3042.RHEL6_64-20140828192005.x86_64.rpm...done
    zimbra-store......zimbra-store-8.5.0_GA_3042.RHEL6_64-20140828192005.x86_64.rpm...done
    zimbra-apache......zimbra-apache-8.5.0_GA_3042.RHEL6_64-20140828192005.x86_64.rpm...done
    zimbra-spell......zimbra-spell-8.5.0_GA_3042.RHEL6_64-20140828192005.x86_64.rpm...done
    zimbra-memcached......zimbra-memcached-8.5.0_GA_3042.RHEL6_64-20140828192005.x86_64.rpm...done
    zimbra-proxy......zimbra-proxy-8.5.0_GA_3042.RHEL6_64-20140828192005.x86_64.rpm...done

Setting defaults from saved config in /opt/zimbra/.saveconfig/config.save
   HOSTNAME=centos65.ehowstuff.local
   LDAPHOST=centos65.ehowstuff.local
   LDAPPORT=389
   SNMPTRAPHOST=centos65.ehowstuff.local
   SMTPSOURCE=admin@ehowstuff.local
   SMTPDEST=admin@ehowstuff.local
   SNMPNOTIFY=yes
   SMTPNOTIFY=yes
   LDAPROOTPW=35WrLoqhzZ
   LDAPZIMBRAPW=35WrLoqhzZ
   LDAPPOSTPW=35WrLoqhzZ
   LDAPREPPW=35WrLoqhzZ
   LDAPAMAVISPW=35WrLoqhzZ
   LDAPNGINXPW=35WrLoqhzZ
Restoring existing configuration file from /opt/zimbra/.saveconfig/localconfig.xml...done
Operations logged to /tmp/zmsetup09042014-232935.log
Upgrading from 8.0.7_GA_6021 to 8.5.0_GA_3042
Stopping zimbra services...done.
This appears to be 8.0.7_GA
Starting mysql...done.
Checking ldap status...not running.
Checking ldap status...not running.
Starting ldap...done.
Checking ldap status...already running.
Running mysql_upgrade...done.
Schema upgrade required from version 92 to 103.
Running /opt/zimbra/libexec/scripts/migrate20130226_alwayson.pl
Thu Sep  4 23:30:44 2014: Verified schema version 92.
Thu Sep  4 23:30:47 2014: Verified schema version 92.
Thu Sep  4 23:30:47 2014: Updating DB schema version from 92 to 100.
Running /opt/zimbra/libexec/scripts/migrate20140319-MailItemPrevFolders.pl
Thu Sep  4 23:30:53 2014: Verified schema version 100.
Thu Sep  4 23:30:54 2014: Migrating mboxgroup1.  This can take a substantial amount of time...
Thu Sep  4 23:30:59 2014: done.

Thu Sep  4 23:30:59 2014: Migrating mboxgroup2.  This can take a substantial amount of time...
Thu Sep  4 23:31:02 2014: done.

Thu Sep  4 23:31:02 2014: Migrating mboxgroup3.  This can take a substantial amount of time...
Thu Sep  4 23:31:05 2014: done.

Thu Sep  4 23:31:05 2014: Migrating mboxgroup4.  This can take a substantial amount of time...
Thu Sep  4 23:31:09 2014: done.

Thu Sep  4 23:31:09 2014: Migrating mboxgroup5.  This can take a substantial amount of time...
Thu Sep  4 23:31:12 2014: done.

Thu Sep  4 23:31:13 2014: Verified schema version 100.
Thu Sep  4 23:31:13 2014: Updating DB schema version from 100 to 101.
Running /opt/zimbra/libexec/scripts/migrate20140328-EnforceTableCharset.pl
Thu Sep  4 23:31:19 2014: Verified schema version 101.
Thu Sep  4 23:31:37 2014: Verified schema version 101.
Thu Sep  4 23:31:37 2014: Updating DB schema version from 101 to 102.
Running /opt/zimbra/libexec/scripts/migrate20140624-DropMysqlIndexes.pl
Thu Sep  4 23:31:43 2014: Verified schema version 102.
Thu Sep  4 23:31:54 2014: Verified schema version 102.
Thu Sep  4 23:31:54 2014: Updating DB schema version from 102 to 103.
Stopping mysql...done.
Updating from 8.0.8_GA
Updating from 8.5.0_BETA1
Updating from 8.5.0_BETA2
Updating from 8.5.0_BETA3
Updating from 8.5.0_GA
Updating global config and COS's with attributes introduced after 8.0.7_GA...done.
Stopping ldap...done.
Upgrade complete.

Checking ldap status....not running.
Starting ldap...done.
Setting defaults...done.
Setting defaults from existing config...done.
Checking for port conflicts
Setting defaults from ldap...done.
Saving config in /opt/zimbra/config.31153...done.
Operations logged to /tmp/zmsetup09042014-232935.log
Setting local config values...done.
Initializing core config...Setting up CA...done.
Deploying CA to /opt/zimbra/conf/ca ...done.
Setting replication password...done.
Setting Postfix password...done.
Setting amavis password...done.
Setting nginx password...done.
Creating server entry for centos65.ehowstuff.local...already exists.
Setting Zimbra IP Mode...done.
Saving CA in ldap ...done.
Saving SSL Certificate in ldap ...done.
Setting spell check URL...done.
Setting service ports on centos65.ehowstuff.local...done.
Setting Keyboard Shortcut Preferences...done.
Setting zimbraFeatureTasksEnabled=TRUE...done.
Setting zimbraFeatureBriefcasesEnabled=FALSE...done.
Setting MTA auth host...done.
Setting TimeZone Preference...done.
Initializing mta config...done.
Setting services on centos65.ehowstuff.local...done.
Adding centos65.ehowstuff.local to zimbraMailHostPool in default COS...done.
Creating user spam.wc5ohhoylp@ehowstuff.local...already exists.
Creating user ham.ypxiyleoyj@ehowstuff.local...already exists.
Creating user virus-quarantine.kl6ejsnmd@ehowstuff.local...already exists.
Setting spam training and Anti-virus quarantine accounts...done.
Configuring SNMP...done.
Setting up syslog.conf...done.
Starting servers...done.
Checking for deprecated zimlets...done.
Checking for network zimlets in LDAP...done.
Removing network zimlets...
Finished removing network zimlets.
Installing common zimlets...
        com_zimbra_webex...done.
        com_zimbra_date...done.
        com_zimbra_adminversioncheck...done.
        com_zimbra_cert_manager...done.
        com_zimbra_tooltip...done.
        com_zimbra_proxy_config...done.
        com_zimbra_attachcontacts...done.
        com_zimbra_viewmail...done.
        com_zimbra_bulkprovision...done.
        com_zimbra_clientuploader...done.
        com_zimbra_linkedinimage...done.
        com_zimbra_phone...done.
        com_zimbra_attachmail...done.
        com_zimbra_ymemoticons...done.
        com_zimbra_srchhighlighter...done.
        com_zimbra_mailarchive...done.
        com_zimbra_url...done.
        com_zimbra_email...done.
Finished installing common zimlets.
Getting list of all zimlets...done.
Updating non-standard zimlets...
Finished updating non-standard zimlets.
Restarting mailboxd...done.
Skipping creation of default domain GAL sync account - existing install detected.

You have the option of notifying Zimbra of your installation.
This helps us to track the uptake of the Zimbra Collaboration Server.
The only information that will be transmitted is:
        The VERSION of zcs installed (8.5.0_GA_3042_RHEL6_64)
        The ADMIN EMAIL ADDRESS created (admin@ehowstuff.local)

Notify Zimbra of your installation? [Yes] no
Notification skipped
Setting up zimbra crontab...done.


Moving /tmp/zmsetup09042014-232935.log to /opt/zimbra/log


Configuration complete - press return to exit

5. Once upgrade process completed, please verify the zimbra services :

[root@Zimbra8 ~]# su - zimbra
[zimbra@centos65-Zimbra8 ~]$ zmcontrol status
Host centos65.ehowstuff.local
        amavis                  Running
        antispam                Running
        antivirus               Running
        ldap                    Running
        logger                  Running
        mailbox                 Running
        memcached               Running
        mta                     Running
        opendkim                Running
        proxy                   Running
        service webapp          Running
        snmp                    Running
        spell                   Running
        stats                   Running
        zimbra webapp           Running
        zimbraAdmin webapp      Running
        zimlet webapp           Running
        zmconfigd               Running

How to Setup NetHogs – Monitor Bandwidth Usage Per Process in Linux

NetHogs is a opensource tools to monitor network bandwidth that was used by the process and program in linux operating system. NetHogs does not rely on a special kernel module to be loaded. When you hit the high network traffic issue on your linux server, you can immediately find which PID is causing the issue. NetHogs will give you real time statistics of your network bandwidth of per process usage. Follow this steps to install NetHogs on linux CentOS 6.5 and the sample nethogs usage.

1. Prepare additional repository (EPEL repository).

2. Install nethogs :

[root@oss ~]# yum install nethogs -y

3. NetHogs utility :

[root@oss ~]# nethogs

Sample output :
setup nethogs -1

4. NetHogs command option :
There are a few commad options when using nethogs. Using ‘-d‘ to add a refresh rate. As an example, to set 5 seconds as your refresh rate, then type the command as.

[root@oss ~]# nethogs -d 5

Other options :

-d     delay for refresh rate.
-h     display available commands usage.
-p     sniff in promiscious mode (not recommended).
-t     tracemode.
-V     prints Version info.

5. Monitor specific device (eth0 or eth1) network bandwidth only :

a) Monitor eth0 bandwidth :

[root@oss ~]# nethogs eth0

a) Monitor eth0 and eth1 bandwidth :

[root@oss ~]# nethogs eth0 eth1

Reference :

How to Setup Collectl – Linux Performance Monitoring

Collectl is a linux performance monitoring tools that grabs as much detail as possible from the /proc filesystem and it does a lot more than most other tools. Compare to sar, collectl has some capabilities that sar does not have. Collectl can gather and post-process the performance data and also can save the performance data for later analysis. Please refer to below guide on how you can setup collectl on linux CentOS 6.5 and the sample usage of collectl :

1. Install collectl. Make sure additional repository (EPEL repository) has been installed :
a. For Red Hat based distro :

[root@oss ~]# yum install collectl -y

b. For debian bas distro :

[root@oss ~]# sudo apt-get install collectl -y

2. Display collectl command help :

[root@oss ~]# collectl -h
This is a subset of the most common switches and even the descriptions are
abbreviated.  To see all type 'collectl -x', to get started just type 'collectl'

usage: collectl [switches]
  -c, --count      count      collect this number of samples and exit
  -f, --filename   file       name of directory/file to write to
  -i, --interval   int        collection interval in seconds [default=1]
  -o, --options    options    misc formatting options, --showoptions for all
                                d|D - include date in output
                                  T - include time in output
                                  z - turn off compression of plot files
  -p, --playback   file       playback results from 'file' (be sure to quote
                              if wild carded) or the shell might mess it up
  -P, --plot                  generate output in 'plot' format
  -s, --subsys     subsys     specify one or more subsystems [default=cdn]
      --verbose               display output in verbose format (automatically
                              selected when brief doesn't make sense)

Various types of help
  -h, --help                  print this text
  -v, --version               print version
  -V, --showdefs              print operational defaults
  -x, --helpextend            extended help, more details descriptions too
  -X, --helpall               shows all help concatenated together

  --showoptions               show all the options
  --showsubsys                show all the subsystems
  --showsubopts               show all subsystem specific options
  --showtopopts               show --top options

  --showheader                show file header that 'would be' generated
  --showcolheaders            show column headers that 'would be' generated
  --showslabaliases           for SLUB allocator, show non-root aliases
  --showrootslabs             same as --showslabaliases but use 'root' names

Copyright 2003-2014 Hewlett-Packard Development Company, L.P.
collectl may be copied only under the terms of either the Artistic License
or the GNU General Public License, which may be found in the source kit

3. According to the man page, collectl identifies the following subsystems :

SUMMARY SUBSYSTEMS

OptionDescription
bBuddy information (memory fragmentation)
cCPU information
dDisk
fNFS information
iinode information
jInterrupts
lLustre
mMemory
nNetworks
sSockets
tTCP
xInterconnect
ySlabs

DETAIL SUBSYSTEMS

OptionDescription
CCPU
DDisk
EEnvironmentals via ipmitool
FNFS data
JInterrupts
MMemory node data (including numa)
NNetworks
TSixty-five TCP counters (only in plot format)
XInterconnect
YSlabs
ZProcesses

 

4. Monitor cpu subsystem :

[root@oss ~]# collectl -sc
waiting for 1 second sample...
#< --------CPU-------->
#cpu sys inter  ctxsw
   0   0    34     37
   0   0    56     40
   0   0    38     44
   0   0    31     35
   0   0    36     44
[root@oss ~]# collectl -sC
waiting for 1 second sample...

# SINGLE CPU STATISTICS
#   Cpu  User Nice  Sys Wait IRQ  Soft Steal Idle
      0     0    0    0    0    0    0     0  100
      1     0    0    0    0    0    0     0  100
      0     0    0    0    0    0    0     0  100
      1     0    0    0    0    0    0     0  100
      0     0    0    0    0    0    0     0  100
      1     0    0    0    0    0    0     0  100
      0     0    0    0    0    0    0     0  100
      1     0    0    0    0    0    0     0  100
      0     0    0    0    0    0    0     0  100
      1     0    0    0    4    0    0     0   96
      0     0    0    0    0    0    0     0   99
      1     0    0    0    0    0    0     0   99
      0     0    0    0    0    0    0     0  100
      1     0    0    0    0    0    0     0  100
      0     0    0    0    0    0    0     0  100
      1     1    0    0    0    0    0     0   99
      0     0    0    0    0    0    0     0  100
      1     0    0    0    0    0    0     0  100
      0     0    0    0    0    0    0     0  100
      1     0    0    0    0    0    0     0  100
      0     0    0    0    0    0    0     0  100
      1     0    0    0    0    0    0     0  100

5. Monitor memory subsystem :

[root@oss ~]# collectl -sm
waiting for 1 second sample...
#< -----------Memory----------->
#Free Buff Cach Inac Slab  Map
   3G  19M 166M  50M  36M  34M
   3G  19M 166M  50M  36M  34M
   3G  19M 166M  50M  36M  34M
   3G  19M 166M  50M  36M  34M
   3G  19M 166M  50M  36M  34M
   3G  19M 166M  50M  36M  34M
   3G  19M 166M  50M  36M  34M
   3G  19M 166M  50M  36M  34M
[root@oss ~]# collectl -sM
waiting for 1 second sample...

# MEMORY STATISTICS
# Node    Total     Used     Free     Slab   Mapped     Anon   Locked    Inact   Hit%
     0    4095M  565208K    3543M   37112K    9408K   25492K        0   51756K 100.00
     0    4095M  565208K    3543M   37112K    9408K   25492K        0   51756K 100.00
     0    4095M  565208K    3543M   37108K    9408K   25492K        0   51756K 100.00
     0    4095M  565208K    3543M   37108K    9408K   25492K        0   51756K 100.00
     0    4095M  565208K    3543M   37108K    9408K   25492K        0   51756K 100.00
     0    4095M  565208K    3543M   37108K    9408K   25492K        0   51760K 100.00
     0    4095M  565208K    3543M   37036K    9408K   25492K        0   51760K 100.00
     0    4095M  565184K    3543M   37028K    9408K   25492K        0   51760K 100.00
     0    4095M  565184K    3543M   37028K    9408K   25492K        0   51760K 100.00
     0    4095M  565184K    3543M   37024K    9408K   25492K        0   51760K 100.00
     0    4095M  565184K    3543M   37024K    9408K   25492K        0   51760K 100.00
     0    4095M  565184K    3543M   37016K    9408K   25492K        0   51760K 100.00
     0    4095M  565168K    3543M   36972K    9408K   25492K        0   51760K 100.00
     0    4095M  565168K    3543M   36972K    9408K   25492K        0   51760K 100.00
     0    4095M  565168K    3543M   36972K    9408K   25492K        0   51760K 100.00
     0    4095M  565168K    3543M   36968K    9408K   25492K        0   51760K 100.00
     0    4095M  565160K    3543M   36932K    9408K   25492K        0   51760K 100.00
     0    4095M  565160K    3543M   36932K    9408K   25492K        0   51760K 100.00
     0    4095M  565160K    3543M   36932K    9408K   25492K        0   51760K 100.00
     0    4095M  565160K    3543M   36900K    9408K   25492K        0   51760K 100.00
     0    4095M  565160K    3543M   36900K    9408K   25492K        0   51760K 100.00
     0    4095M  565160K    3543M   36900K    9408K   25492K        0   51760K 100.00

6. Monitor disk subsystem :

[root@oss ~]# collectl -sd
waiting for 1 second sample...
#< ----------Disks----------->
#KBRead  Reads KBWrit Writes
      0      0      0      0
      0      0      0      0
      0      0      0      0
      0      0      0      0
      0      0     16      3
      0      0      0      0
      0      0      0      0
      0      0      0      0
      0      0      0      0
      0      0      0      0
[root@oss ~]# collectl -sD
waiting for 1 second sample...

# DISK STATISTICS (/sec)
#           Pct
#Name       KBytes Merged  IOs Size  KBytes Merged  IOs Size  RWSize  QLen  Wait SvcTim Util
sda              0      0    0    0       0      0    0    0       0     0     0      0    0
sda              0      0    0    0       0      0    0    0       0     0     0      0    0
sda              0      0    0    0      16      1    3    5       5     1    13     10    3
sda              0      0    0    0       0      0    0    0       0     0     0      0    0
sda              0      0    0    0       0      0    0    0       0     0     0      0    0
sda              0      0    0    0       0      0    0    0       0     0     0      0    0
sda              0      0    0    0       0      0    0    0       0     0     0      0    0
sda              0      0    0    0       0      0    0    0       0     0     0      0    0
sda              0      0    0    0       0      0    0    0       0     0     0      0    0

7. collectl like iotop :

[root@oss ~]# collectl --top iokb

Sample output :

# TOP PROCESSES sorted by iokb (counters are /sec) 13:35:14
# PID  User     PR  PPID THRD S   VSZ   RSS CP  SysT  UsrT Pct  AccuTime  RKB  WKB MajF MinF Command
    1  root     20     0    0 S   18M    1M  0  0.00  0.00   0  00:01.13    0    0    0    0 /sbin/init
    2  root     20     0    0 S     0     0  0  0.00  0.00   0  00:00.02    0    0    0    0 kthreadd
    3  root     RT     2    0 S     0     0  0  0.00  0.00   0  00:00.04    0    0    0    0 migration/0
    4  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.09    0    0    0    0 ksoftirqd/0
    5  root     RT     2    0 S     0     0  0  0.00  0.00   0  00:00.00    0    0    0    0 migration/0
    6  root     RT     2    0 S     0     0  0  0.00  0.00   0  00:00.30    0    0    0    0 watchdog/0
    7  root     RT     2    0 S     0     0  1  0.00  0.00   0  00:00.38    0    0    0    0 migration/1
    8  root     RT     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 migration/1
    9  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.22    0    0    0    0 ksoftirqd/1
   10  root     RT     2    0 S     0     0  1  0.00  0.00   0  00:00.28    0    0    0    0 watchdog/1
   11  root     20     2    0 S     0     0  0  0.00  0.00   0  00:08.15    0    0    0    0 events/0
   12  root     20     2    0 S     0     0  1  0.00  0.00   0  01:21.61    0    0    0    0 events/1
   13  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 cgroup
   14  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.00    0    0    0    0 khelper
   15  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 netns
   16  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.00    0    0    0    0 async/mgr
   17  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 pm
   18  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.84    0    0    0    0 sync_supers
   19  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.82    0    0    0    0 bdi-default
   20  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.00    0    0    0    0 kintegrityd/0
   21  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 kintegrityd/1
   22  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.15    0    0    0    0 kblockd/0

Display only top 10 processes :

[root@oss ~]# collectl --top iokb,10

Sample output :

# TOP PROCESSES sorted by iokb (counters are /sec) 13:42:37
# PID  User     PR  PPID THRD S   VSZ   RSS CP  SysT  UsrT Pct  AccuTime  RKB  WKB MajF MinF Command
    1  root     20     0    0 S   18M    1M  0  0.00  0.00   0  00:01.13    0    0    0    0 /sbin/init
    2  root     20     0    0 S     0     0  0  0.00  0.00   0  00:00.02    0    0    0    0 kthreadd
    3  root     RT     2    0 S     0     0  0  0.00  0.00   0  00:00.04    0    0    0    0 migration/0
    4  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.09    0    0    0    0 ksoftirqd/0
    5  root     RT     2    0 S     0     0  0  0.00  0.00   0  00:00.00    0    0    0    0 migration/0
    6  root     RT     2    0 S     0     0  0  0.00  0.00   0  00:00.30    0    0    0    0 watchdog/0
    7  root     RT     2    0 S     0     0  1  0.00  0.00   0  00:00.39    0    0    0    0 migration/1
    8  root     RT     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 migration/1
    9  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.22    0    0    0    0 ksoftirqd/1
   10  root     RT     2    0 S     0     0  1  0.00  0.00   0  00:00.28    0    0    0    0 watchdog/1

Learn what fields the above list can be sorted :

[root@oss ~]# collectl --showtopopts
The following is a list of --top's sort types which apply to either
process or slab data.  In some cases you may be allowed to sort
by a field that is not part of the display if you so desire

TOP PROCESS SORT FIELDS

Memory
  vsz    virtual memory
  rss    resident (physical) memory

Time
  syst   system time
  usrt   user time
  time   total time
  accum  accumulated time

I/O
  rkb    KB read
  wkb    KB written
  iokb   total I/O KB

  rkbc   KB read from pagecache
  wkbc   KB written to pagecache
  iokbc  total pagecacge I/O
  ioall  total I/O KB (iokb+iokbc)

  rsys   read system calls
  wsys   write system calls
  iosys  total system calls

  iocncl Cancelled write bytes

Page Faults
  majf   major page faults
  minf   minor page faults
  flt    total page faults

Context Switches
  vctx   volunary context switches
  nctx   non-voluntary context switches

Miscellaneous (best when used with --procfilt)
  cpu    cpu number
  pid    process pid
  thread total process threads (not counting main)

TOP SLAB SORT FIELDS

  numobj    total number of slab objects
  actobj    active slab objects
  objsize   sizes of slab objects
  numslab   number of slabs
  objslab   number of objects in a slab
  totsize   total memory sizes taken by slabs
  totchg    change in memory sizes
  totpct    percent change in memory sizes
  name      slab names

8. collectl like top :

[root@oss ~]# collectl --top

Sample output :

# TOP PROCESSES sorted by time (counters are /sec) 13:45:00
# PID  User     PR  PPID THRD S   VSZ   RSS CP  SysT  UsrT Pct  AccuTime  RKB  WKB MajF MinF Command
 3266  root     20  2488    0 R  160M   21M  1  0.00  0.05   5  00:00.70    0    0    0   83 /usr/bin/perl
    1  root     20     0    0 S   18M    1M  0  0.00  0.00   0  00:01.13    0    0    0    0 /sbin/init
    2  root     20     0    0 S     0     0  0  0.00  0.00   0  00:00.02    0    0    0    0 kthreadd
    3  root     RT     2    0 S     0     0  0  0.00  0.00   0  00:00.04    0    0    0    0 migration/0
    4  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.09    0    0    0    0 ksoftirqd/0
    5  root     RT     2    0 S     0     0  0  0.00  0.00   0  00:00.00    0    0    0    0 migration/0
    6  root     RT     2    0 S     0     0  0  0.00  0.00   0  00:00.31    0    0    0    0 watchdog/0
    7  root     RT     2    0 S     0     0  1  0.00  0.00   0  00:00.39    0    0    0    0 migration/1
    8  root     RT     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 migration/1
    9  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.22    0    0    0    0 ksoftirqd/1
   10  root     RT     2    0 S     0     0  1  0.00  0.00   0  00:00.28    0    0    0    0 watchdog/1
   11  root     20     2    0 S     0     0  0  0.00  0.00   0  00:08.18    0    0    0    0 events/0
   12  root     20     2    0 S     0     0  1  0.00  0.00   0  01:21.97    0    0    0    0 events/1
   13  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 cgroup
   14  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.00    0    0    0    0 khelper
   15  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 netns
   16  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.00    0    0    0    0 async/mgr
   17  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 pm
   18  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.84    0    0    0    0 sync_supers
   19  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.83    0    0    0    0 bdi-default
   20  root     20     2    0 S     0     0  0  0.00  0.00   0  00:00.00    0    0    0    0 kintegrityd/0
   21  root     20     2    0 S     0     0  1  0.00  0.00   0  00:00.00    0    0    0    0 kintegrityd/1

More advance options can be found in the official collectl documentation :

How to Setup Sar (Sysstat) – Monitor Linux System Performance

Sysstat contains various utilities to collect and historize performance and monitor server activity on the linux. Sar is part of the sysstat package. by using sar, we can collect, report, or save system resource utilization information. It will help system administrator to troubleshoot performance issues, or to optimize performance. This post will show how to setup and the usage of sar on linux CentOS 6.5.

1. Install sar (systat) :

[root@oss ~]# yum install sysstat -y

2. Verify the sar version using “sar -V”

[root@oss ~]# sar -V
sysstat version 9.0.4
(C) Sebastien Godard (sysstat  orange.fr)

3. Sar usage examples :

a) Check swap usage :

[root@oss ~]# sar -W
Linux 2.6.32-431.el6.x86_64 (oss.ehowstuff.local)       08/18/2014      _x86_64_        (2 CPU)

11:10:01 PM  pswpin/s pswpout/s
11:20:01 PM      0.00      0.00
11:30:01 PM      0.00      0.00
11:40:01 PM      0.00      0.00
Average:         0.00      0.00

b) Check system load :

[root@oss ~]# sar -q
Linux 2.6.32-431.el6.x86_64 (oss.ehowstuff.local)       08/18/2014      _x86_64_        (2 CPU)

11:10:01 PM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15
11:20:01 PM         0        86      0.00      0.00      0.00
11:30:01 PM         0        85      0.00      0.00      0.00
11:40:01 PM         0        85      0.00      0.00      0.00
Average:            0        85      0.00      0.00      0.00

c) Collect CPU statistics 3 times within 1 second interval :

[root@oss ~]# sar 1 3
Linux 2.6.32-431.el6.x86_64 (oss.ehowstuff.local)       08/18/2014      _x86_64_        (2 CPU)

11:46:55 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle
11:46:56 PM     all      0.00      0.00      0.50      0.00      0.00     99.50
11:46:57 PM     all      0.00      0.00      0.00      0.00      0.00    100.00
11:46:58 PM     all      0.00      0.00      0.00      0.00      0.00    100.00
Average:        all      0.00      0.00      0.17      0.00      0.00     99.83

d) Displaying the RAM Load:

[root@oss ~]# sar -r
Linux 2.6.32-431.el6.x86_64 (oss.ehowstuff.local)       08/18/2014      _x86_64_        (2 CPU)

11:10:01 PM kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit
11:20:01 PM   3670608    254080      6.47     11872    160172     67684      1.12
11:30:01 PM   3670616    254072      6.47     11892    160172     67684      1.12
11:40:01 PM   3670508    254180      6.48     11920    160180     67684      1.12
Average:      3670577    254111      6.47     11895    160175     67684      1.12

e) Display paging statistic :

[root@oss ~]# sar -B
Linux 2.6.32-431.el6.x86_64 (oss.ehowstuff.local)       08/18/2014      _x86_64_        (2 CPU)

11:10:01 PM  pgpgin/s pgpgout/s   fault/s  majflt/s  pgfree/s pgscank/s pgscand/s pgsteal/s    %vmeff
11:20:01 PM      0.00      0.23      8.21      0.00      4.36      0.00      0.00      0.00      0.00
11:30:01 PM      0.00      0.19      2.70      0.00      1.29      0.00      0.00      0.00      0.00
11:40:01 PM      0.00      0.14      3.75      0.00      1.62      0.00      0.00      0.00      0.00
11:50:01 PM      0.00      0.16      6.60      0.00      2.80      0.00      0.00      0.00      0.00
Average:         0.00      0.18      5.31      0.00      2.52      0.00      0.00      0.00      0.00

f) Display Swap space utilization statistics :

[root@oss ~]# sar -S
Linux 2.6.32-431.el6.x86_64 (oss.ehowstuff.local)       08/18/2014      _x86_64_        (2 CPU)

11:10:01 PM kbswpfree kbswpused  %swpused  kbswpcad   %swpcad
11:20:01 PM   2097144         0      0.00         0      0.00
11:30:01 PM   2097144         0      0.00         0      0.00
11:40:01 PM   2097144         0      0.00         0      0.00
11:50:01 PM   2097144         0      0.00         0      0.00
Average:      2097144         0      0.00         0      0.00

4. Monitor previous day sar statictics :

Every sar statictics by default stored in /var/log/sa. Es example :

[root@oss sa]# ls
sa18  sa19  sa20  sa21  sa22  sa23  sa24  sar18  sar19  sar20  sar23

a. Display cpu load on sa22 :

[root@oss sa]# sar -f /var/log/sa/sa22
Linux 2.6.32-431.el6.x86_64 (oss.ehowstuff.local)       08/22/2014      _x86_64_        (2 CPU)

12:00:01 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
12:10:01 AM     all      0.04      0.00      0.06      0.06      0.00     99.84
12:20:01 AM     all      0.03      0.00      0.05      0.07      0.00     99.85
12:30:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.90
12:40:01 AM     all      0.34      0.00      0.71      0.02      0.00     98.93
12:50:01 AM     all      1.67      0.00      3.19      0.01      0.00     95.13
01:00:01 AM     all      0.64      0.00      0.83      0.74      0.00     97.79
01:10:01 AM     all      0.64      0.00      1.51      0.03      0.00     97.83
01:20:01 AM     all      0.35      0.00      0.71      0.13      0.00     98.81
01:30:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.90
01:40:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.90
01:50:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.91
02:00:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.90
02:10:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.90
02:20:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.91
02:30:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.91
02:40:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.91
02:50:01 AM     all      0.03      0.00      0.04      0.01      0.00     99.92
03:00:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.92
03:10:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.91
03:20:01 AM     all      0.03      0.00      0.04      0.01      0.00     99.92
03:30:01 AM     all      0.03      0.00      0.04      0.01      0.00     99.92
03:40:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.91
03:50:01 AM     all      0.03      0.00      0.05      0.03      0.00     99.89
04:00:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.91
04:10:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.91
04:20:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.92
04:30:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.91
04:40:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.91
04:50:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.91
05:00:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.92
05:10:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.90
05:20:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.91
05:30:01 AM     all      0.03      0.00      0.04      0.02      0.00     99.91

05:30:01 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
05:40:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.91
05:50:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.91
06:00:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.91
06:10:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.90
06:20:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.91
06:30:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.91
06:40:02 AM     all      0.03      0.00      0.05      0.01      0.00     99.92
06:50:01 AM     all      0.03      0.00      0.04      0.01      0.00     99.92
07:00:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.91
07:10:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.91
07:20:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.92
07:30:01 AM     all      0.03      0.00      0.04      0.01      0.00     99.92
07:40:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.91
07:50:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.91
08:00:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.91
08:10:01 AM     all      0.03      0.00      0.05      0.02      0.00     99.90
08:20:01 AM     all      0.03      0.00      0.05      0.01      0.00     99.91
Average:        all      0.10      0.00      0.18      0.03      0.00     99.69

b. Display RAM Load on sa22 :

[root@oss sa]# sar -f /var/log/sa/sa22 -r
Linux 2.6.32-431.el6.x86_64 (oss.ehowstuff.local)       08/22/2014      _x86_64_        (2 CPU)

12:00:01 AM kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit
12:10:01 AM   3807336    117352      2.99      8252     32352     66920      1.11
12:20:01 AM   3804708    119980      3.06      8712     32812     71440      1.19
12:30:01 AM   3804584    120104      3.06      8744     32816     71592      1.19
12:40:01 AM   3799784    124904      3.18      8768     33124     72228      1.20
12:50:01 AM   3799668    125020      3.19      8800     33124     72228      1.20
01:00:01 AM   3723612    201076      5.12     10048    110608     71592      1.19
01:10:01 AM   3718804    205884      5.25     10232    111044     72228      1.20
01:20:01 AM   3711560    213128      5.43     10284    122396     71592      1.19
01:30:01 AM   3711684    213004      5.43     10324    122408     71592      1.19
01:40:01 AM   3711436    213252      5.43     10348    122408     71592      1.19
01:50:01 AM   3711436    213252      5.43     10372    122412     71592      1.19
02:00:01 AM   3711560    213128      5.43     10404    122416     71592      1.19
02:10:01 AM   3711576    213112      5.43     10444    122424     71592      1.19
02:20:01 AM   3711568    213120      5.43     10476    122428     71592      1.19
02:30:01 AM   3711444    213244      5.43     10516    122436     71592      1.19
02:40:01 AM   3711320    213368      5.44     10552    122436     71592      1.19
02:50:01 AM   3711320    213368      5.44     10580    122444     71592      1.19
03:00:01 AM   3711188    213500      5.44     10612    122448     71592      1.19
03:10:01 AM   3711180    213508      5.44     10652    122456     72168      1.20
03:20:01 AM   3711180    213508      5.44     10676    122456     72168      1.20
03:30:01 AM   3710932    213756      5.45     10708    122464     72168      1.20
03:40:01 AM   3710692    213996      5.45     10740    122464     72168      1.20
03:50:01 AM   3710700    213988      5.45     10928    122604     71592      1.19
04:00:01 AM   3710568    214120      5.46     10960    122608     71592      1.19
04:10:01 AM   3710816    213872      5.45     11000    122608     71592      1.19
04:20:01 AM   3710576    214112      5.46     11032    122616     71592      1.19
04:30:01 AM   3710576    214112      5.46     11068    122616     71592      1.19
04:40:01 AM   3710708    213980      5.45     11096    122624     71592      1.19
04:50:01 AM   3710452    214236      5.46     11128    122628     71592      1.19
05:00:01 AM   3710576    214112      5.46     11160    122636     71592      1.19
05:10:01 AM   3710452    214236      5.46     11200    122636     71592      1.19
05:20:01 AM   3710576    214112      5.46     11232    122644     71592      1.19
05:30:01 AM   3710708    213980      5.45     11268    122644     71592      1.19

05:30:01 AM kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit
05:40:01 AM   3710320    214368      5.46     11296    122652     71592      1.19
05:50:01 AM   3710072    214616      5.47     11320    122652     71592      1.19
06:00:01 AM   3710204    214484      5.46     11364    122660     71592      1.19
06:10:01 AM   3710072    214616      5.47     11400    122664     71592      1.19
06:20:01 AM   3710204    214484      5.46     11424    122668     71592      1.19
06:30:01 AM   3710204    214484      5.46     11464    122676     71592      1.19
06:40:02 AM   3709948    214740      5.47     11488    122680     71592      1.19
06:50:01 AM   3710072    214616      5.47     11512    122680     71592      1.19
07:00:01 AM   3710204    214484      5.46     11552    122680     71592      1.19
07:10:01 AM   3709824    214864      5.47     11584    122692     71592      1.19
07:20:01 AM   3709948    214740      5.47     11612    122688     71592      1.19
07:30:01 AM   3709956    214732      5.47     11648    122700     71592      1.19
07:40:01 AM   3709956    214732      5.47     11680    122704     71592      1.19
07:50:01 AM   3709824    214864      5.47     11704    122708     71592      1.19
08:00:01 AM   3709832    214856      5.47     11744    122712     71592      1.19
08:10:01 AM   3709700    214988      5.48     11784    122724     71592      1.19
08:20:01 AM   3709700    214988      5.48     11812    122720     71592      1.19
Average:      3720306    204382      5.21     10794    113138     71580      1.19

5. Other sar options :

[root@oss ~]# sar -h
Usage: sar [ options ] [  [  ] ]
Main options and reports:
        -b      I/O and transfer rate statistics
        -B      Paging statistics
        -d      Block device statistics
        -I {  | SUM | ALL | XALL }
                Interrupts statistics
        -m      Power management statistics
        -n {  [,...] | ALL }
                Network statistics
                Keywords are:
                DEV     Network interfaces
                EDEV    Network interfaces (errors)
                NFS     NFS client
                NFSD    NFS server
                SOCK    Sockets (v4)
                IP      IP traffic      (v4)
                EIP     IP traffic      (v4) (errors)
                ICMP    ICMP traffic    (v4)
                EICMP   ICMP traffic    (v4) (errors)
                TCP     TCP traffic     (v4)
                ETCP    TCP traffic     (v4) (errors)
                UDP     UDP traffic     (v4)
                SOCK6   Sockets (v6)
                IP6     IP traffic      (v6)
                EIP6    IP traffic      (v6) (errors)
                ICMP6   ICMP traffic    (v6)
                EICMP6  ICMP traffic    (v6) (errors)
                UDP6    UDP traffic     (v6)
        -q      Queue length and load average statistics
        -r      Memory utilization statistics
        -R      Memory statistics
        -S      Swap space utilization statistics
        -u [ ALL ]
                CPU utilization statistics
        -v      Kernel table statistics
        -w      Task creation and system switching statistics
        -W      Swapping statistics
        -y      TTY device statistics

6. Other sysstat utilities:

sar collects and displays ALL system activities statistics.
sadc stands for “system activity data collector”. This is the sar backend tool that does the data collection.
sa1 stores system activities in binary data file. sa1 depends on sadc for this purpose. sa1 runs from cron.
sa2 creates daily summary of the collected statistics. sa2 runs from cron.
sadf can generate sar report in CSV, XML, and various other formats. Use this to integrate sar data with other tools.
iostat generates CPU, I/O statistics
mpstat displays CPU statistics.
pidstat reports statistics based on the process id (PID)
nfsiostat displays NFS I/O statistics.
cifsiostat generates CIFS statistics.

How to Setup Monitorix – Network and System Monitoring Tool for Linux

Monitorix is an open source and lightweight system monitoring tool designed to monitor network and system resources in linux/UNIX operating system. Monitorix can collects network and system performce and also resources and then display the informations into graphs. it will help system adn network administrator to detect abnormal activities and detecting bottlenecks. This post will show to setup Monitorix on linux centOS 6.5.

1. Prepare additional repository (EPEL repository).
2. Install required packages :

[root@oss ~]# yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple perl-IO-Socket-SSL -y

3. Install monitorix package :

[root@oss ~]# yum install monitorix -y

Once succesfully installed, please take a look into the configuration file /etc/monitorix.conf to fit your system and enable or disable graphs.

4. Start Monitorix with below command :

[root@oss ~]# service monitorix start

Once started, Monitorix will start gathering the system information based on the configuration set in monitorix.conf file:

5. After a few minutes you should be able to see graph from your browser :

http://IP-Address:8080/monitorix/

install-monitorx-1

install-monitorx-2

install-monitorx-3

How to Install Zabbix 2.2 Server on CentOS 6.5

ZABBIX is an enterprise-class open source monitoring solution designed to monitor servers and various network services. Zabbix will perform simple checks can verify the availability and responsiveness of standard services. It was created by Alexei Vladishev. Follow this step to install zabbix 2.2 server on CentOS 6.5 :

1. Install httpd, php and MySQL :

[root@oss ~]# yum install php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysql php-xml httpd httpd-devel mysql mysql-server -y

2. Zabbix package files are available at repo.zabbix.com :

[root@oss ~]# wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
--2014-08-12 22:19:07--  http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
Resolving repo.zabbix.com... 87.110.183.174
Connecting to repo.zabbix.com|87.110.183.174|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11256 (11K) [application/x-redhat-package-manager]
Saving to: âzabbix-release-2.2-1.el6.noarch.rpmâ

100%[==========================================================>] 11,256      7.09K/s   in 1.6s

2014-08-12 22:19:09 (7.09 KB/s) - âzabbix-release-2.2-1.el6.noarch.rpmâ
[root@oss ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog  zabbix-release-2.2-1.el6.noarch.rpm
[root@oss ~]# rpm -Uvh zabbix-release-2.2-1.el6.noarch.rpm
warning: zabbix-release-2.2-1.el6.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY
Preparing...                ########################################### [100%]
   1:zabbix-release         ########################################### [100%]

3. Install Zabbix server :

[root@oss ~]# yum install zabbix-agent zabbix-web-mysql zabbix-server-mysql zabbix-java-gateway -y

4. Editing PHP configuration for Zabbix frontend

Apache configuration file for Zabbix frontend is located in /etc/httpd/conf.d/zabbix.conf. Some PHP settings are already configured.

    php_value max_execution_time 300
    php_value memory_limit 128M
    php_value post_max_size 16M
    php_value upload_max_filesize 2M
    php_value max_input_time 300
    php_value date.timezone Asia/Kuala_Lumpur

5. Restart zabbix and make zabbix start at boot :

[root@oss ~]# service zabbix-server start
Starting Zabbix server:                                    [  OK  ]
[root@oss ~]# chkconfig zabbix-server on

6. Setup Zabbix database :

mysql> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit

7. Import initial schema and data :

[root@oss ~]# cd /usr/share/doc/zabbix-server-mysql-2.2.5/create

[root@oss create]# mysql -u zabbix -p zabbix < schema.sql
Enter password:
[root@oss create]# mysql -u zabbix -p zabbix < images.sql
Enter password:
[root@oss create]# mysql -u zabbix -p zabbix < data.sql
Enter password:

8. Start zabbix installation wizard :

http://192.168.0.8/zabbix/setup.php
setup zabbix-1

setup zabbix-2

setup zabbix-3

setup zabbix-4

setup zabbix-5

setup zabbix-6

9. If the configuration file is not writable, manually edit database configuration in zabbix_server.conf as below :

# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=password

10. Open required port at iptables :

[root@oss ~]# netstat -plunt | grep LISTEN
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1124/sshd
tcp        0      0 0.0.0.0:10051               0.0.0.0:*                   LISTEN      4190/zabbix_server
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      4074/mysqld
tcp        0      0 :::80                       :::*                        LISTEN      1417/httpd
tcp        0      0 :::22                       :::*                        LISTEN      1124/sshd
tcp        0      0 :::10051                    :::*                        LISTEN      4190/zabbix_server
[root@oss ~]# vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Restart iptables :

[root@oss ~]# service iptables restart

11. Zabbix frontend is available at http://IP-address/zabbix in the browser.

The default username/password is Admin/zabbix.

setup zabbix-7

Zabbix server setup completed. You can start to setup zabbix agent now.

How to Secure MySQL Server on CentOS 6.5 / CentOS 6.6

MySQL is the world’s most popular open source database and its the world’s second most widely used open-source relational database management system (RDBMS). MySQL default installation is not securely configured. For the sake of security, we need to run mysql_secure_installation wizard manually in order to perform basic MYSQL hardening on Virtual private server (VPS). The following steps has been tested on MySQL Community Server 5.5.39 that was running on CentOS 6.5 and CentOS 6.6.

1. Run mysql_secure_installation wizard :

[root@vps ]# mysql_secure_installation




NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...



All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

2. Set “bind-address” parameter within the “[mysqld]” section in /etc/my.conf. Configure this to your VPS local loopback network device, which is “127.0.0.1”. please make sure that you only perform this step if you confirm no other server will need to access the database on your VPS.

[root@vps ~]# vi /etc/my.cnf
[mysqld]
..
bind-address = 127.0.0.1
..

3. Restart your mysqld server :

[root@vps ~]# service mysqld restart

4. Verify the mysqld port listen to 127.0.0.1 only :

[root@vps ~]# netstat -plunt | grep 3306
tcp        0      0 127.0.0.1:3306              0.0.0.0:*                   LISTEN      8224/mysqld

How to Enable EPEL and Remi Repository into CentOS 6

EPEL stand for Extra Packages for Enterprise Linux. EPEL repository is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Enterprise Linux(OEL). Remi repository is a yum repository maintained by a French dude – Remi Collet. This post describe the basic steps to prepare and install the additional CentOS packages with EPEL and Remi Repository into CentOS 6.

EPEL Repository

rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Remi Repository

rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Example :

[root@centos6 ~]# rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
[root@centos6 ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]
[root@centos6 ~]# rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
[root@centos6 ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Retrieving http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Preparing...                ########################################### [100%]
   1:remi-release           ########################################### [100%]

Example of EPEl and Remi repo usage :

[root@centos6 ~]# yum --enablerepo=epel install httpd -y
[root@centos6 ~]# yum --enablerepo=remi install httpd -y

How to Install Sendmail Service on CentOS 6.5

This post will show how to install sendmail smtp service on CentOS 6.5. By default only postfix smtp service included in CentOS 6.5. Due to some reasons you will to run sendmail service instead of postfix. But the purpose of both services still the same providing SMTP email transport service and running as an email relay on your linux system.

1. Install sendmail :

[root@centos6.5 ~]# yum install sendmail -y
..
..
..
..
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package sendmail.x86_64 0:8.14.4-8.el6 will be installed
--> Processing Dependency: procmail for package: sendmail-8.14.4-8.el6.x86_64
--> Processing Dependency: libhesiod.so.0()(64bit) for package: sendmail-8.14.4-8.el6.x86_64
--> Running transaction check
---> Package hesiod.x86_64 0:3.1.0-19.el6 will be installed
---> Package procmail.x86_64 0:3.22-25.1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch                 Version                       Repository          Size
====================================================================================================
Installing:
 sendmail               x86_64               8.14.4-8.el6                  base               717 k
Installing for dependencies:
 hesiod                 x86_64               3.1.0-19.el6                  base                20 k
 procmail               x86_64               3.22-25.1.el6                 base               163 k

Transaction Summary
====================================================================================================
Install       3 Package(s)

Total download size: 900 k
Installed size: 1.9 M
Downloading Packages:
(1/3): hesiod-3.1.0-19.el6.x86_64.rpm                                        |  20 kB     00:00
(2/3): procmail-3.22-25.1.el6.x86_64.rpm                                     | 163 kB     00:00
(3/3): sendmail-8.14.4-8.el6.x86_64.rpm                                      | 717 kB     00:06
----------------------------------------------------------------------------------------------------
Total                                                               117 kB/s | 900 kB     00:07
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : procmail-3.22-25.1.el6.x86_64                                                    1/3
  Installing : hesiod-3.1.0-19.el6.x86_64                                                       2/3
  Installing : sendmail-8.14.4-8.el6.x86_64                                                     3/3
  Verifying  : hesiod-3.1.0-19.el6.x86_64                                                       1/3
  Verifying  : procmail-3.22-25.1.el6.x86_64                                                    2/3
  Verifying  : sendmail-8.14.4-8.el6.x86_64                                                     3/3

Installed:
  sendmail.x86_64 0:8.14.4-8.el6

Dependency Installed:
  hesiod.x86_64 0:3.1.0-19.el6                    procmail.x86_64 0:3.22-25.1.el6

Complete!

2. Start Sendmail service :

[root@centos6.5 ~]# service sendmail start
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]

3. Test sendmail respond on port 25 :

[root@centos6.5 ~]# telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 centos6.5.ehowstuff.local ESMTP Sendmail 8.14.4/8.14.4; Sun, 10 Aug 2014 20:48:52 +0800

How to Install Lighttpd With PHP5 (PHP-FPM) and MySQL on CentOS 6.5

Lighttpd (pronounced “lighty”) is an open-source web server as an alternative to Apache and Nginx. It is a secure, flexible, fast and designed for speed-critical environments. It has a low memory footprint and can handle large number of connections in one server especially for busier sites.

PHP is an acronym for “PHP Hypertext Preprocessor”; PHP is a widely-used server-side scripting language executed on the server.

PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.

MySQL is a popular database solution for use in web applications.

This post will show you how to install Lighttpd With PHP5 (PHP-FPM) and MySQL on CentOS 6.5 VPS or dedicated server.

1. EPEL repository is another extra repository that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL) and CentOS server. How to Configure EPEL Repository on CentOS.

2. Install Lighttpd, MySQL and PHP5 work in Lighttpd through PHP-FPM :

[root@centos6-05 ~]# yum install lighttpd php php-fpm lighttpd-fastcgi php-mysql mysql mysql-server -y

3. Configure Lighttpd :

[root@centos6-05 ~]# vi /etc/lighttpd/lighttpd.conf
server.use-ipv6 = "enable"

Change to :

server.use-ipv6 = "disable"

4. Make lighttpd start at boot and also start lighttpd service:

[root@centos6-05 ~]# chkconfig --levels 235 lighttpd on
[root@centos6-05 ~]# /etc/init.d/lighttpd start

Browse your web server and Lighttpd welcome page should be displayed :
lighttpd-centos6.5-1

5. Configure PHP to work in Lighttpd through PHP-FPM :

[root@centos6-05 ~]# vi /etc/php-fpm.d/www.conf

Enable PHP-FPM use a TCP connection instead of unix socket :

;   '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = 127.0.0.1:9000

Configure user and group to lighttpd :

..
..
; RPM: apache Choosed to be able to access some dir as httpd
user = lighttpd
; RPM: Keep a group allowed to write in log dir.
group = lighttpd
..
..

6. Make php-fpm start at boot and also start the php-fpm service :

[root@centos6-05 ~]# chkconfig --levels 235 php-fpm on
[root@centos6-05 ~]# /etc/init.d/php-fpm start

7. Open and modify /etc/php.ini :

[root@centos6-05 ~]# vi /etc/php.ini

Uncomment the line cgi.fix_pathinfo=1

..
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting
; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; http://www.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
cgi.fix_pathinfo=1
..

8. Open and modify /etc/lighttpd/modules.conf :

[root@centos6-05 ~]# vi /etc/lighttpd/modules.conf

Uncomment the line include “conf.d/fastcgi.conf”:

..
## FastCGI (mod_fastcgi)
##
include "conf.d/fastcgi.conf"
..

9. Open and modify /etc/lighttpd/conf.d/fastcgi.conf :

Add below fastcgi.server at bottom of the file :

..
fastcgi.server += ( ".php" =>
        ((
                "host" => "127.0.0.1",
                "port" => "9000",
                "broken-scriptfilename" => "enable"
        ))
)
..

10. Reload the PHP-FPM and Lighttpd service :

[root@centos6-05 ~]# /etc/init.d/php-fpm reload
[root@centos6-05 ~]# /etc/init.d/lighttpd reload

11. Since MySQl has been install, dont forget to make MySQL start at boot and start the MySQL service :

[root@centos6-05 ~]# chkconfig --levels 235 mysqld on
[root@centos6-05 ~]# /etc/init.d/mysqld start

12. Create info.php under ligghttpd document root :

[root@centos6-05 ~]# vi /var/www/lighttpd/info.php
<?php
phpinfo();
?>

Browse your page http://IP-Adress/info.php. Thats all.

How to Upgrade Zimbra Collaboration Suite 8.0.6 to 8.0.7 on CentOS 6.5 x86_64

Zimbra Collaboration Suite (ZCS) is one of the popular open source email solution. Zimbra has released new version of ZCS 8.0.7. This new version consist of many new features and enhancements. I would suggest you to review the known issues that had been fixed before perform zimbra version upgrade. This post assumed that full backup has been performed successfully before upgrade.

Enhancements in 8.0.7
-When a delegated user deletes a folder, a warning is given that this action will also delete the owner’s copy.
-zmsoap supports JSON format from a file.
-Integrated latest version of the touch client.
-Log generated with EntryID for items that fail while fetching MAPI properties

1. Install addional package :

[root@mail ~]# yum install libaio -y

2. Verify current zimbra version :

[zimbra@mail ~]$ zmcontrol -v
Release 8.0.6_GA_5922.RHEL6_64_20131203103705 RHEL6_64 FOSS edition.

3. Download ZCS 8.0.7 :

[root@mail ~]# wget http://files2.zimbra.com/downloads/8.0.7_GA/zcs-8.0.7_GA_6021.RHEL6_64.20140408123911.tgz\

4. Extract the zcs tgz file and enter extracted folder :

[root@mail ~]# tar xzvf zcs-8.0.7_GA_6021.RHEL6_64.20140408123911.tgz
[root@mail ~]# cd zcs-8.0.7_GA_6021.RHEL6_64.20140408123911

5. Proceed to update the zimbra. The steps and command almost similar with the installation :

[root@mail zcs-8.0.7_GA_6021.RHEL6_64.20140408123911]# ./install.sh --platform-override

Full Installation screenshot :

[root@mail zcs-8.0.7_GA_6021.RHEL6_64.20140408123911]# ./install.sh --platform-override

Operations logged to /tmp/install.log.15721
Checking for existing installation...
    zimbra-ldap...FOUND zimbra-ldap-8.0.6_GA_5922
    zimbra-logger...FOUND zimbra-logger-8.0.6_GA_5922
    zimbra-mta...FOUND zimbra-mta-8.0.6_GA_5922
    zimbra-snmp...FOUND zimbra-snmp-8.0.6_GA_5922
    zimbra-store...FOUND zimbra-store-8.0.6_GA_5922
    zimbra-apache...FOUND zimbra-apache-8.0.6_GA_5922
    zimbra-spell...FOUND zimbra-spell-8.0.6_GA_5922
    zimbra-convertd...NOT FOUND
    zimbra-memcached...FOUND zimbra-memcached-8.0.6_GA_5922
    zimbra-proxy...FOUND zimbra-proxy-8.0.6_GA_5922
    zimbra-archiving...NOT FOUND
    zimbra-cluster...NOT FOUND
    zimbra-core...FOUND zimbra-core-8.0.6_GA_5922
ZCS upgrade from 8.0.6 to 8.0.7 will be performed.

Saving existing configuration file to /opt/zimbra/.saveconfig


PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
ZIMBRA, INC. ("ZIMBRA") WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.

License Terms for the Zimbra Collaboration Suite:
  http://www.zimbra.com/license/zimbra_public_eula_2.4.html



Do you agree with the terms of the software license agreement? [N] y




Oracle Binary Code License Agreement for the Java SE Platform Products

ORACLE  AMERICA, INC. ("ORACLE"), FOR AND ON BEHALF OF ITSELF AND ITS SUBSIDIARIES AND AFFILIATES UNDER COMMON CONTROL, IS WILLING TO  LICENSE  THE SOFTWARE  TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS  CONTAINED IN THIS BINARY CODE LICENSE AGREEMENT AND SUPPLEMENTAL  LICENSE TERMS (COLLECTIVELY "AGREEMENT").  PLEASE READ THE AGREEMENT  CAREFULLY.  BY SELECTING THE "ACCEPT LICENSE AGREEMENT" (OR THE EQUIVALENT) BUTTON AND/OR BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT YOU HAVE READ THE TERMS AND AGREE TO THEM.  IF YOU ARE AGREEING TO THESE TERMS ON BEHALF OF A  COMPANY OR OTHER LEGAL ENTITY, YOU REPRESENT THAT YOU HAVE THE LEGAL  AUTHORITY TO BIND THE LEGAL ENTITY TO THESE TERMS.  IF YOU DO NOT HAVE SUCH  AUTHORITY, OR IF YOU DO NOT WISH TO BE BOUND BY THE TERMS, THEN SELECT THE "DECLINE LICENSE AGREEMENT" (OR THE EQUIVALENT) BUTTON AND YOU MUST NOT USE THE SOFTWARE ON THIS SITE OR ANY OTHER MEDIA ON WHICH THE SOFTWARE IS CONTAINED.

1.  DEFINITIONS.  "Software" means the Java SE Platform Products in binary form that you selected for download, install or use from Oracle or its authorized licensees, any other machine readable materials (including, but not limited to,  libraries,  source  files,  header  files, and data  files), any updates or error corrections provided by Oracle, and any user manuals, programming guides and other documentation provided to you by Oracle under this Agreement.  "General Purpose Desktop Computers and Servers" means computers,  including desktop and laptop computers, or servers, used for general  computing functions under end user control (such as but not specifically  limited to email, general purpose Internet browsing, and office suite  productivity tools).  The use of Software in systems and solutions that provide dedicated functionality (other than as mentioned above) or designed  for use in embedded or function-specific software applications, for example but not limited to: Software embedded in or bundled with industrial control systems, wireless mobile telephones, wireless handheld devices, netbooks, kiosks, TV/STB, Blu-ray Disc devices, telematics and network control switching equipment, printers and storage management systems, and other related systems are excluded from this definition and not licensed under this  Agreement.  "Programs" means Java technology applets and applications  intended to run on the Java Platform, Standard Edition platform on Java-enabled General Purpose Desktop Computers and Servers.  ?Commercial Features? means those features identified in Table 1-1 (Commercial Features In Java SE Product Editions) of the Software documentation accessible at  http://www.oracle.com/technetwork/java/javase/documentation/index.html.  ?README File? means the README file for the Software accessible at http://www.oracle.com/technetwork/java/javase/terms/readme/index.html.

2.  LICENSE TO USE.  Subject to the terms and conditions of this Agreement   including, but not limited to, the Java Technology Restrictions of the  Supplemental License Terms, Oracle grants you a non-exclusive, non-transferable, limited license without license fees to reproduce and use internally the Software complete and unmodified for the sole purpose of  running Programs.  THE LICENSE SET FORTH IN THIS SECTION 2 DOES NOT EXTEND TO THE COMMERCIAL FEATURES.  YOUR RIGHTS AND OBLIGATIONS RELATED TO THE COMMERCIAL FEATURES ARE AS SET FORTH IN THE SUPPLEMENTAL TERMS ALONG WITH ADDITIONAL LICENSES FOR DEVELOPERS AND PUBLISHERS.

3.  RESTRICTIONS.  Software is copyrighted.  Title to Software and all associated intellectual property rights is retained by Oracle and/or its licensors.  Unless enforcement is prohibited by applicable law, you may not modify, decompile, or reverse engineer Software.  You acknowledge that the Software is developed for general use in a variety of information management applications; it is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use the Software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use.  Oracle disclaims any express or implied warranty of fitness for such uses.  No right, title or interest in or to any trademark,  service mark, logo or trade name of Oracle or its licensors is granted under this  Agreement.  Additional restrictions for developers and/or publishers licenses are set forth in the Supplemental License Terms.

4.  DISCLAIMER OF WARRANTY.  THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.  ORACLE FURTHER DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.

5.  LIMITATION OF LIABILITY.  IN NO EVENT SHALL ORACLE BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN IF ORACLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ORACLE'S ENTIRE LIABILITY FOR DAMAGES HEREUNDER SHALL IN NO EVENT EXCEED ONE THOUSAND DOLLARS (U.S. $1,000).

6.  TERMINATION.  This Agreement is effective until terminated.  You may terminate this Agreement at any time by destroying all copies of Software.  This Agreement will terminate immediately without notice from Oracle if you  fail to comply with any provision of this Agreement.  Either party may  terminate this Agreement immediately should any Software become, or in either party's opinion be likely to become, the subject of a claim of infringement  of any intellectual property  right.  Upon termination, you must destroy all copies of Software.

7.  EXPORT  REGULATIONS.  You agree that U.S. export control laws and other applicable export and import laws govern your use of the Software, including technical data; additional information can be found on Oracle's Global Trade Compliance web site (http://www.oracle.com/products/export). You agree that neither the Software nor any direct product thereof will be exported, directly, or indirectly, in violation of these laws, or will be used for any purpose prohibited by these laws including, without limitation, nuclear, chemical, or biological weapons proliferation.

8.  TRADEMARKS AND LOGOS.  You acknowledge and agree as between you
and Oracle that Oracle owns the ORACLE and JAVA trademarks and all ORACLE- and JAVA-related trademarks, service marks, logos and other brand
designations ("Oracle Marks"), and you agree to comply with the Third
Party Usage Guidelines for Oracle Trademarks currently located at
http://www.oracle.com/us/legal/third-party-trademarks/index.html.  Any use you make of the Oracle Marks inures to Oracle's benefit.

9.  U.S.  GOVERNMENT LICENSE RIGHTS.  If Software is being acquired by or on  behalf of the U.S. Government or by a U.S. Government prime contractor or  subcontractor (at any tier), then the Government's rights in Software and accompanying documentation shall be only those set forth in this Agreement.

10.  GOVERNING  LAW.  This agreement is governed by the substantive and procedural laws of California. You and Oracle agree to submit to the exclusive jurisdiction of, and venue in, the courts of San Francisco, or Santa Clara counties in California in any dispute arising out of or relating to this agreement.

11.  SEVERABILITY.  If any  provision of this  Agreement is held to be unenforceable, this Agreement will remain in effect with the provision omitted, unless omission would frustrate the intent of the parties, in which case this Agreement will immediately terminate.

12.  INTEGRATION.  This Agreement is the entire agreement  between you and Oracle relating to its subject matter.  It supersedes all prior or contemporaneous oral or written communications, proposals, representations  and warranties and prevails over any  conflicting  or additional  terms  of  any  quote, order, acknowledgment, or other communication between the parties  relating to its subject matter during the term of this Agreement.  No modification of this Agreement will be  binding,  unless  in  writing  and  signed  by an  authorized representative of each party.

SUPPLEMENTAL LICENSE TERMS

These  Supplemental  License  Terms add to or modify  the terms of the Binary Code License Agreement.  Capitalized terms not defined in these Supplemental  Terms shall have the same meanings ascribed to them in the Binary Code License Agreement.  These Supplemental Terms shall supersede any  inconsistent or conflicting terms in the Binary Code License Agreement, or in any license contained within the Software.

A.  COMMERCIAL FEATURES.  You may not use the Commercial Features for running Programs, Java applets or applications in your internal business operations or for any commercial or production  purpose, or for any purpose other than as set forth in Sections B, C, D and E of these Supplemental Terms.  If You want to use the Commercial Features for any purpose other than as permitted in this Agreement, You must obtain a separate license from Oracle.

B.  SOFTWARE INTERNAL USE FOR DEVELOPMENT LICENSE GRANT.  Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the README File incorporated herein by reference,  including, but not limited to the Java Technology Restrictions of these  Supplemental Terms, Oracle grants you a non-exclusive, non-transferable,  limited license without fees to reproduce internally and use internally the Software complete and unmodified for the purpose of designing, developing, and testing your Programs.

C.  LICENSE TO DISTRIBUTE SOFTWARE.  Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the   README File, including, but not limited to the Java Technology Restrictions of these Supplemental Terms, Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute the  Software, provided that (i) you distribute the Software complete and  unmodified and only bundled as part of, and for the sole purpose of running, your Programs, (ii) the Programs add significant and primary functionality  to the Software, (iii) you do not distribute additional  software intended to replace any component(s) of the Software, (iv) you do not remove or alter any proprietary legends or notices contained in the Software, (v) you only distribute the Software subject to a license agreement that: (a) is a complete, unmodified reproduction of this Agreement; or (b) protects Oracle's  interests consistent with the terms contained in this Agreement and that includes the notice set forth in Section G, and (vi) you agree to defend and indemnify Oracle and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including  attorneys' fees)  incurred in connection  with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Software.

D.  LICENSE TO DISTRIBUTE REDISTRIBUTABLES.  Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the README  File, including but not limited to the Java Technology Restrictions of these Supplemental Terms, Oracle grants you a non-exclusive,  non-transferable, limited license without fees to reproduce and distribute  those files specifically identified as redistributable in the   README File ("Redistributables") provided that: (i) you distribute the  Redistributables complete and unmodified, and only bundled as part of Programs, (ii) the Programs add significant and primary functionality to the  Redistributables, (iii) you do not distribute additional software intended to supersede any component(s) of the Redistributables (unless otherwise specified in the applicable README File), (iv) you do not remove or alter any proprietary legends or notices contained in or on the Redistributables, (v)  you only distribute the Redistributables pursuant to a license agreement  that: (a) is a complete, unmodified reproduction of this Agreement; or (b) protects Oracle's interests consistent with the terms contained in the Agreement and includes the notice set forth in Section G, (vi) you agree to defend and indemnify Oracle and its licensors from and against any damages,  costs, liabilities, settlement amounts and/or expenses (including  attorneys'  fees) incurred in connection with any claim, lawsuit or action by any third  party that arises or results from the use or distribution of any and all Programs and/or Software.

E.  DISTRIBUTION BY PUBLISHERS.  This section pertains to your distribution  of the JavaTM SE Development Kit Software with your printed book or magazine (as those terms are commonly used in the industry) relating to Java technology ("Publication").  Subject to and conditioned upon your compliance  with the restrictions and obligations contained in the Agreement, Oracle hereby grants to you a non-exclusive, nontransferable limited right to reproduce complete and unmodified copies of the Software on electronic  media (the "Media") for the sole purpose of inclusion and distribution with your Publication(s), subject to the following terms: (i) You may not distribute  the Software on a stand-alone basis; it must be distributed with your Publication(s); (ii) You are responsible for downloading the Software from the applicable Oracle web site; (iii) You must refer to the Software as JavaTM SE Development Kit; (iv) The Software must be reproduced in its entirety and without any modification whatsoever (including with respect to all proprietary notices) and distributed with your Publication subject to a license agreement that is a complete, unmodified reproduction of this Agreement; (v) The Media label shall include the following information:  Copyright 2011, Oracle America, Inc.  All rights reserved.  Use is subject to license terms.  ORACLE and JAVA trademarks and all ORACLE- and JAVA-related trademarks, service marks, logos and other brand
designations are trademarks or registered  trademarks of Oracle in the U.S. and other countries.  This information must be placed on the Media  label in such a manner as to only apply to the Oracle  Software;  (vi) You must clearly identify the Software as Oracle's product on the Media  holder or Media label, and you may not state or imply that Oracle is responsible for any third-party software contained on the Media; (vii) You may not include any third  party software on the Media which is intended to be a  replacement or substitute for the Software; (viii) You agree to defend and indemnify Oracle and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including  attorneys'  fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of the Software and/or the Publication; ; and (ix) You shall provide Oracle with a written notice for each Publication; such notice shall include the following information: (1) title of Publication, (2) author(s), (3) date of Publication,  and (4)  ISBN or ISSN  numbers.  Such notice shall be sent to  Oracle America, Inc.,  500 Oracle  Parkway, Redwood Shores,  California  94065 U.S.A , Attention:  General Counsel.

F.  JAVA TECHNOLOGY RESTRICTIONS.  You may not create, modify, or change the behavior of, or authorize your licensees to create, modify, or change the behavior of, classes, interfaces, or subpackages that are in any way  identified  as  "java", "javax", "sun", ?oracle? or similar convention as   specified by Oracle in any naming convention designation.

G.  COMMERCIAL FEATURES NOTICE.  For purpose of complying with Supplemental Term Section  C.(v)(b) and D.(v)(b), your license agreement shall include the following notice, where the notice is displayed in a manner that anyone using the Software will see the notice:

Use of the Commercial Features for any commercial or production purpose requires a separate license from Oracle.  ?Commercial Features? means those features identified Table 1-1 (Commercial Features In Java SE Product Editions) of the Software documentation accessible at http://www.oracle.com/technetwork/java/javase/documentation/index.html

H.  SOURCE CODE.  Software may contain source code that, unless expressly   licensed for other purposes, is provided solely for reference purposes  pursuant to the terms of this Agreement.  Source code may not be redistributed  unless  expressly  provided for in this Agreement.

I.  THIRD PARTY CODE.  Additional copyright notices and license terms applicable to portions of the Software are set forth in the THIRDPARTYLICENSEREADME file accessible at http://www.oracle.com/technetwork/java/javase/documentation/index.html.  In addition to any terms and conditions of any third party opensource/freeware license identified in the  THIRDPARTYLICENSEREADME file, the disclaimer of warranty and limitation of liability  provisions in  paragraphs 4 and 5 of the Binary Code License Agreement shall apply to all Software in this distribution.

J.  TERMINATION FOR INFRINGEMENT.  Either party may terminate this Agreement immediately should any Software become, or in either party's opinion be likely to become, the subject of a claim of infringement of any intellectual property right.

K.  INSTALLATION AND AUTO-UPDATE.  The Software's installation and auto-update processes transmit a limited amount of data to Oracle (or its service  provider) about those specific processes to help Oracle understand and optimize them.  Oracle does not associate the data with personally  identifiable  information.  You can find more  information about the data Oracle collects as a result of your Software download at http://www.oracle.com/technetwork/java/javase/documentation/index.html.

For inquiries please contact:  Oracle America, Inc., 500 Oracle Parkway,
Redwood Shores, California 94065, USA.

Last updated May 17, 2011




Do you agree with the terms of the software license agreement? [N] y

Checking for prerequisites...
     FOUND: NPTL
     FOUND: nc-1.84-22
     FOUND: sudo-1.8.6p3-12
     FOUND: libidn-1.18-2
     FOUND: gmp-4.3.1-7
     FOUND: libaio-0.3.107-10
     FOUND: /usr/lib64/libstdc++.so.6

Checking for suggested prerequisites...
     FOUND: perl-5.10.1
     FOUND: sysstat
     FOUND: sqlite
Prerequisite check complete.
Checking current number of databases...

Do you want to verify message store database integrity? [Y] y
Verifying integrity of message store databases.  This may take a while.
mysqld is alive
No errors found

Checking for installable packages

Found zimbra-core
Found zimbra-ldap
Found zimbra-logger
Found zimbra-mta
Found zimbra-snmp
Found zimbra-store
Found zimbra-apache
Found zimbra-spell
Found zimbra-memcached
Found zimbra-proxy


The Zimbra Collaboration Server appears already to be installed.
It can be upgraded with no effect on existing accounts,
or the current installation can be completely removed prior
to installation for a clean install.

Do you wish to upgrade? [Y]

Select the packages to install
    Upgrading zimbra-core
    Upgrading zimbra-ldap
    Upgrading zimbra-logger
    Upgrading zimbra-mta
    Upgrading zimbra-snmp
    Upgrading zimbra-store
    Upgrading zimbra-apache
    Upgrading zimbra-spell
    Upgrading zimbra-memcached
    Upgrading zimbra-proxy
Checking required space for zimbra-core
Checking space for zimbra-store

Installing:
    zimbra-core
    zimbra-ldap
    zimbra-logger
    zimbra-mta
    zimbra-snmp
    zimbra-store
    zimbra-apache
    zimbra-spell
    zimbra-memcached
    zimbra-proxy

The system will be modified.  Continue? [N] y

Shutting down zimbra mail

Backing up the ldap database...done.

Removing existing packages

   zimbra-ldap...done
   zimbra-logger...done
   zimbra-mta...done
   zimbra-snmp...done
   zimbra-store...done
   zimbra-spell...done
   zimbra-memcached...done
   zimbra-proxy...done
   zimbra-apache...done
   zimbra-core...done

Removing deployed webapp directories
Installing packages

    zimbra-core......zimbra-core-8.0.7_GA_6021.RHEL6_64-20140408123911.x86_64.rpm...done
    zimbra-ldap......zimbra-ldap-8.0.7_GA_6021.RHEL6_64-20140408123911.x86_64.rpm...done
    zimbra-logger......zimbra-logger-8.0.7_GA_6021.RHEL6_64-20140408123911.x86_64.rpm...done
    zimbra-mta......zimbra-mta-8.0.7_GA_6021.RHEL6_64-20140408123911.x86_64.rpm...done
    zimbra-snmp......zimbra-snmp-8.0.7_GA_6021.RHEL6_64-20140408123911.x86_64.rpm...done
    zimbra-store......zimbra-store-8.0.7_GA_6021.RHEL6_64-20140408123911.x86_64.rpm...done
    zimbra-apache......zimbra-apache-8.0.7_GA_6021.RHEL6_64-20140408123911.x86_64.rpm...done
    zimbra-spell......zimbra-spell-8.0.7_GA_6021.RHEL6_64-20140408123911.x86_64.rpm...done
    zimbra-memcached......zimbra-memcached-8.0.7_GA_6021.RHEL6_64-20140408123911.x86_64.rpm...done
    zimbra-proxy......zimbra-proxy-8.0.7_GA_6021.RHEL6_64-20140408123911.x86_64.rpm...done

Setting defaults from saved config in /opt/zimbra/.saveconfig/config.save
   HOSTNAME=centos65.ehowstuff.local
   LDAPHOST=centos65.ehowstuff.local
   LDAPPORT=389
   SNMPTRAPHOST=centos65.ehowstuff.local
   SMTPSOURCE=admin@ehowstuff.local
   SMTPDEST=admin@ehowstuff.local
   SNMPNOTIFY=yes
   SMTPNOTIFY=yes
   LDAPROOTPW=35WrLoqhzZ
   LDAPZIMBRAPW=35WrLoqhzZ
   LDAPPOSTPW=35WrLoqhzZ
   LDAPREPPW=35WrLoqhzZ
   LDAPAMAVISPW=35WrLoqhzZ
   LDAPNGINXPW=35WrLoqhzZ
Restoring existing configuration file from /opt/zimbra/.saveconfig/localconfig.xml...done
Operations logged to /tmp/zmsetup.06122014-000552.log
Upgrading from 8.0.6_GA_5922 to 8.0.7_GA_6021
Stopping zimbra services...done.
Starting mysql...done.
This appears to be 8.0.6_GA
Checking ldap status...not running.
Running zmldapapplyldif...done.
Checking ldap status...not running.
Starting ldap...done.
Stopping mysql...done.
Updating from 8.0.7_GA
Updating global config and COS's with attributes introduced after 8.0.6_GA...done.
Stopping ldap...done.
Upgrade complete.

Running zmldapapplyldif...done.
Checking ldap status....not running.
Starting ldap...done.
Setting defaults...done.
Setting defaults from existing config...done.
Checking for port conflicts
Setting defaults from ldap...done.
Saving config in /opt/zimbra/config.28549...done.
Operations logged to /tmp/zmsetup.06122014-000552.log
Setting local config values...done.
Initializing core config...Setting up CA...done.
Deploying CA to /opt/zimbra/conf/ca ...done.
Setting replication password...done.
Setting Postfix password...done.
Setting amavis password...done.
Setting nginx password...done.
Creating server entry for centos65.ehowstuff.local...already exists.
Setting Zimbra IP Mode...done.
Saving CA in ldap ...done.
Saving SSL Certificate in ldap ...done.
Setting spell check URL...done.
Setting service ports on centos65.ehowstuff.local...done.
Adding centos65.ehowstuff.local to zimbraMailHostPool in default COS...done.
Setting Keyboard Shortcut Preferences...done.
Setting zimbraFeatureTasksEnabled=TRUE...done.
Setting zimbraFeatureBriefcasesEnabled=FALSE...done.
Setting MTA auth host...done.
Setting TimeZone Preference...done.
Initializing mta config...done.
Setting services on centos65.ehowstuff.local...done.
Creating user spam.wc5ohhoylp@ehowstuff.local...already exists.
Creating user ham.ypxiyleoyj@ehowstuff.local...already exists.
Creating user virus-quarantine.kl6ejsnmd@ehowstuff.local...already exists.
Setting spam training and Anti-virus quarantine accounts...done.
Configuring SNMP...done.
Setting up syslog.conf...done.
Starting servers...done.
Checking for deprecated zimlets...done.
Checking for network zimlets in LDAP...done.
Removing network zimlets...
Finished removing network zimlets.
Installing common zimlets...
        com_zimbra_webex...done.
        com_zimbra_date...done.
        com_zimbra_adminversioncheck...done.
        com_zimbra_cert_manager...done.
        com_zimbra_tooltip...done.
        com_zimbra_proxy_config...done.
        com_zimbra_attachcontacts...done.
        com_zimbra_viewmail...done.
        com_zimbra_bulkprovision...done.
        com_zimbra_clientuploader...done.
        com_zimbra_phone...done.
        com_zimbra_attachmail...done.
        com_zimbra_ymemoticons...done.
        com_zimbra_srchhighlighter...done.
        com_zimbra_url...done.
        com_zimbra_email...done.
Finished installing common zimlets.
Getting list of all zimlets...done.
Updating non-standard zimlets...
Finished updating non-standard zimlets.
Restarting mailboxd...done.
Skipping creation of default domain GAL sync account - existing install detected.

You have the option of notifying Zimbra of your installation.
This helps us to track the uptake of the Zimbra Collaboration Server.
The only information that will be transmitted is:
        The VERSION of zcs installed (8.0.7_GA_6021_RHEL6_64)
        The ADMIN EMAIL ADDRESS created (admin@ehowstuff.local)

Notify Zimbra of your installation? [Yes] no
Notification skipped
Setting up zimbra crontab...done.


Moving /tmp/zmsetup.06122014-000552.log to /opt/zimbra/log


Configuration complete - press return to exit

6. Check Zimbra Version :

[zimbra@mail ~]$ zmcontrol -v
Release 8.0.7_GA_6021.RHEL6_64_20140408123911 RHEL6_64 FOSS edition.

7. As per Release Notes for ZCS 8.0.7, please run zmldapupgrade -b 66387 after upgrading. Beginning with 8.0, zimbraAllowFromAddress attribute cannot be set for internal accounts or distribution lists. Running this script will change zimbraAllowFromAddress values to grants.

[zimbra@mail ~]$ zmldapupgrade -b 66387


--------------
com.zimbra.cs.account.ldap.upgrade.LdapUpgrade -b 66387
--------------
Number of accounts using zimbraAllowFromAddress: 0
Number of accounts migrated: 0
Migration completed


--------------
done 66387

8. Verify zimbra status :

[zimbra@mail ~]$ zmcontrol status
Host centos65.ehowstuff.local
        antispam                Running
        antivirus               Running
        ldap                    Running
        logger                  Running
        mailbox                 Running
        memcached               Running
        mta                     Running
        opendkim                Running
        proxy                   Running
        snmp                    Running
        spell                   Running
        stats                   Running
        zmconfigd               Running

Done!!