C'est la vie

| Value driven software development

50+ Mac Applications with Great Interface

http://www.usingmac.com/2009/12/15/50-beautiful-mac-applications

8 二月 2010 at 01:05 - Comments

The Ultimate Toolbox for iPhone Development

The Ultimate Toolbox for iPhone Development

iPhone development can be intimidating, especially to someone who’s unfamiliar with Macs, or the way iPhone apps work.

But with currently more than 100,000 apps officially available from the App Store, it’s kind of hard for a developer to ignore the potential market the iPhone provides.

And there are apps for virtually anything you could think of, from games to productivity apps to horoscopes to news and more.

Below are 70 tools, tutorials, and resources to help you get started developing your own iPhone apps. There’s everything from basic tutorials to templates to resource libraries to help you on your way.

Tutorials

How to Get Started with iPhone Dev
A very thorough article on how to start developing your own iPhone apps.

Learn How to Develop for the iPhone
An excellent tutorial from Tuts+ that covers the development of websites specifically for the iPhone or iPod Touch.

First iPhone Application
This post from iPhone SDK offers an extensive overview of how to develop your first basic iPhone application.

How I Wrote an iPhone Application
This article gives a first-hand account of building an iPhone app, including the thought process behind development and some code snippets.

Cocoa Touch Tutorial: iPhone Application Example
This tutorial covers how to develop Cocoa iPhone apps using Interface Builder to quickly build your first application.

Sliding UITextFields Around to Avoid the Keyboard
This tutorial covers the basics of moving text fields around on an iPhone app so that they don’t interfere with the on-screen keyboard.

Develop iPhone Web Applications with Eclipse
A very comprehensive article from IBM on using Eclipse to develop your iPhone apps.

iPhone Development with PHP and XML
Another article from IBM on developing apps, this time with PHP and XML.

Developing iPhone Applications Using Ruby on Rails and Eclipse
The first in a series of articles from IBM on using Ruby on Rails and Eclipse to develop iPhone apps.

Your First iPhone Application
A tutorial for creating your first app, from the official Apple iPhone OS Reference Library.

How to Make an iPhone Application on XCode
A simple video tutorial that shows you how to build an iPhone app on XCode.

iPhone SDK Development Tutorial – First Step Towards the App Store
Another great video tutorial that shows the first steps in building apps for the app store using XCode.

Make an iPhone App Using the Envato API
A great tutorial from Tuts+ that shows you how to use the Envato Marketplace API to develop your own iPhone apps.

Building PhotoKast: Creating an iPhone App in One Month
This photo tutorial shows you the complete process of building an iPhone app, with illustrations.

Perfect Multi-Column CSS Liquid Layouts: iPhone Compatible
This tutorial shows you how to build liquid CSS layouts that are iPhone compatible.

iPhone Dev Sessions: How to Make an Orientation-Aware Clock
This tutorial covers how to build an orientation-aware clock, which provides great insight into building any app that is orientation-aware.

iPhone SDK: Interface Builder Tutorial
A very short, simple intro to how the Interface Builder works.

Parsing XML Files
This tutorial from iPhone SDK offers all the information you need for parsing XML files within applications on the iPhone.

iPhone Gaming Framework: Stage 1 Tutorial
This tutorial shows you how to get your basic screen management system running so you can start developing iPhone games.

iPhone Game Programming Tutorial: Part 1
Here’s a complete tutorial for creating a Pong-like iPhone game.

So You’re Going to Write an iPhone App…
This tutorial gives a great overview of the app development process and some things to consider while developing.

Advanced iPhone Development
This article looks at some more advanced aspects of iPhone application development.

Building an iPhone App in a Day
A brief look at what it takes to build an iPhone app really quickly.

Build an iPhone Webapp in Minutes with Ruby, Sinatra and iUI
An overview of fast development techniques for iPhone webapps.

Finding iPhone Memory Leaks: A “Leaks” Tool Tutorial
Learn how to find memory leaks in your iPhone apps using the “Leaks” tool.

