Uncategorized – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Mon, 15 Aug 2016 11:43:26 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 Most Effective Industry Specific Plug-ins for WordPress https://tecadmin.net/effective-industry-specific-plug-ins-wordpress/ https://tecadmin.net/effective-industry-specific-plug-ins-wordpress/#respond Mon, 15 Aug 2016 11:32:07 +0000 https://tecadmin.net/?p=10625 Seeing how it is completely-open source and extremely affordable, WordPress (WP) is one of the most unique and popular content management systems (CMS) there are. In fact, it would be safe to assume that both the blogosphere and the world of modern business would be completely different without it. What makes it so unique are [...]

The post Most Effective Industry Specific Plug-ins for WordPress appeared first on TecAdmin.

]]>
Seeing how it is completely-open source and extremely affordable, WordPress (WP) is one of the most unique and popular content management systems (CMS) there are. In fact, it would be safe to assume that both the blogosphere and the world of modern business would be completely different without it. What makes it so unique are its numerous plug-ins, some of which were so hand-tailored for specific industries, that they give a significant competitive edge to all those that use them. Here are some of the most effective ones.

Plug-ins for WordPress

1. WP-Optimize

According to Kissmetrics’ statistic, one quarter of all your website’s visitors are bound to leave after waiting for more than 4 seconds for your website to load. Strange Loop went even further in the research of this phenomenon by realizing that companies all over the world lose over $3 billion per year in purchases, due to slow responsive pages. As a comparison, UN committee determined it would take only ten times this amount to forever put an end to world hunger. With the help of WP-Optimize, what you can do is optimize your website for both desktop and mobile users and, in this way, drastically improve user experience.

2. Tickera

If all you needed plug-ins for was to make your website quicker, the world would be a much simpler place. Unfortunately, a badly optimized website is not the only way for a business to lose money. Event management companies all over the world lose millions of dollars in commission fees alone, but what if there was a way to avoid this unnecessary expense. Well, there is one actually. By using WordPress event ticket system plug-in, you can assume the direct control over both sales and the distribution of all tickets for your events. Furthermore, unlike some other similar software, Tickera only charges a fixed fee. This means that you won’t have to lose a commission for every ticket that gets sold this way.

3. Beaver Builder

The quality of your landing pages, their design, optimization (again) and even their number greatly affects the success of your conversion rate. Still, making an effective landing page takes inspiration, but even this is often not enough. What you also need is a way to convey the idea inside your mind to a designer, but no matter how eloquent you are, there is no guarantee you will be on the same page (pun intended). On the other hand, with a cunning landing page construction kit such as Beaver Builder, you won’t have to go through all this trouble. This easy-to-use plug-in which operates on drag and drop principle will allow you to create the page you’ve always wanted to have, even without any previous knowledge in coding.

4. WordPress SEO

Finally, after you have made all your landing pages well-designed and perfectly optimized, you need to make sure they find a way to your target audience. This is where WordPress SEO comes in big and adjusts your pages to standards and algorithms used by search engines. In this way, it guarantees you a better placement in search result, thus increasing your site’s traffic many times over.

Plug-ins for WordPress

Conclusion

Each and every one of these plug-ins is specifically designed to give you a competitive edge in a volatile landscape of modern business. Sometimes, all you need is a little push in the right direction and every single one of these amazing software’s can provide you with this. To paraphrase one of the most famous quotes from The Godfather- it is an offer you simply cannot refuse.

The post Most Effective Industry Specific Plug-ins for WordPress appeared first on TecAdmin.

]]>
https://tecadmin.net/effective-industry-specific-plug-ins-wordpress/feed/ 0
How to Install Komodo Edit on Ubuntu 14.10, 14.04 LTS and 12.04 LTS via PPA https://tecadmin.net/install-komodo-edit-on-ubuntu/ https://tecadmin.net/install-komodo-edit-on-ubuntu/#respond Sun, 19 Oct 2014 12:09:33 +0000 https://tecadmin.net/?p=6217 Komodo Edit is a open-source part of popular Komodo IDE. We can use most of functionality of IDE except some advanced functionality. It is available free to download and install under mystic-mirage PPA on launchpad. Features of Komodo Edit: Multi-Language Editor Auto-complete & Calltips Toolbox Projects & Places Manager Multiple Selections Skins (Abyss) & Icon [...]

