jueves, 23 de octubre de 2014

How to Setup Master Slave DNS Server on CentOS 6 and RHEL

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.

sábado, 4 de octubre de 2014

How to Build a Low-Cost Budget Racer for Under Three Grand

Have you ever fantasized about finding a cheap used bike and fixing it up? Join the club! An amazing number of hard-core racers are taking this low-cost avenue to racing happiness. Used bikes used to be hot commodities, but time-bomb four-strokes made the typical used bike a pariah to be feared. Now the return of two-strokes has made used bikes cool again. It could be the perfect option for newcomers to the sport, seasoned motocross racers or anyone on a tight budget.
It may sound easy—buy a used bike, throw in a piston and rings and live happily ever after—but sadly this is not always the case. Used-bike buying can be a frightening undertaking, but with a few smart decisions and a little elbow grease, you could have a capable and reliable race bike on your hands for less than you think.
The MXA wrecking crew has fixed up more than its share of beaters for friends and family in the past. We have learned the pitfalls, so for this low-cost budget YZ139, we decided to take a well-used Yamaha YZ125 and turn it into something to be proud of. It is a given that we wanted to illustrate an affordable way to get into the sport of motocross. In a lot of ways, that's even more appealing than an uber-expensive bike because it's attainable.
Our project Yamaha YZ125 was found on Craigslist. It was a 2005 YZ125, and the seller, who was a casual trail rider, from what we could tell, hardly rode the bike over its seven-year existence and was asking $1700. A day later, with L.A. Sleeve's Mark Kalpakoff doing the negotiating for us, $1500 changed hands. Kalpakoff was not just going to be MXA's negotiator but our facilitator as well. Mark was our go-to man to get the job done.
Rather than waste time throwing a piston, rings and gaskets at the 2005 Why-Zed, we decided to go big. Since every European-based two-stroke (KTM, TM and Husqvarna) builds 144cc versions of their 125s, we thought that going big on our 2005 YZ125 was a good idea. What made it a sweet deal was that we planned to rebuild the top end anyway, so for just a few extra smackers we could punch out the bore and gain three horsepower. Going bigger is the cheapest way to gain power, and L.A. Sleeve just happens to make a YZ139 sleeve kit. The sleeve is made using centrifugal spin casting and utilizes molybdenum disulfide to reduce piston friction and help the ring seal. The sleeve costs $115 and L.A. Sleeve charges $170 for the installation.
We were on a roll thanks to Mark and L.A. Sleeve, because just a year ago, L.A. Sleeve branched out into the piston business with the L.A. Piston Company (LAPC). Their 139cc big-bore piston features a single ring for low friction and under-crown micro-machining for a uniformed deck thickness. It also features a proprietary "ProMalloy" skirt and dome surface coating that aids in initial wear and break in. The piston costs $115. It should be noted that the larger piston requires L.A. Sleeve's $65 power-valve modification for clearance on the stock YZ power valve.
L.A. Sleeve's standard big-bore kits are spec'ed for standard compression and 91-octane pump gas. However, if you want to take it a step further, they offer high-compression head mods and porting that require a minimum of 100-octane gasoline. The MXA wrecking crew went this route, but for ease of use and increased reliability, we recommend the pump gas head. L.A. Sleeve's head mod costs $100 and involves rechambering and reshaping the head to get the proper piston clearance and combustion pattern. The port job costs $275 and involves setting the proper heights and widths of the exhaust, intake and transfer ports by hand. Other miscellaneous expenses included a new top-end needle bearing ($16) and a complete top-end gasket kit ($25). Up to this point, we have the heart of a full-race engine (some assembly required) for $881.
Around this time the MXA wrecking crew had been testing a Scalvini cone pipe on our 2012 KTM 125SX, so it was only natural that we get a Scalvini for our budget YZ139. The handmade cone pipe is a real eye-catcher. Cone pipes cost a little more than the typical stamped expansion chambers, but they look like they cost more. The Scalvini pipe costs $279 and the silencer costs $175. We also added a Moto Tassinari VForce3 reed cage for $148. The final engine expense was a larger mainjet and pilot jet.
One of the downsides of going as back as 2005 for our used bike is that Yamaha didn't switch to Kayaba SSS suspension until 2006. Given the nature of the previous-generation Kayaba bumper forks and seven years of use, we had Precision Concepts freshen up the suspension and go one step stiffer on the fork and shock springs. A basic fork and shock revalve would cost $358. Adding oil, seals and miscellaneous parts, the total revalve and labor before the spring installation was $500. The springs cost $230 on top of that (if you are under 150 pounds, you won't need the springs).
There were a few accessories that we added to our YZ139 to make it look, feel and fit better. These included an SDG nine pleated seat cover, Pro Taper SE handlebars ($65), RC Edition grips ($8), Pro Taper rear sprocket ($66), and a new ARC Composite clutch lever and perch assembly ($190). For the sake of the cosmetics, we got custom graphics and fresh plastic from MXPlastics for $464.
Since we have a KTM 150SX, TM 144 and Husqvarna CR144 in our stable, the MXA wrecking crew was able to make direct comparisons at a bunch of SoCal tracks, including Glen Helen, Racetown, Gorman and Competitive Edge. In switching back and forth with a standard YZ125, our L.A. Sleeve-built YZ139 felt like a tractor in comparison. By no means did the bike have the torque or breadth of a 250F, but the power was very usable by 125 two-stroke standards. When we stepped up to comparing it to the Euros 150s, we found that it was competitive against them. It suffered a little against the KTM 150SX, especially on top, but was a decent match for the Husky and TM.
As for its prowess against 250cc four-strokes, it didn't entirely close the performance gap, but it gained a big chunk of ground. As long as test riders carried momentum and stayed on top of the powerband, they could keep pace with 250Fs down medium-length straights and small hills. On longer straights and bigger hills, 250Fs would pull away, but test riders felt like they could negate some of that advantage with the ability to go into turns hotter on the much lighter two-stroke.
Our YZ139 took a lot less clutch work to stay on the powerband than a traditional 125, but that didn't mean that the bike didn't have traditional two-stroke snappiness. Going with a big-bore kit always brings the fear that it will change the character of the powerband for the worse. The L.A. Sleeve YZ139 still had a quick-hitting, free-revving two-stroke feel. Every test rider loved holding the throttle to the stop and wringing it out through soft turns. Nothing makes a rider feel like a hero more than being flat out on a 125, and the YZ139's big, on-the-pipe window and a supple Precision Concepts-tuned suspension made it easier to keep it pinned. The slightly firmer-than-stock suspension setup suited riders who are bigger than the average minicycle transplant or the more aggressive riders. Precision Concepts did a good job in achieving a modern-feeling fork.
We started this project to build a low-cost budget racer. We spent more money than the average person would on the same project because we felt compelled to research all of the options. If we had stayed true to the original theme and forgone some of the trickery, we could have cut the cost significantly. With only the basic engine mods, suspension revalving and initial cost of the bike, we could have achieved a solid, well-refreshed bike for $2900. As it was, MXA spent $5097 (for bike and parts).
The worst trend in modern motocross is the increasing difficulty for people to participate in our wonderful sport due to cost. MXA's project YZ139 was designed to illustrate that you can have a fun, competitive, cool race bike without having to break the bank in Monte Carlo.
For more information on this kit, go to http://www.lasleeve.com

From Motocross Action Magazine (motocrossactionmag.com). Article and images copyright Motocross Action Magazine. Used by permission.
- See more at: http://www.lasleeve.com/news1/how-to-build-a-low-cost-budget-racer-for-under-three-grand#sthash.HAPvRKXG.dpuf


Fuente:
http://www.lasleeve.com/news1/how-to-build-a-low-cost-budget-racer-for-under-three-grand