iPhone Application Development, Step by Step
A great, step-by-step look at the app development process.

iPhone App Development: Where to Start
A great article that talks about iPhone app development from the perspective of someone who’s never done any Apple or Mac development (or even used a Mac) previously.

Parsing XML on the iPhone
Another great look at how to parse XML within iPhone apps.

iPhone Development Central
This site offers a huge variety of video tutorials for iPhone developers, broken down for beginner, intermediate and advanced developers.

iPhone SDK Tutorial: Reading Data from a SQLite Database
A simple tutorial for using SQLite with the iPhone SDK.

iPhone Dev Sessions: Create a Navigation-Based Application
This comprehensive tutorial shows you how to create a navigation-based application from XCode.

iPhone SDK Tutorial: Build a Simple RSS Reader for the iPhone
This tutorial shows you how to build a simple RSS feed reader from the ground up.

Multi Touch Tutorial
This tutorial gives a great introduction to the iPhone’s multi touch interface.

Howto: iPhone Application Development Environment
This tutorial shows how one developer set up their app development environment, with tips for setting up your own.

iPhone Application Programming
Downloadable lectures from Stanford’s iPhone Application Programming class.

Introduction to iPhone Application Development
Downloadable course materials from a one-week MIT course on iPhone app development.

iPhone Programming Tutorial – Using openURL to Send Email from Your App
This tutorial shows you how to use openURL to allow your apps to send email.

How to Create Your first iPhone Appllication
Another comprehensive tutorial for creating your first iPhone app from the ground up.

Tools

PhoneGap
PhoneGap speeds up app development for developers who already know HTML and JavaScript but also want to take advantage of the core features of the iPhone SDK.

Morfik
Morfik is a downloadable tool that speeds up development of rich internet apps.

iPhone GUI PSD 3.0
A set of downloadable Photoshop files with iPhone GUI images.

iPhone PSD Vector Kit
A PSD set that comes with several button elements as well as six different iPhone interface options.

iPhone Wire Frames
iPhone Wire Frame stencil files for use with OmniGraffle.

Yahoo! Design Stencil Kit
A downloadable package of UI stencils from Yahoo! that includes iPhone images.

iPhone UI Vector Elements
Downloadable vector images of different iPhone elements.

Three20
A library of open source iPhone app elements and frameworks.

gdata-objectivec-client
The Google Data API’s Objective-C client library.

Are You iPhoned?
A simple site that checks to see if you’re visiting from an iPhone and gives you the code to do the same on your own sites.

31 iPhone Applications with Source Code
A library of more than thirty iPhone apps with their source code available.

iPhone Samples
Sample UI elements for the iPhone.

iUI: iPhone User Interface Framework
A free UI framework for Safari development on the iPhone.

35 Free Icon Sets for your iPhone
35 icon sets you can download and use in your iPhone development.

TestiPhone.com – iPhone Simulator
An iPhone simulator for testing your iPhone web apps.

iPhoney
Another simulator for testing your iPhone web apps.

Resources and Articles

iPhone Dev Connection
Apple’s official iPhone development site.

The Darker Side of iPhone App Development
An article that covers some of the restrictions and limitations imposed by Apple for iPhone apps.

Avoiding iPhone App Rejection From Apple
A great article that tells you how to not get rejected by the App Store.

14 Essential XCode Tips, Tricks and Resources for iPhone Devs
A roundup of some great developer resources.

iPhoneDevForums
An iPhone/iPod touch development discussion forum aimed to assist fellow developers as they code in Apple’s SDK. There is also a job board where developers and entrepreneurs can share and discover one another’s services to start projects of their own.

iCodeBlog
The iCodeBlog has tons of great articles, news, and tutorials related to iPhone development.

iPhoneWebDev
An iPhone developer resource center and community.

iPhone Toolbox
A blog that covers news, apps, and more related to the iPhone.

iPhone Open Application Development
O’Reilly Media’s iPhone application development book.

iPhone Web Application Submission
The official place to submit your iPhone web applications.