The post How to Install Komodo Edit on Ubuntu 14.10, 14.04 LTS and 12.04 LTS via PPA appeared first on TecAdmin.

]]>
Komodo Edit is a open-source part of popular Komodo IDE. We can use most of functionality of IDE except some advanced functionality. It is available free to download and install under mystic-mirage PPA on launchpad.

Features of Komodo Edit:

    • Multi-Language Editor
    • Auto-complete & Calltips
    • Toolbox
    • Projects & Places Manager
    • Multiple Selections
    • Skins (Abyss) & Icon Sets
    • Breadcrumbs
    • Open Files pane
    • Minimap
    • Smart Snippets

Install Komodo Edit

We can install Komodo Ddit by adding mystic-mirage ppa in our system. Use following set of commands to add ppa repository and install Komodo Edit in our system.

$ sudo add-apt-repository ppa:mystic-mirage/komodo-edit
$ sudo apt-get update
$ sudo apt-get install komodo-edit

To get full functional Komodo IDE, visit its official site http://komodoide.com/.

The post How to Install Komodo Edit on Ubuntu 14.10, 14.04 LTS and 12.04 LTS via PPA appeared first on TecAdmin.

]]>
https://tecadmin.net/install-komodo-edit-on-ubuntu/feed/ 0
Setup Database Mirroring in SQL Server 2012 with Certificates https://tecadmin.net/setup-database-mirroring-sql-server/ https://tecadmin.net/setup-database-mirroring-sql-server/#comments Thu, 26 Sep 2013 06:56:23 +0000 https://tecadmin.net/?p=2580 Many times we faced issues with mirroring setup with authentication, So in this article we are going to configure database mirroring by creating endpoint and required certificates for authenticate and authorization. Follow below steps to setup database mirroring in sql server with 1 Principal server and 1 Mirror server. This article does not include witness [...]

The post Setup Database Mirroring in SQL Server 2012 with Certificates appeared first on TecAdmin.

]]>
Many times we faced issues with mirroring setup with authentication, So in this article we are going to configure database mirroring by creating endpoint and required certificates for authenticate and authorization.

Follow below steps to setup database mirroring in sql server with 1 Principal server and 1 Mirror server. This article does not include witness server. So if you want automatic failover setup this article would not help you. Read this article for role of witness server

Step 1. Setup Endpoint and Certificates

With the first step we are going to create endpoint on both server and configure certificates for authentication and authorization.

Create Certificate and end-points (On Principal Instance):
use master;
GO

CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Secure_Password';
GO

CREATE CERTIFICATE principal_cert WITH SUBJECT = 'Principal Server Certificate', START_DATE = '2013/01/01', EXPIRY_DATE = '2020/01/01';
GO

CREATE ENDPOINT Mirroring STATE = STARTED
    AS TCP (LISTENER_PORT = 5022, LISTENER_IP = ALL)
    FOR DATABASE_MIRRORING ( AUTHENTICATION = CERTIFICATE principal_cert, ENCRYPTION = disabled, ROLE = ALL);
GO

BACKUP CERTIFICATE principal_cert TO FILE = 'D:certificatesprincipal_cert.cer'
GO
Create Certificate and end-points (On Mirror Instance):
USE master
GO

CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Secure_Password';
GO

CREATE CERTIFICATE mirror_cert WITH SUBJECT = 'Mirror Server Certificate', START_DATE = '2013/01/01', EXPIRY_DATE = '2020/01/01';
GO

CREATE ENDPOINT Mirroring STATE = STARTED
    AS TCP (LISTENER_PORT = 5023, LISTENER_IP = ALL)
    FOR DATABASE_MIRRORING ( AUTHENTICATION = CERTIFICATE mirror_cert, ENCRYPTION = disabled, ROLE = ALL );
GO

BACKUP CERTIFICATE mirror_cert
    TO FILE = 'D:certificatesmirror_cert.cer';
GO
Create User and Associate Certificate (On Principal Instance):

