Saturday 5 October 2013

How to install wordpress in rhel 6.x / Centos 6.x

[root@upload2 ~]# rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
[root@upload2 ~]# yum install yum-plugin-replace
[root@upload2 ~]# yum install php-enchant
root@upload2 ~]# yum replace php-common --replace-with=php54w-common
[root@upload2 ~]# yum install wordpress
Installed:
  wordpress.noarch 0:3.6.1-1.el6                                              

Dependency Installed:
  php-IDNA_Convert.noarch 0:0.8.0-1.el6   php-PHPMailer.noarch 0:5.2.2-1.el6  
  php-simplepie.noarch 0:1.3.1-3.el6      php54w-process.x86_64 0:5.4.19-1.w6 

Complete!
[root@upload2 ~]# mysql -u root -ppassword
mysql> create database wordpress character set utf8 collate utf8_bin;
mysql> grant all privileges on wordpress.* to wordpress@'localhost' identified by 'password';
mysql> flush privileges;
mysql> exit
Bye
[root@upload2 ~]# vim /etc/wordpress/wp-config.php
 19 define('DB_NAME', 'wordpress');
 20
 21 /** MySQL database username */
 22 define('DB_USER', 'wordpress');
 23
 24 /** MySQL database password */
 25 define('DB_PASSWORD', 'password');

[root@upload2 ~]# mkdir /usr/share/wordpress/wp-content/languages
[root@upload2 ~]# wget -P /usr/share/wordpress/wp-content/languages http://svn.automattic.com/wordpress-i18n/ja/tags/3.1.2/messages/ja.mo http://svn.automattic.com/wordpress-i18n/ja/tags/3.1.2/messages/continents-cities-ja.m
[root@upload2 ~]# ls /usr/share/wordpress/wp-content/languages/
continents-cities-ja.mo  ja.mo
[root@upload2 ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]





How to configure webdev

[root@upload ~]# vim /etc/httpd/conf.d/webdav.conf
alias /share /imagedata1/3rdparty_packages/
<Location /share>
   DAV On
   SSLRequireSSL
   Options None
   AuthType Basic
   AuthName WebDAV
   AuthUserFile /etc/httpd/conf/.htpasswd
   <LimitExcept GET OPTIONS>
      Order allow,deny
      Allow from all
# IP address you allow

      Require valid-user
   </LimitExcept>
</Location>

