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 WordPress on CentOS 6.4

wordpressWordPress is free web blogging software and open source content management system (CMS) which based on PHP and MySQL platform. You can run and install WorPress on shared Web hosting service, on virtual private server (VPS) or if you need high performance WordPress blog which can serve many concurrent users at a time, you can choose dedicated server for it. This post covers the steps how to install WordPress on linux CentOS 6.4. It was assumed that this CentOS 6.4 already installed with PHP, apache and MySQL server.

1. Login as a root, download latest wordpress file :

[root@centos64 ~]# wget http://wordpress.org/latest.tar.gz

2. Once downloaded, move yje wordpress file to document root on your web server.

[root@centos64 ~]# mv latest.tar.gz /var/www/html/

3. Enter document’s root directory and extract the wordpress file :

[root@centos64 ~]# cd /var/www/html/
[root@centos64 html]# tar xvzf latest.tar.gz

4. Make wordpress folder readable :

[root@centos64 ~]# chmod 755 /var/www/html/wordpress

5. Create Database name “newwordpress” :

mysql> CREATE DATABASE newwordpress;
Query OK, 1 row affected (0.08 sec)

6. Create user “newwordpressuser” with password “newwordpresspassword” :

mysql> CREATE USER 'newwordpressuser'@'localhost' IDENTIFIED BY 'newwordpresspassword';
Query OK, 0 rows affected (0.07 sec)

7. Grant all privileges to “newwordpress” to user “newwordpressuser” from localhost access :

mysql> GRANT ALL PRIVILEGES ON newwordpress.* to newwordpressuser@localhost;
Query OK, 0 rows affected (0.00 sec)

8. Verify the granted access for user “newwordpressuser” :

mysql> SHOW GRANTS FOR 'newwordpressuser'@'localhost';
+-------------------------------------------------------------------------------------------------------------------------+
| Grants for newwordpressuser@localhost                                                                                   |
+-------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'newwordpressuser'@'localhost' IDENTIFIED BY PASSWORD '*2E824B82B9B162C4283AA039118AD4C5248380DA' |
| GRANT ALL PRIVILEGES ON `newwordpress`.* TO 'newwordpressuser'@'localhost'                                              |
+-------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql>

9. Display the created database :

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| newwordpress       |
+--------------------+
3 rows in set (0.00 sec)

10. Copy and rename wp-config-sample.php to wp-config.php:

[root@centos64 ~]# cp /var/www/html/wordpress/wp-config-sample.php /var/www/html/wordpress/wp-config.php

11. Modify the wp-config.php :

[root@centos64 ~]# vi /var/www/html/wordpress/wp-config.php

12. Change below database details such as database’ name, database’ username, database’ password nand database’ hostname.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'newwordpress');

/** MySQL database username */
define('DB_USER', 'newwordpressuser');

/** MySQL database password */
define('DB_PASSWORD', 'newwordpresspassword');

/** MySQL hostname */
define('DB_HOST', 'localhost');

13. To install, navigate the browser to http://servername/wordpress/.
http://192.168.2.64/wordpress/
1
14. To login, navigate the browser to http://servername/wordpress/wp-login.php :

How to Verify the LDAP or slapd Process in Zimbra

zimbraZimbra LDAP service running on OpenLDAP software. It is the directory service and identified when the Zimbra software is installed together with it’s own Zimbra schema. Zimbra LDAP service is used in Zimbra Collaboration Suite (ZCS) to store data for Zimbra Global configuration, user and authentication information, server, domain and class of service (COS) details. The following task will be very useful to zimbra system administrator in order to Verify the LDAP or slapd process in Zimbra. The command has been tested on ZCS 8.0.4 open-source version running on CentOS 6.4. I have documented these post as my own tutorial and also for my blog visitors reference.

1. How to verify ldap status in zimbra. Run as the zimbra user :

[zimbra@centos64 ~]$ ldap status
slapd running pid: 1351

2. How to verify that the slapd process is running or not :

ps auxww | grep zimbra | grep slapd

Example :

[zimbra@centos64 ~]$ ps auxww | grep zimbra | grep slapd
zimbra    1351  0.1  3.9 18840944 75268 ?      Ssl  16:44   0:08 /opt/zimbra/openldap/sbin/slapd -l LOCAL0 -u zimbra -h ldap://centos64.ehowstuff.local:389 ldapi:/// -F /opt/zimbra/data/ldap/config
zimbra   42865  0.0  0.0   6376   724 pts/0    S+   18:01   0:00 grep slapd