At this stage we need to exchange certificates to other instance. Copy Principal instance certificate on mirror server and Mirror instance certificate to Principal server manually.

USE MASTER
GO

CREATE LOGIN mirror_login WITH PASSWORD = 'Secure_Password';
GO

CREATE USER mirror_user FOR LOGIN mirror_login;
GO

CREATE CERTIFICATE mirror_cert
    AUTHORIZATION mirror_user
    FROM FILE = 'D:certificatemirror_cert.cer';
GO

GRANT CONNECT ON ENDPOINT::Mirroring TO [mirror_login];
GO
Create User and Associate Certificate ( On Mirror Instance):
USE MASTER
GO
CREATE LOGIN principal_login WITH PASSWORD = 'Secure_Password';
go

CREATE USER principal_user FROM LOGIN principal_login;
go

CREATE CERTIFICATE principal_cert
	AUTHORIZATION Principal_user
	FROM FILE = 'D:certificateprincipal_cert.cer';
Go

GRANT CONNECT ON Endpoint::Mirroring TO [Principal_Login];
go
Step 2. Copy Database on Mirror Server

After configuring authentication do following steps given below screen shots.

Update Principal database to Full Recovery Mode:
ALTER DATABASE MirrorDBName SET RECOVERY FULL;
GO
Dump database on Principal Server:
USE MASTER
GO

BACKUP DATABASE MirrorDBName
    TO DISK = 'D:BackupsMirrorDBName_full.bak'
GO
Dump Log on Principal Server:
USE MASTER
GO
BACKUP LOG MirrorDBName
    TO DISK = 'D:BackupsMirrorDBName_log.trn'
GO

After taking backup copy the database backup and log backup to Mirror server manually. then after go to next step.

Restore Backup on Mirror Server with No Recovery option:
USE MASTER
GO

RESTORE DATABASE MirrorDBName
    FROM DISK = 'D:BackupsMirrorDBName_full.bak'
    WITH NORECOVERY
GO
Restore Log on Mirror Server with No Recovery option:
USE MASTER
GO

RESTORE LOG MirrorDBName
    FROM DISK = 'D:BackupsMirrorDBName_log.trn'
    WITH NORECOVERY
GO
Step 3. Enable Database Mirroring in SQL Server

After completing step 1 and 2, now we are ready to enable mirroring between databases using following commands.

Execute this on Principal Database Instance.
ALTER DATABASE MirrorDBName
    SET PARTNER = 'TCP://MIRROR-INSTANCE:5023'
GO
Execute this on Mirror Database Instance.
ALTER DATABASE MirrorDBName
    SET PARTNER = 'TCP://PRINCIPAL-INSTANCE:5022'
GO

Database Mirroring in SQL Server

The post Setup Database Mirroring in SQL Server 2012 with Certificates appeared first on TecAdmin.

]]>
https://tecadmin.net/setup-database-mirroring-sql-server/feed/ 1
How to Install XCache for PHP on CentOS,RHEL and Fedora https://tecadmin.net/install-xcache-php-centos-rhel-fedora/ https://tecadmin.net/install-xcache-php-centos-rhel-fedora/#comments Mon, 26 Aug 2013 12:54:04 +0000 https://tecadmin.net/?p=2263 XCache is a fast, stable PHP opcode cacher. This relatively new opcode caching software has been developed by mOo. XCache optimizes performance caching the compiled state of PHP scripts into the RAM and uses the compiled version straight from the RAM. This may increase php execution 1-5 times faster than default installation. Read more about [...]

The post How to Install XCache for PHP on CentOS,RHEL and Fedora appeared first on TecAdmin.

]]>
XCache is a fast, stable PHP opcode cacher. This relatively new opcode caching software has been developed by mOo. XCache optimizes performance caching the compiled state of PHP scripts into the RAM and uses the compiled version straight from the RAM. This may increase php execution 1-5 times faster than default installation. Read more about XCache.

This article will help you to install and configure XCache on CentOS, RHEL and Fedora Systems.

Step 1: Install XCache for PHP

You can simply use yum command to install xcache for php from epel repository. If you do have installed epel repository, Enable it using this article.

# yum install php-xcache xcache-admin
Step 2: Configure XCache