iPhone Application and Website Development: All Tools and Tutorials You Need
A huge roundup of resources for developing both iPhone apps and optimized websites.

iPhone Dev SDK Forum
A great forum for getting answers to your iPhone SDK development questions.

iPhone Application Developer Interview
An interview with iPhone app developer Darren Andes, the developer of the Baby Tracker: Nursing app.

Seven Things all iPhone Apps Need
An overview of some must-have features for iPhone apps.

5 Free Resources for iPhone App Development
A roundup of some handy, free resources for developing your iPhone apps.

Top 10 Tutorials to Develop iPhone Apps
A ranked listing of great iPhone development tutorials.

100 Free Courses and Tutorials for Aspiring iPhone App Developers
A huge list of iPhone development courses, many from traditional universities.

29 iPhone App & Website Development Resources and Tutorials Places
Another excellent roundup of iPhone development resources.

2 二月 2010 at 09:51 - Comments

100 Free Courses & Tutorials for Aspiring iPhone App Developers

100 Free Courses & Tutorials for Aspiring iPhone App Developers

Unless you’ve been living under a rock, you know that the iPhone is a big deal and it’s one of the most popular subjects of development these days. Lots of developers are creating their own iPhone apps, and with the right know-how, you can too. Check out our list of courses and tutorials to learn everything that’s important about developing for the iPhone.

University

Here you’ll find iPhone development courses offered by top universities.

  1. iPhone Application Programming: Learn about programming for the iPhone from Stanford on iTunes. [Stanford]
  2. Introduction to iPhone Application Development: Use this course’s posted slides to get a crash course in iPhone application development. [MIT]

Apple Resources

You can learn about iPhone development straight from the source with these Apple documents.

  1. Getting Started with iPhone: Here you’ll find a general introduction to iPhone development. [Apple]
  2. Object-Oriented Programming with Objective-C: This document offers an excellent guide for object oriented programming. [Apple]
  3. Networking & Internet Coding How-Tos: In this resource, you will find lots of great advice for networking and Internet development on the iPhone. [Apple]
  4. Getting Started with Audio & Video: Use this document to get started with audio and video features in iPhone applications. [Apple]
  5. Your First iPhone Application: This introductory tutorial offers a step by step description of getting started with an iPhone application. [Apple]
  6. Getting Started with Performance: This guide offers an introduction to improving the performance on iPhone apps. [Apple]
  7. iPhone Application Programming Guide: Get an introduction to the iPhone OS and development process. [Apple]
  8. iPhone OS Technology Overview: Learn about the iPhone OS and its technologies from this guide. [Apple]
  9. Getting Started with Data Management: Here you’ll find a reference that will help you with data management. [Apple]
  10. Security Overview: Get an understanding of the security concepts on the iPhone from this resource. [Apple]
  11. Performance Overview: Get a look at the factors that determine performance through this guide. [Apple]
  12. Resource Programming Guide: Check out this resource to learn how to work with nib and bundle resources.
  13. Getting Started with User Experience: This document offers an introduction to constructing iPhone application user interfaces. [Apple]
  14. iPhone Human Interface Guidelines: Follow these guidelines to make sure your iPhone app has a good human interface. [Apple]
  15. iPhone Development Guide: Use this development guide to get an introduction to creating web apps on the iPhone. [Apple]
  16. Data Formatting Programming Guide for Cocoa: This guide will teach you how to use Cocoa formatters for data. [Apple]
  17. Getting Started with Tools: You will find a guided introduction to the Xcode toolset from this document. [Apple]
  18. Data Management Coding How-tos: Get answers to common data management coding questions. [Apple]
  19. Introduction to Cocoa Application Tutorial: You’ll need at least a base level understanding of Cocoa for iPhone development, which you can check out in this tutorial. [Apple]
  20. Core Animation Programming Guide: Follow this guide to get the main components and services of Core Animation. [Apple]
  21. Coding Guidelines for Cocoa: In this guide, you’ll learn about naming guidelines for the Cocoa API as well as design advice. [Apple]
  22. Getting Started with Graphics and Animation: Follow this guide for an introduction to 2D and 3D graphics and animation. [Apple]
  23. Learning Objective-C: A Primer: Check out this document once you’ve worked through object oriented programming and Cocoa. [Apple]
  24. Cocoa Fundamentals Guide: You’ll learn about the basic concepts, terminology, and more in Cocoa from this guide. [Apple]
  25. Graphics and Animation Coding How-Tos: In this resource, you’ll find lots of great tips and advice for graphics and animation on the iPhone. [Apple]