3. To detect connection failure on default ldap port, 389, run telnet command :

Result if run from zimbra server itself :

[zimbra@centos64 ~]$ telnet centos64.ehowstuff.local 389
Trying 192.168.2.62...
Connected to centos64.ehowstuff.local.
Escape character is '^]'.
^]
telnet> quit
Connection closed.

4. How to Stop and Start ldap in zimbra. Run as the zimbra user :
Start ldap :

[zimbra@centos64 ~]$ ldap stop
Killing slapd with pid 1351 done.

Stop ldap :

[zimbra@centos64 ~]$ ldap start
Started slapd: pid 47807

5. Verify ldap status from zmcontrol command :

[zimbra@centos64 ~]$ zmcontrol status
Host centos64.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

How to Manage Mailbox Folder using zmmailbox CLI in Zimbra

Zimbra zmmailbox command is used for mailbox management such as admin-related commands, account-related commands, appoint-related commands, folder-related commands, message-related commands, tag-related commands and etc. It is the powerful command utility for zimbra administrator to perform daily account management or to perform zimbra account related issues. This post will brief you on how you can manage, get, create, delete and Empty the Folder in zimbra mailbox using zmmailbox command line interface (CLI). All the command has been tested in Zimbra Collaboration Suite 8.0.4 installed on CentOS 6.4.

Using zmmailbox command, enter to user1@ehowstuff.local mailbox :

[zimbra@centos64 ~]$ zmmailbox -z -m user1@ehowstuff.local
mailbox: user1@ehowstuff.local, size: 280.60 KB, messages: 10, unread: 0
authenticated as user1@ehowstuff.local

1. How to get All Folders in user1@ehowstuff.local :
zmmailbox sub-command usage : getAllFolders or gaf

mbox user1@ehowstuff.local> gaf
        Id  View      Unread   Msg Count  Path
----------  ----  ----------  ----------  ----------
         1  unkn           0           0  /
        16  docu           0           0  /Briefcase
        10  appo           0           0  /Calendar
        14  mess           0           0  /Chats
         7  cont           0           0  /Contacts
         6  mess           0           0  /Drafts
        13  cont           0           3  /Emailed Contacts
         2  mess           0           3  /Inbox
         4  mess           0           0  /Junk
         5  mess           0           2  /Sent
        15  task           0           0  /Tasks
         3  unkn           0           0  /Trash

2. How to create Folder in user1@ehowstuff.local :
zmmailbox sub-command usage : createFolder or cf

mbox user1@ehowstuff.local> cf /Personal
260

Once you created Personal folder, please move some files into /Personal. Then run getAllFolders or gaf.

mbox user1@ehowstuff.local> gaf
        Id  View      Unread   Msg Count  Path
----------  ----  ----------  ----------  ----------
         1  unkn           0           0  /
        16  docu           0           0  /Briefcase
        10  appo           0           0  /Calendar
        14  mess           0           0  /Chats
         7  cont           0           0  /Contacts
         6  mess           0           0  /Drafts
        13  cont           0           3  /Emailed Contacts
         2  mess           0           3  /Inbox
         4  mess           0           0  /Junk
       294  unkn           0           2  /Personal
         5  mess           0           2  /Sent
        15  task           0           0  /Tasks
         3  unkn           0           0  /Trash

3. How to Empty Folder in user1@ehowstuff.local :
zmmailbox sub-command usage : emptyFolder or ef

mbox user1@ehowstuff.local> ef /Personal

Once folder /Personal has been empty, rerun etAllFolders or gaf again to verify.

mbox user1@ehowstuff.local> gaf
        Id  View      Unread   Msg Count  Path
----------  ----  ----------  ----------  ----------
         1  unkn           0           0  /
        16  docu           0           0  /Briefcase
        10  appo           0           0  /Calendar
        14  mess           0           0  /Chats
         7  cont           0           0  /Contacts
         6  mess           0           0  /Drafts
        13  cont           0           3  /Emailed Contacts
         2  mess           0           3  /Inbox
         4  mess           0           0  /Junk
       294  unkn           0           0  /Personal
         5  mess           0           2  /Sent
        15  task           0           0  /Tasks
         3  unkn           0           0  /Trash