During installation XCache creates its default php configuration file xcache.ini.

# nano /etc/php.d/xcache.ini

This file contains a long list of parameters. Read this article to know about its parameters

Step 3: Verify XCache

Create a php info file using below content and upload to your web server under document root. Open this file in browser and search for xcache.

<?php
phpinfo();
?>

XCache for PHP info

Step 4: Configure XCache Admin Panel

At this stage we have successfully configured XCache for php. XCache also provides admin panel by which we can view caching state, clear cache or disable. Using default installation it’s not enabled. Below setup will enable XCache admin panel with password protected.

Copy xcache folder to your document root of your web server. the xcache directory may differ with earlier version of php xcache.

# cp -r /usr/share/xcache /var/www/html/

Generate and setup password in xcache.ini file using below commands.

# echo -n "secreatpassword" | md5sum

753f51a9cca136b41c5f7cced1f813dd  -

Search [xcache.admin] section in xcache.ini and update as below.

[xcache.admin]
xcache.admin.enable_auth = On
xcache.admin.user = "xadmin"
; set xcache.admin.pass = md5($your_password)
; login use $your_password
xcache.admin.pass = "753f51a9cca136b41c5f7cced1f813dd"

Restart httpd server to enable new settings.

# /etc/init.d/httpd restart

Access XCache admin panel in browser using ip or domain name by location sub directory using above configured username password.

http://svr2.tecadmin.net/xadmin/

Login: xadmin / secreatpassword

XCache for PHP Admin Panel

The post How to Install XCache for PHP on CentOS,RHEL and Fedora appeared first on TecAdmin.

]]>
https://tecadmin.net/install-xcache-php-centos-rhel-fedora/feed/ 1
Setup Varnish on CentOS/RHEL 5/6 with Apache https://tecadmin.net/setup-varnish-on-centosrhel-56-with-apache/ https://tecadmin.net/setup-varnish-on-centosrhel-56-with-apache/#respond Fri, 28 Jun 2013 07:16:14 +0000 https://tecadmin.net/?p=1685 Varnish is an Web accelerator used for content-heavy dynamic web sites. Its used as front-end caching server for web servers. This tutorial will help you to setup Varnish on your System. Step 1: Add Atomic Repository There are latest release available in Atomic repository in RPM format. For RHEL/CentOS 5: # rpm -Uvh http://www6.atomicorp.com/channels/atomic/centos/5EL/i386/RPMS/atomic-release-1.0-16.el5.art.noarch.rpm For [...]

The post Setup Varnish on CentOS/RHEL 5/6 with Apache appeared first on TecAdmin.

]]>
Varnish is an Web accelerator used for content-heavy dynamic web sites. Its used as front-end caching server for web servers. This tutorial will help you to setup Varnish on your System.

Step 1: Add Atomic Repository

There are latest release available in Atomic repository in RPM format.
For RHEL/CentOS 5:

# rpm -Uvh http://www6.atomicorp.com/channels/atomic/centos/5EL/i386/RPMS/atomic-release-1.0-16.el5.art.noarch.rpm

For RHEL/CentOS 6:

# rpm -Uvh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/atomic-release-1.0-16.el6.art.noarch.rpm
Step 2: Install Apache and Configure

Use following commands to install Apache on your system.

# yum install httpd

Configure Apache to work on port 82. Edit Apache configuration file /etc/httpd/conf/httpd.conf and change value of Listen from 80 to 82

Listen 82

Create a test file check.html in document root using test content.

# cat /var/www/html/check.html
<h1> Welcome to Apache Server !!!</h1>
Step 3: Install Varnish

Install Varnish using yum command line tool using following command.

# yum install varnish
Step 4: Configure Varnish

4.1 Configure /etc/varnish/default.vcl file
This file used to tell varnish where the actual content are. We will configure it to find content from service running on local machine on port 82 ( Apache ).

# vim /etc/varnish/default.vcl
backend default {
  .host = "127.0.0.1";
  .port = "82";
}

4.2 Configure /etc/sysconfig/varnish file
We will change the default listening port by varnish in this file. Generally this file contains all start-up configuration. Edit file and change following values.