[root@upload ~]# chmod 755 -R /imagedata1/3rdparty_packages/
[root@upload ~]# htpasswd -c /etc/httpd/conf/.htpasswd bala
New password:
Re-type new password:
Updating password for user bala
[root@upload ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                           [  OK  ]

Windows does not have webdav function, so Use free software for webdav client. Download 'CarotDAV' for free from following site.

http://rei.to/carotdav_en.html

Download and install in windows pc


The waring is shown like follows, it's SSL certificates is not installed on your PC, it's no ploblem, Click 'Ignore' and go next.  




Friday 4 October 2013

How to configure slave dns server

Configuration on Master DNS

[root@upload named]# cat /etc/named.conf

options {
        listen-on port 53 { 127.0.0.1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { localhost; any; };
        allow-transfer { localhost; 10.66.191.221; };
        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";
        managed-keys-directory "/var/named/dynamic";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};
zone "zumi.com." {
       type master;
       file "zumi.com.zone";
       allow-update { none; };
};

zone "191.66.10.in-addr.arpa." {
      type master;
      file "191.66.10.in-addr.arpa.zone";
      allow-update { none; };
};

include "/etc/named.rfc1912.zones";

[root@upload named]# cat /var/named/zumi.com.zone
$TTL    86400
@    IN      SOA   upload.zumi.com.  root.zumi.com. (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum            
             IN    NS             upload.zumi.com.
             IN    NS             upload2.zumi.com.
         IN       A          10.66.191.230
         IN       MX    1      upload.zumi.com
upload       IN    A              10.66.191.230
upload2         IN    A              10.66.191.221

[root@upload named]# rndc reload

Configuration on Slave DNS

[root@upload2 named]# cat /etc/named.conf

options {
    listen-on port 53 { 127.0.0.1; };
    #listen-on-v6 port 53 { ::1; };
    directory     "/var/named";
    dump-file     "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query     { localhost; any; };
    recursion yes;

    dnssec-enable yes;
    dnssec-validation yes;
    dnssec-lookaside auto;

    /* Path to ISC DLV key */
    bindkeys-file "/etc/named.iscdlv.key";

    managed-keys-directory "/var/named/dynamic";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
    type hint;
    file "named.ca";
};
    zone "zumi.com" IN {
        type slave;
        masters { 10.66.191.230; };
        file "slaves/zumi.com.zone";
        notify no;
    };

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

[root@upload2 etc]# service named start
Generating /etc/rndc.key:                                  [  OK  ]
Starting named:                                            [  OK  ]
[root@upload2 etc]# rndc reload
server reload successful
[root@upload2 etc]# ls /var/named/slaves/
zumi.com.zone

How to configure NTP Server

[root@upload2 ~]# yum -y install ntp
[root@upload2 ~]# vim /etc/ntp.conf
 
# line 19: add the network range you allow to receive requests

restrict 10.0.0.0 mask 255.255.255.0 nomodify notrap
 
# change servers for synchronization
 
#server 0.rhel.pool.ntp.org
#server 1.rhel.pool.ntp.org
#server 2.rhel.pool.ntp.org
 
server ntp1.jst.mfeed.ad.jp
server ntp2.jst.mfeed.ad.jp
server ntp3.jst.mfeed.ad.jp 
 
[root@upload2 ~]# /etc/rc.d/init.d/ntpd start
Starting ntpd:                                             [  OK  ]
[root@upload2 ~]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 ntp1.jst.mfeed. 172.29.3.50      2 u   11   64    1  209.194  -112312   0.000
 ntp2.jst.mfeed. 172.29.2.50      2 u   11   64    1  191.529  -112304   0.000
 ntp3.jst.mfeed. 172.29.3.50      2 u   12   64    1  185.499  -112319   0.000
[root@upload2 ~]# 

Thursday 3 October 2013

How to install zabbix in rhel 6.X / Centos 6.X


Information about my system:-

Linux upload2.zumi.com 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

[root@upload2 ~]# rpm -ivh epel-release-6-8.noarch.rpm
[root@upload2 ~]# rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
[root@upload2 ~]# rpm -ivh http://repo.zabbix.com/zabbix/2.0/rhel/6/x86_64/zabbix-release-2.0-1.el6.noarch.rpm
[root@upload2 ~]# yum install httpd php php-mysql mysql-server
[root@upload2 ~]# service mysqld start
[root@upload2 ~]# mysqladmin -u root password password
[root@upload2 ~]# mysql -u root -ppassword
mysql> use mysql;
mysql> DELETE FROM mysql.user WHERE user = '';
mysql> flush privileges;
mysql> quit
[root@upload2 ~]# yum install zabbix-server-mysql zabbix-agent zabbix-web-mysql
[root@upload2 ~]# mysql -u root -ppassword
mysql> create database zabbix character set utf8;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> quit
[root@upload2 ~]# cd /usr/share/doc/zabbix-server-mysql-2.0.8/create/
[root@upload2 create]# mysql -u root -ppassword zabbix < schema.sql
[root@upload2 create]# mysql -u root -ppassword zabbix < images.sql
[root@upload2 create]# mysql -u root -ppassword zabbix < data.sql
[root@upload2 create]# vi /etc/zabbix/zabbix_server.conf
81 DBHost=localhost
91 DBName=zabbix
107 DBUser=zabbix
115 DBPassword=zabbix

[root@upload2 create]# vi /etc/zabbix/zabbix_agentd.conf

136 Hostname=upload2.zumi.com
137
138 #Hostname=Zabbix server

[root@upload2 create]# vim /etc/php.ini

# line 440: change to Zabbix recomended

max_execution_time = 600
 
# line 449: change to Zabbix recomended

max_input_time = 600
 
# line 457: change to Zabbix recomended

memory_limit = 256M
 
# line 729: change to Zabbix recomended

post_max_size = 32M
 
# line 878: change to Zabbix recomended

upload_max_filesize = 16M
 
# line 946: uncomment and add your timezone

date.timezone = Asia/Calcutta
 
[root@upload2 create]# vi /etc/httpd/conf.d/zabbix.conf
 
Alias /zabbix /usr/share/zabbix

<Directory "/usr/share/zabbix">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all   ------- > if u need specify particular ip range here.

    php_value max_execution_time 600
    php_value memory_limit 256M
    php_value post_max_size 32M
    php_value upload_max_filesize 16M
    php_value max_input_time 600
    php_value date.timezone Asia/Calcutta
</Directory>

[root@upload2 create]# vim /etc/httpd/conf/httpd.conf
276 ServerName upload2.zumi.com:80
 
[root@upload2 create]# service zabbix-server start
[root@upload2 create]# service zabbix-agent restar 
[root@upload2 create]# service httpd restart



Change to "zabbix in "User" field and input the password. Next, click "Test Connection" and id it's "OK" like follows, go next


Input ZABBIX server's hostname and so on like follows


Make sure settings and if it's Ok all, go next

 

 

 Default username/password is Admin/zabbix.