4. How to Delete Folder in user1@ehowstuff.local :
zmmailbox sub-command usage : deleteFolder or df

mbox user1@ehowstuff.local> df /Personal

How to Upgrade Zimbra Collaboration Suite 8.0.3 to 8.0.4 on CentOS 6.4 x86_64

zimbraZimbra Collaboration Suite (ZCS) is one of the popular open source email. It was created by Zimbra, Inc. Zimbra has released new version of ZCS 8.0.4. This new version consist of many new features and enhancements. This post describes the steps to upgrade existing ZCS 8.0.3 to ZCS 8.0.4 on CentOS 6.4 64 bit. I would recommend to to review the known issues that had been fixed before installing or upgrading.

Major Issues Fixed for 8.0.4

-Private events within shared calendars no longer show the organizer’s name.
-Fixed the issue which caused stat-charts to not display properly.
-When running zmproxypurge, all aliases are purged.
-Support for Real-time Blackhole List (RBL) blocking using zimbraMtaRestrictionRBLs and attributes reject_rhsbl_client, reject_rhsbl_reverse_client, and reject_rhsbl_sender.
-Fixed the issue which caused an error when using spell check if language preference is set to Japanese.
-Fixed the issue which caused an error in Javac compilation for Java Server Pages (JSP).
-Removed insecure SSL ciphers from default proxy configuration. Existing sites are recommended to review their enabled ciphers and set zimbraReverseProxySSLCiphers to RC4:HIGH:!aNULL:!MD5:!kEDH:!AD:!SSLv2 for maximum security. Note that some clients might need to be reconfigured if they were previously using a cipher which is now disabled.
-Fixed the issue which caused a Language field to display as blank when selecting login options and only one language is available. The option now displays as text and not as a dropdown menu.
-zmblobchk no longer reports missing blobs for appointments with multiple revisions. Changes work even if multiple revisions point to the same file blob.
-Fixed the issue which caused autodiscovery to fail on iOS devices, due to iOS sending the request to /Autodiscover/ Autodiscover.xml rather than /autodiscover/ autodiscover.xml.
-The administration console now has the option to automatically log users out when their Zimbra Web Client tab/window/browser is closed. This forces the user to log in to their next session.
-New attribute zimbraMtaFallbackRelayHost is located in the administration console at Configure > Global Settings > MTA > Network and is shown as Relay MTA for external delivery.
-The Distribution Lists folder is displayed in the list of address book folders only if the attribute is set to true. The default is True, but customers such as service providers might select to set this to False to turn this feature off.
-The administration console supports DomainKeys Identified Mail (DKIM) as a service. Any changes to the services on the Servers page in the administration console requires a restart of the server.
-Resolved issue which caused deadlocks in SyncState.java.

1. Show current zimbra version :

[zimbra@centos64 ~]$ zmcontrol -v
Release 8.0.3_GA_5664.RHEL6_64_20130305090204 CentOS6_64 FOSS edition.

2. Download ZCS 8.0.3 :

[root@centos64 ~]#  wget http://files2.zimbra.com/downloads/8.0.4_GA/zcs-8.0.4_GA_5737.RHEL6_64.20130524120036.tgz

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

[root@centos64 ~]# tar xzvf zcs-8.0.4_GA_5737.RHEL6_64.20130524120036.tgz
[root@centos64 ~]# cd zcs-8.0.4_GA_5737.RHEL6_64.20130524120036

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

[root@centos64 zcs-8.0.4_GA_5737.RHEL6_64.20130524120036]# ./install.sh --platform-override

Example :

[root@centos64 zcs-8.0.4_GA_5737.RHEL6_64.20130524120036]# ./install.sh --platform-override

Operations logged to /tmp/install.log.61733
Checking for existing installation...
    zimbra-ldap...FOUND zimbra-ldap-8.0.3_GA_5664
    zimbra-logger...FOUND zimbra-logger-8.0.3_GA_5664
    zimbra-mta...FOUND zimbra-mta-8.0.3_GA_5664
    zimbra-snmp...FOUND zimbra-snmp-8.0.3_GA_5664
    zimbra-store...FOUND zimbra-store-8.0.3_GA_5664
    zimbra-apache...FOUND zimbra-apache-8.0.3_GA_5664
    zimbra-spell...FOUND zimbra-spell-8.0.3_GA_5664
    zimbra-convertd...NOT FOUND
    zimbra-memcached...FOUND zimbra-memcached-8.0.3_GA_5664
    zimbra-proxy...FOUND zimbra-proxy-8.0.3_GA_5664
    zimbra-archiving...NOT FOUND
    zimbra-cluster...NOT FOUND
    zimbra-core...FOUND zimbra-core-8.0.3_GA_5664