# vim /etc/sysconfig/varnish
VARNISH_LISTEN_PORT=80
VARNISH_STORAGE_SIZE=512M
  • VARNISH_LISTEN_PORT: Port on which varnish will listen
  • VARNISH_STORAGE_SIZE: Max amount of RAM used by Varnish

All other default configuration are fine and there are no need to make changes for initial configuration.

Step 5: Restart Services

After completing configuration restart both service varnish and apache.

# service httpd restart
# service varnish restart
Step 5: Test Configuration

To check your configuration, Open your host in browser pointing to port 80. As the varnish is running on port 80, it will connect to Apache running on port 82 and get back the results to browser.

http://svr1.tecadmin.net/check.html

To confirm that varnish is working, you can check the varnish logs using following command.

# varnishlog

Above command will show you detailed log information about what happening with requests.

Varnish-setup

The post Setup Varnish on CentOS/RHEL 5/6 with Apache appeared first on TecAdmin.

]]>
https://tecadmin.net/setup-varnish-on-centosrhel-56-with-apache/feed/ 0
Error in query (1548): Cannot load from mysql.proc. The table is probably corrupted https://tecadmin.net/error-query-1548-load-mysql-proc-table-probably-corrupted/ https://tecadmin.net/error-query-1548-load-mysql-proc-table-probably-corrupted/#respond Wed, 26 Jun 2013 08:42:37 +0000 https://tecadmin.net/?p=5502 Error: Below issue generally comes with database incompatibilities with the current version of MySQL. It may happen due to MySQL server upgrade or downgrade. Error in query (1548): Cannot load from mysql.proc. The table is probably corrupted Solution: This issue may resolve by repairing mysql databse using following command. # mysqlcheck -r mysql proc -u [...]

The post Error in query (1548): Cannot load from mysql.proc. The table is probably corrupted appeared first on TecAdmin.

]]>
Error:

Below issue generally comes with database incompatibilities with the current version of MySQL. It may happen due to MySQL server upgrade or downgrade.

Error in query (1548): Cannot load from mysql.proc. The table is probably corrupted

Solution:

This issue may resolve by repairing mysql databse using following command.

# mysqlcheck -r mysql proc -u root -p
Enter password:
mysql.proc                                         OK

In case you are still getting same error while accessing proc table, You need to execute mysql_upgrade command to fix issue. Read more about mysql_upgrade

# mysql_upgrade -u root -p

The post Error in query (1548): Cannot load from mysql.proc. The table is probably corrupted appeared first on TecAdmin.

]]>
https://tecadmin.net/error-query-1548-load-mysql-proc-table-probably-corrupted/feed/ 0
Convert HTML to PDF using Qtwebkit with PHP https://tecadmin.net/convert-html-to-pdf-using-qtwebkit-with-php/ https://tecadmin.net/convert-html-to-pdf-using-qtwebkit-with-php/#comments Fri, 21 Jun 2013 10:14:55 +0000 https://tecadmin.net/?p=1626 Wkhtmltopdf is a very useful application to create pdf from html (webpage). This article will help to create pdf of a webpage using php script and Linux command line tool. Step 1: Install wkhtmltopdf in Linux Download wkhtmltopdf from google code and install to linux system. # cd /opt # wget https://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2 # tar xjf [...]

The post Convert HTML to PDF using Qtwebkit with PHP appeared first on TecAdmin.

]]>
Wkhtmltopdf is a very useful application to create pdf from html (webpage). This article will help to create pdf of a webpage using php script and Linux command line tool.

Step 1: Install wkhtmltopdf in Linux

Download wkhtmltopdf from google code and install to linux system.

# cd /opt
# wget https://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2
# tar xjf wkhtmltopdf-0.9.9-static-i386.tar.bz2
# mv wkhtmltopdf-i386 /usr/bin/wkhtmltopdf
# chown apache:apache /usr/bin/wkhtmltopdf
# chmod +x /usr/bin/wkhtmltopdf
Step 2: Create Pdf Using Command Line

First check wkhtmltopdf script it its properly working from command line. Below command will create pdf of http://google.com web page.

# /usr/bin/wkhtmltopdf http://google.com google.pdf
Step 3: PHP Code to Create Pdf Using wkhtmltopdf