Getting Started

Get an introduction to iPhone development through these tutorials.

  1. iPhone App Development-Where to Start: This tutorial will teach you how to get started in iPhone app development. [The Daleisphere]
  2. Bootstrap: Learn a few pointers for iPhone development from this resource. [furbo]
  3. Learn How to Develop for the iPhone: This tutorial will show you how to build an alternate page and style sheet for the iPhone. [NETTUTS]
  4. iPhone Application Development, Step By Step: In this tutorial, you will find a step by step guide to creating a simple iPhone game. [Open Laszlo]
  5. First iPhone Application: Get a brief introduction to creating your first iPhone application. [iPhone SDK Articles]
  6. iPhone Dev: Check out this PDF to get a tutorial for iPhone development. [Lucas Newman]
  7. iPhone App Development for Web Hackers: Use this tutorial to learn about geo-location features and beginner development tips. [How to Iphone Application]
  8. How to Write an iPhone App: This tutorial gives you a basic look at what it takes to write an iPhone application. [Webmonkey]
  9. iPhone App Development for Web Hackers: In this article, you’ll learn about web hacking development for the iPhone. [Dominiek]
  10. Writing Your First iPhone Application: Bill Dudney will walk you through all of the tools and pieces of knowledge you’ll need to write your first iPhone application. [The Pragmatic Bookshelf]
  11. Cocoa Touch Tutorial: iPhone Application Example: This tutorial will show you how to make a very basic Cocoa Touch application with Interface Builder. [Cocoa Is My Girlfriend]
  12. Building an iPhone app in a day: Check out this tutorial to see how you can build a useful app quickly. [The Bakery]
  13. Seven Things All iPhone Apps Need: Check out this list to see what’s essential when creating an iPhone app. [APCmag]
  14. Put Your Content in My Pocket: Learn how to use the iPhone web browser to your advantage from this article. [A List Apart]
  15. iPhone Training Course: Become a master at writing iPhone applications through this course. [Rose India]
  16. So you’re going to write an iPhone app…: Learn about code reuse, memory, and more from this tutorial. [furbo]
  17. Learn How to Develop for the iPhone: Check out this tutorial to see how to build an alternative page and style sheet for the iPhone. [Net Tuts]
  18. Developing for the iPhone: This resource will show you how to develop ASP.NET applications for the iPhone. [Dot Net Slackers]
  19. Getting Started with iPhone Development: Ed Burnette offers a basic introduction to iPhone development. [ZDnet]

Tools

These tutorials will teach you how to use specific tools in order to create iPhone apps.

  1. Make an iPhone App Using the Envato API: Make your own iPhone app with the Envato API with the help of this tutorial. [Net Tuts]
  2. Developing iPhone Applications using Ruby on Rails and Eclipse: Learn how to detect mobile Safari from a Ruby on Rails application through this tutorial. [IBM]
  3. 14 Essential Xcode Tips, Tricks and Resources for iPhone Devs: Learn how to make sense of xcode with this helpful resource. [Mobile Orchard]
  4. Develop iPhone Web Applications with Eclipse: This tutorial will help you learn how to create iPhone applications with Aptana’s iPhone development plug-in. [IMB]
  5. Build an iPhone Webapp in Minutes with Ruby, Sinatra, and iUI: You can learn how to quickly put together an iPhone app with these tools. [Mobile Orchard]
  6. iPhone Development with PHP and XML: In this tutorial, you’ll get a look at developing custom applications for the iPhone. [IBM]

Details