ZCS upgrade from 8.0.3 to 8.0.4 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.1.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-7
     FOUND: libidn-1.18-2
     FOUND: gmp-4.3.1-7
     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]
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.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
    zimbra-ldap......zimbra-ldap-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
    zimbra-logger......zimbra-logger-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
    zimbra-mta......zimbra-mta-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
    zimbra-snmp......zimbra-snmp-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
    zimbra-store......zimbra-store-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
    zimbra-apache......zimbra-apache-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
    zimbra-spell......zimbra-spell-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
    zimbra-memcached......zimbra-memcached-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done
    zimbra-proxy......zimbra-proxy-8.0.4_GA_5737.RHEL6_64-20130524120036.x86_64.rpm...done

Setting defaults from saved config in /opt/zimbra/.saveconfig/config.save
   HOSTNAME=centos64.ehowstuff.local
   LDAPHOST=centos64.ehowstuff.local
   LDAPPORT=389
   SNMPTRAPHOST=centos64.ehowstuff.local
   SMTPSOURCE=admin@ehowstuff.local
   SMTPDEST=admin@ehowstuff.local
   SNMPNOTIFY=yes
   SMTPNOTIFY=yes
   LDAPROOTPW=VgtA_olJ
   LDAPZIMBRAPW=VgtA_olJ
   LDAPPOSTPW=VgtA_olJ
   LDAPREPPW=VgtA_olJ
   LDAPAMAVISPW=VgtA_olJ
   LDAPNGINXPW=VgtA_olJ
Restoring existing configuration file from /opt/zimbra/.saveconfig/localconfig.xml...done
Operations logged to /tmp/zmsetup.06132013-182929.log
Upgrading from 8.0.3_GA_5664 to 8.0.4_GA_5737
Stopping zimbra services...done.
Starting mysql...done.
This appears to be 8.0.3_GA
Checking ldap status...not running.
Running zmldapapplyldif...done.
Checking ldap status...not running.
Starting ldap...done.
Stopping mysql...done.
Updating from 8.0.4_GA
Updating global config and COS's with attributes introduced after 8.0.3_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.11242...done.
Operations logged to /tmp/zmsetup.06132013-182929.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 centos64.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 centos64.ehowstuff.local...done.
Adding centos64.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 centos64.ehowstuff.local...done.
Creating user spam.diqhyltw2c@ehowstuff.local...already exists.
Creating user ham.acttkhsa@ehowstuff.local...already exists.
Creating user virus-quarantine.k7egy3seke@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_cert_manager...done.
        com_zimbra_url...done.
        com_zimbra_date...done.
        com_zimbra_bulkprovision...done.
        com_zimbra_proxy_config...done.
        com_zimbra_phone...done.
        com_zimbra_ymemoticons...done.
        com_zimbra_attachcontacts...done.
        com_zimbra_email...done.
        com_zimbra_viewmail...done.
        com_zimbra_attachmail...done.
        com_zimbra_adminversioncheck...done.
        com_zimbra_srchhighlighter...done.
        com_zimbra_clientuploader...done.
        com_zimbra_tooltip...done.
        com_zimbra_webex...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.4_GA_5737_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.06132013-182929.log to /opt/zimbra/log


Configuration complete - press return to exit


5. Check Zimbra new version :

[zimbra@centos64 ~]$ zmcontrol -v
Release 8.0.4_GA_5737.RHEL6_64_20130524120036 RHEL6_64 FOSS edition.

6. Check zimbra status :

[zimbra@centos64 ~]$ zmcontrol status
Host centos64.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

How to Install and Use Traceroute in Linux RHEL 6/7, CentOS 6/7, Oracle Linux 6/7

Traceroute command is a network diagnostic tool for displaying the route packets take to network host or destination. It shows how long each hop will takes and how many hops that the packet requires to reach the specify destination. In linux, traceroute command is used while in windows and dos environment, they used tracert command. In this post i will show you how to install and how to use traceroute command to diagnose your IP network related issues. This steps has been tested on RHEL 6/7, CentOS 6/7 and Oracle Linux 6/7.