Use below block of php code to generate pdf from html ( webpage ). This script required to be enabled shell_exec function for Apache. Most of shared hosting provides doesn’t allow this function.

Create a file name getPdf.php using below code and put it on your website document root

&lt;?php

$url = $_GET['url'];    // Website URL to Create pdf
$name = $_GET['pdf'];   // Output pdf name

$command = &quot;/usr/bin/wkhtmltopdf &quot;;
$pdf_dir = &quot;/var/www/html/pdfs/&quot;;     // Pdf files will be saved here
$ex_cmd = &quot;$command $url &quot; . $pdf_dir . $name;
$output = shell_exec($ex_cmd);

?&gt;

Open Following url to generate pdf of website ( html ).

Syntax:
http://youdomain.com/getPdf.php?url=<website url>&pdf=<pdf name>

Example:
https://tecadmin.net/getPdf.php?url=http://google.com&pdf=google.pdf


The post Convert HTML to PDF using Qtwebkit with PHP appeared first on TecAdmin.

]]>
https://tecadmin.net/convert-html-to-pdf-using-qtwebkit-with-php/feed/ 1
How to Add SPF Records for all Accounts on cPanel Server https://tecadmin.net/how-to-add-spf-records-for-all-accounts-on-cpanel-server/ https://tecadmin.net/how-to-add-spf-records-for-all-accounts-on-cpanel-server/#comments Tue, 04 Jun 2013 11:15:12 +0000 https://tecadmin.net/?p=1543 This article will help to how to add SPF records for all accounts on cPanel server 1. For Single Account cPanel provides scripts to add SPF record in accounts. If you want to add SPF record in single account use following command as root user. # /usr/local/cpanel/bin/spf_installer <username> <username> : cPanel account name to which [...]

The post How to Add SPF Records for all Accounts on cPanel Server appeared first on TecAdmin.

]]>
This article will help to how to add SPF records for all accounts on cPanel server

1. For Single Account

cPanel provides scripts to add SPF record in accounts. If you want to add SPF record in single account use following command as root user.

# /usr/local/cpanel/bin/spf_installer <username>

<username> : cPanel account name to which SPF need to configure.

2. For All Accounts

Use following script to add SPF records for all accounts on cPanel server.

# for USER in /var/cpanel/users/*; do /usr/local/cpanel/bin/spf_installer "${USER##*/}"; done

Reference:

http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/EmailAuthentication

The post How to Add SPF Records for all Accounts on cPanel Server appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-add-spf-records-for-all-accounts-on-cpanel-server/feed/ 3
How to Setup Master Slave DNS Server on CentOS 6 and RHEL https://tecadmin.net/how-to-setup-master-slave-dns-server-on-centos-6-and-rhel/ https://tecadmin.net/how-to-setup-master-slave-dns-server-on-centos-6-and-rhel/#comments Tue, 21 May 2013 10:12:12 +0000 https://tecadmin.net/?p=1437 The DNS ( Domain Name System ) is a distributed system, used for transalate domain names to IP and vice a versa. This article will help you to How to Setup Master Slave DNS Server on CentOS 6 and RHEL Systems. Network Scenario for this Setup Master DNS Server IP: 192.168.1.90 ( ns1.tecadmin.net ) Slave [...]

The post How to Setup Master Slave DNS Server on CentOS 6 and RHEL appeared first on TecAdmin.

]]>
The DNS ( Domain Name System ) is a distributed system, used for transalate domain names to IP and vice a versa. This article will help you to How to Setup Master Slave DNS Server on CentOS 6 and RHEL Systems.

Network Scenario for this Setup
Master DNS Server IP: 192.168.1.90 ( ns1.tecadmin.net )
Slave  DNS Server IP: 192.168.1.91 ( ns2.tecadmin.net )
Domain Name : demotecadmin.net   ( For Testing Purpose )
Domain IP   : 192.168.1.100  ( For Testing Purpose )
Step 1: Install Required RPMS ( at Master and Slave Both )

Install bind packages at both Master and Slave dns servers using following commands.

# yum install bind bind-chroot
Step 2: Setup Master (NS1) DNS Server