These tutorials cover all of the important details in iPhone app development.

  1. Avoiding iPhone App Rejection from Apple: This tutorial holds the secrets to making sure your iPhone app makes the cut. [Mobile Orchard]
  2. Landscape Tab Bar Application for the iPhone: Follow this tutorial to learn about making the tab bar application support landscape orientation. [Cocoa Is My Girlfriend]
  3. iPhone Programming Tutorial-Using openURL to Send Email from Your App: This tutorial explains how you can send email through applications, and even pre-fill fields. [iCode]
  4. Multi Touch Tutorial: This tutorial will show you how you can respond to a tap event. [iPhone SDK Articles]
  5. Create a Navigation-Based Application: This tutorial will teach you how to create and run a navigation-based application from XCode.
  6. Advanced iPhone Development: Go beyond the basics with this iPhone development tutorial. [Dot Net Slackers]
  7. Here’s a Quick Way to Deal with Dates in Objective C: Get information on dealing with date fetching through this tutorial. [Howtomakeiphoneapps]
  8. Navigation Controller + UIToolbar: Through this tutorial, you can learn how to add a UIToolbar to an app. [iPhone SDK Articles]
  9. iPhone Asynchonous Table Image: Follow this thorough article to learn about loading multiple images in your iPhone app in an asynchonous manner. [Markj]
  10. Localizing iPhone Apps-Internationalization: You can use resource files to display text in a user’s language-learn how in this tutorial. [iPhone SDK Articles]
  11. Tutorial: JSON Over HTTP on the iPhone: With this tutorial, you’ll get a step by step how-to for JSON web services through an iPhone app. [Mobile Orchard]
  12. Parsing xml on the iPhone: This tutorial will show you how to parse XML using the iPhone SDK. [Craig Giles]
  13. Reading data from a SQLite Database: Here you’ll find a quick tutorial for reading data from a SQLite database. [dBlog]
  14. How to Make an Orientation-Aware Clock: Through this tutorial, you’ll learn about building a simple, orientation-aware clock. [The Apple Blog]
  15. Finding iPhone Memory Leaks: Carefully find iPhone memory leaks by using this tutorial. [Mobile Orchard]
  16. Localizing iPhone Apps: MAke sure that your iPhone app is properly formatted according to a user’s native country or region with the help of this tutorial. [iPhone SDK Articles]
  17. OpenAL Audio Programming on iPhone: Here you’ll get code snippets, learning, and more. [Gehaktes]
  18. 9 iPhone Memory Management Links and Resources: Here you’ll find a variety of iPhone memory management resources that can help you get things under control. [Mobile Orchard]
  19. Parsing XML Files: Get an understanding of how you can parse XML files with this tutorial. [iPhone SDK Articles]

User Interface

These tutorials are all about the user interface and interaction.

  1. UITableView-Drill down table view tutorial: Check out this tutorial to learn how to make a drill down table view. [iPhone SDK Articles]
  2. iPhone Coding-Learning About UIWebViews by Creating a Web Browser: In this tutorial, you’ll learn about UIWebViews through the creation of a browser. [iCode]
  3. Design Patterns on the iPhone: Check out David Choi’s guest lecture on user interface design for the iPhone. [New Jersey Institute of Technology]
  4. UITableView-Adding subviews to a cell’s content view: This tutorial will show you how to customize the UITableViewCell. [iPhone SDK Articles]
  5. Drill down table view with a detail view: Learn how to load a different detail view on the UITabBarController. [iPhone SDK Articles]
  6. Extending the iPhone’s SDK’s UIColor Class: Learn how to extend the iPhone SDK UIColor class, and get code samples from this article. [Ars Technica]
  7. UITableView: Learn how to make a simple index for the table view with this tutorial. [iPhone SDK Articles]

Building Tutorials