1. If your linux VPS or dedicated server does not installed with traceroute, it will return this warning :

# traceroute www.google.com
-bash: traceroute: command not found

Or you can verify the traceroute install or not by issue which command :

# which traceroute
/usr/bin/which: no traceroute in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

2. To install traceroute, run the following command :

# yum install traceroute -y

3. Verify the command install or not :

# which traceroute
/bin/traceroute

4. How to use traceroute command :

a. Find the network path from my centos6 server to google.com :

# traceroute [options]

Example :

# traceroute www.google.com
traceroute to www.google.com (58.27.108.153), 30 hops max, 60 byte packets
 1  192.168.2.1 (192.168.2.1)  9.233 ms  9.020 ms  8.857 ms
 2  219.93.218.177 (219.93.218.177)  20.717 ms  20.529 ms  27.526 ms
 3  60.49.55.93 (60.49.55.93)  57.368 ms  57.446 ms  57.187 ms
 4  10.55.32.58 (10.55.32.58)  76.846 ms 10.55.32.56 (10.55.32.56)  66.418 ms  66.906 ms
 5  58.27.105.125 (58.27.105.125)  75.779 ms  65.556 ms  65.592 ms
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

1 is the internet gateway on the network this traceroute was done (ADSL modem local IP)
2 is the ISP the origin computer is connected to.

My PPPoE modem WAN IP details :
1

b. Find the network path from my centos6 server to google.com and do not resolve IP addresses to their domain names :

# traceroute www.google.com -n

c. Find the network path from my centos6 server to google.com and set the number of seconds to wait for response to a probe to 0.1 seconds (Default is 5.0) :

# traceroute www.google.com -w 0.1

d. Find the network path from my centos6 server to google.com and set the number of probes per each hop to 5 (Default is 3) :

# traceroute www.google.com -q 5

5. Display basic command line options help for more usage :

# traceroute --help
Usage:
  traceroute [ -46dFITnreAUV ] [ -f first_ttl ] [ -g gate,... ] [ -i device ] [ -m max_ttl ] [ -N squeries ] [ -p port ] [ -t tos ] [ -l flow_label ] [ -w waittime ] [ -q nqueries ] [ -s src_addr ] [ -z sendwait ] host [ packetlen ]