There are two types of configuration files in DNS.

  • One is main dns configuration files named “named.conf”
  • Another type of configuration file are called zone file. Which is individually created for all domains. named.conf keeps an entry for all zone files.
2.1 Configure named.conf using below configuration
# vim /var/named/chroot/etc/named.conf

Content of named.conf:

// /var/named/chroot/etc/named.conf
options {
        listen-on port 53 { 127.0.0.1; 192.168.1.0/24; };
        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; 192.168.1.0/24; };
        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 "demotecadmin.net" IN {
        type master;
        file "/var/named/demotecadmin.net.db";
	allow-update { none; };
};

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

[Change red highlighted values as per you network and domain name ]

2.2 Create a zone file for you domain “demotecadmin.net”
# vim /var/named/chroot/var/named/demotecadmin.net.db

Content of zone file:

; Zone file for demotecadmin.net
$TTL 14400
@      86400    IN      SOA     ns1.tecadmin.net. webmaster.tecadmin.net. (
                3215040200      ; serial, todays date+todays
                86400           ; refresh, seconds
                7200            ; retry, seconds
                3600000         ; expire, seconds
                86400 )         ; minimum, seconds

demotecadmin.net. 86400 IN NS ns1.tecadmin.net.
demotecadmin.net. 86400 IN NS ns2.tecadmin.net.
demotecadmin.net. IN A 192.168.1.100
demotecadmin.net. IN MX 0 demotecadmin.net.
mail IN CNAME demotecadmin.net.
www IN CNAME demotecadmin.net.
2.3 Add more domains in dns server

To add more domains in dns, create zone files individually for all domain as above. After that add any entry for all zones in named.conf like below. Change demotecadmin.net with your domain name.

zone "demotecadmin.net" IN {
        type master;
        file "/var/named/demotecadmin.net.db";
	allow-update { none; };
};
Step 2.4: Start named service

Start named (bind) service using following command and setup auto start on system boot.

# /etc/init.d/named restart
# chkconfig named on
Step 3: Setup Slave (NS2) DNS Server

At slave dns server you need to update named.conf file only. All zone files will automatically synced from master dns server. Any changes done on Master will reflect on slave after a specified time interval.

3.1 Configure named.conf using below configuration
# vim /var/named/chroot/etc/named.conf

Content of named.conf

// /var/named/chroot/etc/named.conf
options {
        listen-on port 53 { 127.0.0.1; 192.168.1.0/24; };
        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; 192.168.1.0/24; };
        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 "demotecadmin.net" IN {
	type slave;
        file "slaves/demotecadmin.net.db";
	masters { 192.168.1.90; };
};

include "/etc/named.rfc1912.zones";
Step 3.2: Start named Service

Start named (bind) service using below command.

# /etc/init.d/named restart
# chkconfig named on

After restarting named service, Check zone files on slave dns server at /var/named/chroot/var/named/slaves/.

Step 4: Finally Test Your DNS Setup

Query to your Master and Slave DNS Server directly using following commands, You will get the same resonse from both servers.
Syntax: nslookup <domainname.com> <dns server name/ip>

Query to Master DNS Server:

# nslookup demotecadmin.net 192.168.1.90

Server:         192.168.1.90
Address:        192.168.1.90#53

Name:   demotecadmin.net
Address: 192.168.1.100

Query to Slave DNS Server:

# nslookup demotecadmin.net 192.168.1.91

Server:         192.168.1.91
Address:        192.168.1.91#53

Name:   demotecadmin.net
Address: 192.168.1.100

Above outputs is showing that dns server has successfully resolved domain demotecadmin.net from master and slave dns servers.

Read more about dns servers http://en.wikipedia.org/wiki/Name_server

The post How to Setup Master Slave DNS Server on CentOS 6 and RHEL appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-setup-master-slave-dns-server-on-centos-6-and-rhel/feed/ 1
Install Cacti ( Network Graphing Tool ) on CentOS and RHEL System https://tecadmin.net/install-cacti-on-centos-rhel-systems/ https://tecadmin.net/install-cacti-on-centos-rhel-systems/#respond Sat, 18 May 2013 10:11:02 +0000 https://tecadmin.net/?p=1391 Definition from Cacti official site: Cacti is a complete frontend to RRDTool, it stores all of the necessary information to create graphs and populate them with data in a MySQL database. The frontend is completely PHP driven. Along with being able to maintain Graphs, Data Sources, and Round Robin Archives in a database, cacti handles [...]