Check out these tutorials where you’ll build a specific app, and learn more about iPhone development along the way.

  1. Build a Simple RSS Reader for the iPhone: Get walked through the creation of an RSS reader for a simple feed on the iPhone. [The Apple Blog]
  2. iPhone Gaming Framework: This article offers a look at writing code for iPhone game developers. [Craig Giles]
  3. Build a Simple RSS Reader for the iPhone: Follow this tutorial, and you’ll learn about building a simple iPhone RSS reader.
  4. iPhone Game Programming Tutorial: This multipart tutorial offers a way to learn OpenGL and Quartz for iPhone development. [iCode]
  5. Build your very own Web browser!: Follow this tutorial to learn about the process of building your own iPhone web browser. [dBlog]
  6. iPhone application development, step by step: Find out how to build the iPhone application NEWSMATCH using OpenLaszlo. [OpenLaszlo]
  7. Building an Advanced RSS Reader using TouchXML: Get step by step information for creating an advanced iPhone RSS reader from this tutorial. [DBlog]
  8. iPhone SDK Tutorial: Building an Advanced RSS Reader Using TouchXML: This tutorial will help you learn more about iPhone development by building an advanced RSS reader with TouchXML. [dBlog]

Videos

Watch these videos for a visual guide to iPhone app development.

  1. Basic iPhone Programming: Check out this video to get started with iPhone programming. [iPhone Dev Central]
  2. First Step Towards the App Store: Work towards getting your app in the app store with the help of this tutorial. [You Tube]
  3. Hello World: This tutorial will help you learn the basics of iPhone programming. [iPhone Dev Central]
  4. UITableView iPhone Programming Tutorial: Watch this video to learn how to populate a UITableView. [YouTube]
  5. iPhone App Tutorial 1: Check out this video to quickly learn about Interface Builder. [YouTube]
  6. iPhone IB-Your First App: Watch this tutorial to learn how to use the Interface Builder. [iPhone Dev Central]
  7. Understanding Source Code: Learn how to get started with development on the iPhone through this video tutorial. [YouTube]
  8. How to Make an iPhone App: Create an iPhone app using Jiggy and this tutorial. [YouTube]
  9. iPhone Development with Dashcode: Find out how to develop iPhone applications with Dashcode through this tutorial. [YouTube]

Development Resources

These resources are not courses or tutorials, but they are incredibly valuable resources for beginner iPhone app developers.

  1. iPhone Open Application Development: This book will teach you how to create software for the iPhone environment. [Safari Books Online]
  2. iPhone GUI PSD File: Use this set to get a comprehensive, editable library of iPhone UI assets. [Teehanlax]
  3. 31 iPhone Applications with Source Code: Teach yourself how to create iPhone apps by taking a look at the code in these. [Mobile Orchard]
  4. iPhoney: Using iPhoney, you’ll be able to see how your creation will look on the iPhone. [Market Circle]
  5. 35 Free iPhone Icon Sets: Check out this resource to find a great variety of iPhone icons.
31 十二月 2009 at 21:40 - Comments

7枚Google Wave提名邀请

google wave 邀请7枚

要的留言吧~

12 十一月 2009 at 11:07 - Comments

bind on RHEL 5

两台服务器

主机名 off.for5.com.cn ip 192.168.1.154 (主)
主机名 on.for5.com.cn ip 192.168.1.153 (从)

1. 下载软件:
ftp://ftp.isc.org/isc/bind9/

2. 解压安装:
./configure –prefix=/usr/local/named –enable-threads //将bind安装到指定的目录
make //编译
make install //编译安装

3.
cd /usr/local/named //进行bind目录
sbin/rndc-confgen > etc/rndc.conf //生成密匙文件
cd /usr/local/named/etc
tail -10 rndc.conf | head -9 | sed s/#\ //g > named.conf //在当前etc目录生成named.conf文件打开/usr/local/named/etc/named.conf文件
添加以下文件:
key “rndc-key” {
algorithm hmac-md5;
secret “j4TzPFdh8r6b+QVY2VXWvw==”;
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { “rndc-key”; };
}; //系统生存的密匙,用自动生成的,将下面的添加