Options:
  -4                          Use IPv4
  -6                          Use IPv6
  -d  --debug                 Enable socket level debugging
  -F  --dont-fragment         Do not fragment packets
  -f first_ttl  --first=first_ttl
                              Start from the first_ttl hop (instead from 1)
  -g gate,...  --gateway=gate,...
                              Route packets through the specified gateway
                              (maximum 8 for IPv4 and 127 for IPv6)
  -I  --icmp                  Use ICMP ECHO for tracerouting
  -T  --tcp                   Use TCP SYN for tracerouting
  -i device  --interface=device
                              Specify a network interface to operate with
  -m max_ttl  --max-hops=max_ttl
                              Set the max number of hops (max TTL to be
                              reached). Default is 30
  -N squeries  --sim-queries=squeries
                              Set the number of probes to be tried
                              simultaneously (default is 16)
  -n                          Do not resolve IP addresses to their domain names
  -p port  --port=port        Set the destination port to use. It is either
                              initial udp port value for "default" method
                              (incremented by each probe, default is 33434), or
                              initial seq for "icmp" (incremented as well,
                              default from 1), or some constant destination
                              port for other methods (with default of 80 for
                              "tcp", 53 for "udp", etc.)
  -t tos  --tos=tos           Set the TOS (IPv4 type of service) or TC (IPv6
                              traffic class) value for outgoing packets
  -l flow_label  --flowlabel=flow_label
                              Use specified flow_label for IPv6 packets
  -w waittime  --wait=waittime
                              Set the number of seconds to wait for response to
                              a probe (default is 5.0). Non-integer (float
                              point) values allowed too
  -q nqueries  --queries=nqueries
                              Set the number of probes per each hop. Default is
                              3
  -r                          Bypass the normal routing and send directly to a
                              host on an attached network
  -s src_addr  --source=src_addr
                              Use source src_addr for outgoing packets
  -z sendwait  --sendwait=sendwait
                              Minimal time interval between probes (default 0).
                              If the value is more than 10, then it specifies a
                              number in milliseconds, else it is a number of
                              seconds (float point values allowed too)
  -e  --extensions            Show ICMP extensions (if present), including MPLS
  -A  --as-path-lookups       Perform AS path lookups in routing registries and
                              print results directly after the corresponding
                              addresses
  -M name  --module=name      Use specified module (either builtin or external)
                              for traceroute operations. Most methods have
                              their shortcuts (`-I' means `-M icmp' etc.)
  -O OPTS,...  --options=OPTS,...
                              Use module-specific option OPTS for the
                              traceroute module. Several OPTS allowed,
                              separated by comma. If OPTS is "help", print info
                              about available options
  --sport=num                 Use source port num for outgoing packets. Implies
                              `-N 1'
  -U  --udp                   Use UDP to particular port for tracerouting
                              (instead of increasing the port per each probe),
                              default port is 53
  -UL                         Use UDPLITE for tracerouting (default dest port
                              is 53)
  -P prot  --protocol=prot    Use raw packet of protocol prot for tracerouting
  --mtu                       Discover MTU along the path being traced. Implies
                              `-F -N 1'
  --back                      Guess the number of hops in the backward path and
                              print if it differs
  -V  --version               Print version info and exit
  --help                      Read this help and exit

Arguments:
+     host          The host to traceroute to
      packetlen     The full packet length (default is the length of an IP
                    header plus 40). Can be ignored or increased to a minimal
                    allowed value

How to Install and Securing MySQL on CentOS 6.4 VPS

MySQLMySQL Database server is one of the most popular used database in the internet especially for content management and blogging site. It’s can stores and retrieves data for the blog, websites and applications. This post will describes how you can install and securing MySQL on CentOS 6.4 virtual private server (VPS) or dedicated MySQL database server. For more information on MySQL, you can visit their website at www.mysql.com.

1. Install MySQL Database Server using yum command :

[root@centos64 ~]# yum install mysql mysql-server -y

Example :

[root@centos64 ~]# yum install mysql mysql-server -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.upsi.edu.my
 * epel: kartolo.sby.datautama.net.id
 * extras: mirror.upsi.edu.my
 * updates: mirror.upsi.edu.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.69-1.el6_4 will be installed
--> Processing Dependency: mysql-libs = 5.1.69-1.el6_4 for package: mysql-5.1.69-1.el6_4.x86_64
---> Package mysql-server.x86_64 0:5.1.69-1.el6_4 will be installed
--> Processing Dependency: perl-DBI for package: mysql-server-5.1.69-1.el6_4.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.69-1.el6_4.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.69-1.el6_4.x86_64
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.67-1.el6_3 will be updated
---> Package mysql-libs.x86_64 0:5.1.69-1.el6_4 will be an update
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                    Arch               Version                    Repository           Size
====================================================================================================
Installing:
 mysql                      x86_64             5.1.69-1.el6_4             updates             907 k
 mysql-server               x86_64             5.1.69-1.el6_4             updates             8.7 M
Installing for dependencies:
 perl-DBD-MySQL             x86_64             4.013-3.el6                base                134 k
 perl-DBI                   x86_64             1.609-4.el6                base                705 k
Updating for dependencies:
 mysql-libs                 x86_64             5.1.69-1.el6_4             updates             1.2 M

Transaction Summary
====================================================================================================
Install       4 Package(s)
Upgrade       1 Package(s)

Total download size: 12 M
Downloading Packages:
(1/5): mysql-5.1.69-1.el6_4.x86_64.rpm                                       | 907 kB     00:07
(2/5): mysql-libs-5.1.69-1.el6_4.x86_64.rpm                                  | 1.2 MB     00:12
(3/5): mysql-server-5.1.69-1.el6_4.x86_64.rpm                                | 8.7 MB     01:30
(4/5): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm                                 | 134 kB     00:00
(5/5): perl-DBI-1.609-4.el6.x86_64.rpm                                       | 705 kB     00:06
----------------------------------------------------------------------------------------------------
Total                                                               101 kB/s |  12 MB     01:57
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : mysql-libs-5.1.69-1.el6_4.x86_64                                                 1/6
  Installing : perl-DBI-1.609-4.el6.x86_64                                                      2/6
  Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                                3/6
  Installing : mysql-5.1.69-1.el6_4.x86_64                                                      4/6
  Installing : mysql-server-5.1.69-1.el6_4.x86_64                                               5/6
  Cleanup    : mysql-libs-5.1.67-1.el6_3.x86_64                                                 6/6
  Verifying  : mysql-libs-5.1.69-1.el6_4.x86_64                                                 1/6
  Verifying  : perl-DBD-MySQL-4.013-3.el6.x86_64                                                2/6
  Verifying  : perl-DBI-1.609-4.el6.x86_64                                                      3/6
  Verifying  : mysql-server-5.1.69-1.el6_4.x86_64                                               4/6
  Verifying  : mysql-5.1.69-1.el6_4.x86_64                                                      5/6
  Verifying  : mysql-libs-5.1.67-1.el6_3.x86_64                                                 6/6

Installed:
  mysql.x86_64 0:5.1.69-1.el6_4                 mysql-server.x86_64 0:5.1.69-1.el6_4

Dependency Installed:
  perl-DBD-MySQL.x86_64 0:4.013-3.el6                 perl-DBI.x86_64 0:1.609-4.el6

Dependency Updated:
  mysql-libs.x86_64 0:5.1.69-1.el6_4

Complete!

2. Make mysqld daemon start at boot and start MySQL Database Server :

[root@centos64 ~]# chkconfig mysqld on
[root@centos64 ~]# service mysqld start
Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h centos64.ehowstuff.local password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

                                                           [  OK  ]
Starting mysqld:                                           [  OK  ]

3. Securing MySQL Database Server. This includes setting up the password for mysql root, remove anonymous users, disallow root login remotely and remove test database and access.

[root@centos64 ~]# /usr/bin/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!


4. For testing, login to MySQL Server using defined password :

[root@centos64 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
+--------------------+
2 rows in set (0.01 sec)

mysql>

How to Setup Postfix on CentOS 6.4

Posfix MailPostfix is a open-source mail transfer agent (MTA) that routes and delivers electronic mail. Postfix is an alternative for Sendmail service which provide the same function. This post will describe on how you can install and setup postfix on CentOS 6.4. After you installed postfix, you can use postfix command to controls the operation of the Postfix mail system such as start or stop the master daemon, do a health check, and other maintenance.

1. To install Postfix, use the following yum command :

[root@centos64 ~]# yum install postfix -y

2. To verify if Postfix is already installed, use the following rpm command :

[root@centos64 ~]# rpm -q postfix

Example :

[root@centos64 ~]# rpm -q postfix
postfix-2.6.6-2.2.el6_1.x86_64

3. How to check Postfix version :

[root@centos64 ~]# postconf -d | grep mail_version

Example :

[root@centos64 ~]# postconf -d | grep mail_version
mail_version = 2.6.6
milter_macro_v = $mail_name $mail_version

4. Configure Basic postfix main.cf file :

[root@centos64 ~]# vi /etc/postfix/main.cf

Uncomment and modify the following two line :

myhostname = centos6.4.ehowstuff.local
mydomain = ehowstuff.local

myhostname: is the host name of the system (i.e, the system is called mail or mail.example.com).
mydomain: is the domain name for the email server (it can be a real or fake domain name).

5. Start the postfix service :

[root@centos64 ~]# service postfix start
Starting postfix:                                          [  OK  ]

6. Restart the postfix service :

[root@centos64 ~]# service postfix restart
Shutting down postfix:                                     [  OK  ]
Starting postfix:                                          [  OK  ]

7. How to show postfix pid number on running for postfix services ?

[root@centos64 ~]# ps -ef | grep postfix
root      3081     1  0 05:57 ?        00:00:00 /usr/libexec/postfix/master
postfix   3083  3081  0 05:57 ?        00:00:00 pickup -l -t fifo -u
postfix   3084  3081  0 05:57 ?        00:00:00 qmgr -l -t fifo -u
root      3292  1963  0 06:40 pts/0    00:00:00 grep postfix

How to Setup Persistent Static Routes on Linux CentOS 6.4

linuxStatic routing is a type of method of network routing. Static routing is not actually a routing protocol but it’s just a manual configuration on the network route. This usualy managed by network system administrator. In Linux, static route can be added and delete using “route” command. But the drawback is when linux server is rebooted, it will forget the static routes configuration. To avoid network interruption on the linux server, you can configure static route to take effect immediately without rebooting and also should apply after the next reboot. Static Routes that apply after next reboot is called Persistent Static Routes. To achieve this on CentOS 6.4, the following steps should be perform :

1. To make configuration take effect immediately, run the following command :

[root@centos62 ~]# route add -net <network> netmask <netmask> gw <gateway_ip> dev <interface>

Examples :

[root@centos64 ~]# route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth0
[root@centos64 ~]# route add -net 172.13.1.0 netmask 255.255.0.0 gw 172.13.1.1 dev eth1

2. To apply the configuration on next reboot, configure the following in /etc/sysconfig/static-routes :

[root@centos62 ~]# vi /etc/sysconfig/static-routes

Add the followings :

any -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
any -net 172.13.1.0 netmask 255.255.0.0 gw 172.13.1.1

How to Install vim-enhanced on CentOS 6.4

Linux LogoVIM (VIsual editor iMproved) or VI enhanced is the improved and advanced version of the famous vi editor which added with many enhancements like GUI support, interpreters for the Python and Perl scripting languages, syntax highlighting, online help and multiple windows. VIM or vim-enhanced package seeks to provide complete version of the previous vi editor. Vi was the first editor for UNIX, and is still very popular until today. In order to install VIM on your CentOS 6.4 all you have to do is run the following :

[root@centos64 ~]# yum install vim-enhanced -y

Warning if your CentOS does not install with VIM.

[root@centos64 ~]# vim /etc/httpd/conf/httpd.conf
-bash: vim: command not found

How to Configure EPEL Repository on CentOS 6.4 x86_64

epelEPEL 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. By using EPEL repository you can install some other third party software such as nagios, or bugzilla, phpmyadmin, or any other standard open source software just using yum command. These repositories are not officially supported by CentOS, but this repository provide much more current versions of popular PHP or MySQL applications. This post describe how you can prepare EPEL Repository on CentOS 6.4 x86_64.

1. Download and import the GPG keys for EPEL software packages:

[root@centos64 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
[root@centos64 ~]# rpm --import RPM-GPG-KEY-EPEL-6
[root@centos64 ~]# rm -f RPM-GPG-KEY-EPEL-6

2. Download and install EPEL repository for 64-bit CentOS :

[root@centos64 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@centos64 ~]# rpm -ivh epel-release-6-8.noarch.rpm
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]

Alternately, you can browse other version of EPEL package set using repoview:

How to Setup Webmin 1.620 using YUM repository on CentOS 6.4 VPS

webminThis post will brief you on how to setup Webmin 1.620 using yum repository in CentOS 6.4 virtual private server (VPS). Webmin is an open source system administration and system configuration tool which provide you web-based interface to manage, administer and configure your CentOS VPS or dedicated server through web browser. It’s provide graphical interface remote administration instead of manually edit the configuration using command line from putty or console.

1. Enabling Yum repository for Webmin. Create the /etc/yum.repos.d/webmin.repo file containing :

[root@centos64 ~]# vi /etc/yum.repos.d/webmin.repo
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1

2. Fetch and install my GPG key :

[root@centos64 ~]# wget http://www.webmin.com/jcameron-key.asc
[root@centos64 ~]# rpm --import jcameron-key.asc

3. Run “yum install” command to install all required dependencies :

[root@centos64 ~]# yum install webmin -y

Example :

[root@centos64 ~]# yum install webmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * Webmin: download.webmin.com
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * updates: mirrors.hostemo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package webmin.noarch 0:1.620-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch                   Version                 Repository              Size
====================================================================================================
Installing:
 webmin                 noarch                 1.620-1                 Webmin                  21 M

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

Total download size: 21 M
Installed size: 21 M
Downloading Packages:
webmin-1.620-1.noarch.rpm                                                    |  21 MB     04:09
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : webmin-1.620-1.noarch                                                            1/1
Operating system is CentOS Linux
Webmin install complete. You can now login to http://centos64.ehowstuff.local:10000/
as root with your root password.
  Verifying  : webmin-1.620-1.noarch                                                            1/1

Installed:
  webmin.noarch 0:1.620-1

Complete!

4. By default Webmin runs on port 10000, therefore port 10000 need to be open in order to allow you to access web base interface remotely.

[root@centos64 ~]# vi /etc/sysconfig/iptables

Add the following rule to existing iptables firewall :

-A INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -j ACCEPT

Restart IPtables :

[root@centos64 ~]# service iptables restart

5. Access and login to Webmin using URL http://serveripaddress:10000/