The post Install Cacti ( Network Graphing Tool ) on CentOS and RHEL System appeared first on TecAdmin.

]]>
Definition from Cacti official site:

Cacti is a complete frontend to RRDTool, it stores all of the necessary information to create graphs and populate them with data in a MySQL database. The frontend is completely PHP driven. Along with being able to maintain Graphs, Data Sources, and Round Robin Archives in a database, cacti handles the data gathering. There is also SNMP support for those used to creating traffic graphs with MRTG.

Step 1: Set Up Apache, MySQL and PHP

In order to install cacti you required a webserver, database and PHP to work. If you have already installed it skip this step else follow below commands.

# yum install httpd httpd-devel
# yum install mysql mysql-server
# yum install php php-pear php-common php-gd php-devel php-mbstring php-cli php-mysql
Step 2: Install other Required Packages

Cacti required RRDTool to retrieve manage data ,PHP SNMP module to access data and net-snmp. Use following commands to install it.

# yum install rrdtool php-snmp net-snmp-utils p net-snmp-libs php-pear-Net-SMTP
Step 3: Start Services

Start all the required services to work with them using following commands.

# service httpd start
# service mysqld start
# service snmpd start

Configure all services to auto start on system boot.

# chkconfig --levels 345 httpd on
# chkconfig --levels 345 mysqld on
# chkconfig --levels 345 snmpd on
Step 4: Install Cacti on RHEL/CentOS Systems

Install cacti on your system using yum package manager.

# yum install cacti
Step 5: Setup MySQL database and User Accounts

Setup MySQL database and user account for cacti installation and assign priviledges to user on database.

# mysql -u root -p
mysql> create database cacti;
mysql> GRANT ALL on cacti.* to cactiusr@'localhost' IDENTIFIED BY 'SecretPassword';
mysql> FLUSH PRIVILEGES;
mysql> quit;
Step 6: Restore Cacti Database

Use below command to restore default cacti database

# mysql -u cactiusr -p cacti < /usr/share/doc/cacti-0.8.8a/cacti.sql

It may change location of cacti.sql file as per version installed of cacti. Use below command to locate file.

# rpm -ql cacti | grep cacti.sql
/usr/share/doc/cacti-0.8.8a/cacti.sql
Step 7: Edit Database Configuration File

Make below changes in cacti database configuration file to connect application with database.

# vi /etc/cacti/db.php
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiusr";
$database_password = "SecretPassword";
$database_port = "3306";
$database_ssl = false;
Step 8: Configure Aapche to Network Accessible

Edit cacti apache configuration file to make is accessible over network.

# vim /etc/httpd/conf.d/cacti.conf
Alias /cacti    /usr/share/cacti

<Directory /usr/share/cacti/>
       <IfModule mod_authz_core.c>
                # httpd 2.4
               Require host 192.168.1.0/32
       </IfModule>
       <IfModule !mod_authz_core.c>
                # httpd 2.2
               Order deny,allow
               Deny from all
               Allow from 192.168.1.0/32
       </IfModule>
</Directory>
Step 9: Enable Cacti Cron

Edit /etc/cron.d/cacti in editor and un comment following line.

# vi /etc/cron.d/cacti

*/5 * * * *     cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
Step 10: Start Cacti Web Installer.

Access Cacti url in your brower, First time it will redirect to web installer. Follow the steps as per below screenshots.

URL: http://192.168.1.190/cacti/

cacti-install-step-1

cacti-install-step-2

cacti-install-step-3

After Finish the setup, it will redirect to loign scren, use below given username and password to login. At first login it will force to change password.

Username: admin
Password: admin

Thanks for reading this article. If you get this article helpful, please don't forgot to share it.

The post Install Cacti ( Network Graphing Tool ) on CentOS and RHEL System appeared first on TecAdmin.

]]>
https://tecadmin.net/install-cacti-on-centos-rhel-systems/feed/ 0