options {
directory “/var/named”; //域名文件存放的绝对路径
pid-file “named.pid”; //如果bind启动,自动会在/var/named目录生成一个named.pid文件,打

开文件就是named进程的ID
};

zone “.” IN {
type hint; //根域名服务器
file “named.root”; //存放在/var/named目录,文件名为named.root
};

zone “localhost” IN {
type master; //类型为主域名服务器
file “localhost.zone”; //本地正向解析的文件
allow-update { none; };
};

zone “0.0.127.in-addr.arpa” IN {
type master; //类型为主域名服务器
file “named.local”; //本地反向解析的文件
allow-update { none; };
};

zone “for5.com.cn” IN { //建立for5.com.cn域
type master;
file “for5.zone”; //for5.com.cn域映射IP地址可在此文件编写
allow-update { none; };
};

zone “1.168.192.in-addr.arpa” in { //反向解析
type master;
file “for5.local”; //存放反向解析的文件
allow-update { none; };
};

4.打下依次建立这些区域文件
mkdir /var/named
cd /var/named
vi named.root //根域名服务器的存放位置

named.root内容是不定期更新的,最新的内容都是去ftp://rs.internic.net/domain/下载
或者用 dig命令直接生成 dig > named.root

5. vi localhost.zone //建立本地解析文件,vi可以用gedit或其它编辑器代替
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

1D IN NS @
1D IN A 127.0.0.1

vi named.local //建立本地反解析文件

$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.

1 IN PTR localhost.

vi for5.zone //建立要解析的域名
$ttl 1D
@ IN SOA for5.com.cn. root.for5.com.cn. (

1053891162
3H
15M
1W
1D )

IN NS for5.com.cn.
IN MX 5 for5.com.cn.
off IN A 192.168.1.154 //将off.for5.com.cn域名指向192.168.1.154
on IN A 198.182.1.153

vi for5.local //建立for5.com.cn域的反向解析
$TTL 86400
@ IN SOA for5.com.cn. root.for5.com.cn.(
20031001;
7200;
3600;
43200;
86400);
@ IN NS test.com.
154 IN PTR off.for5.com.cn. //说明:154为IP最后一位
153 IN PTR on.for5.com.cn.

5.修改本地DNS,将服务器改为自己的IP
vi /etc/resolv.conf
nameserver 192.168.1.154 //从的改为153
:wq //保存退出

6.启动name

/usr/local/named/sbin/named -g //加入参数-g,可以实时查看named的状态及错误

/usr/local/named/sbin/named -c /usr/local/named/etc/named.conf &

7.测试:用命令host,host,nslookup,dig
ping off.for5.com.cn
host off.for5.com.cn
nslookup
off.for5.com.cn
dig off.for5.com.cn

反向解析测试:
host 192.168.1.154
dig 192.168.1.154
nslookup 192.168.1.154

从的配置:

安装跟主的一样,不同的就是named.conf
named.conf内容:

key “rndc-key” {
algorithm hmac-md5;
secret “80hKqo5bkGMAqHqeAlaLCA==”;
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { “rndc-key”; };
}; //自动生成的key

options {
directory “/var/named”;
pid-file “named.pid”;

};

zone “.” IN {
type hint;
file “named.root”;
};

zone “localhost” IN {
type master;
file “localhost.zone”;
};

zone “0.0.127.in-addr.arpa” IN {
type master;
file “named.local”;
};

zone “for5.com.cn” IN {
type slave;
file “for5.zone”;
masters { 192.168.1.154; };
};

zone “1.168.192.in-addr.arpa” IN {
type slave;
file “for5.local”;
masters { 192.168.1.154; };
};

注:
1、主从同步的两台机器要在同一个时区,时间相差不要太大。
2、主的dns服务器在修改了正向解析文件跟反向分解析文件时,要修改相应的 serial(通常是加数值,这个值必须主的要大于从的,要不同步不了)

将bind添加到开机自动启动,免得每次重启后都得手动开启
vi /etc/rc.d/rc.local
添加 /usr/local/named/sbin/named

4 十一月 2009 at 13:08 - Comments