DNS Server Syntax Checking

0 comments

Checking named.conf file syntax once you have updated the named.conf file some times server will not start/run because some syntax errors like spaces, dots etc. Unnaccearsly in the named.conf file. Its very diffucult to find where is the error in named.conf files. So for that we can use

named-checkconf #named-checkconf configurationfileloc

Example : #named-checkconf /var/named/chroot/etc/named.conf

When you execute above command it should show errors if any according to line number, so its very much easy to check where we did the mistake. Checking Zone file(both forword and reverse)

Syntax : #named-checkzone domainname zonefileloc

Example : #named-checkzone example.com /var/named/chroot/var/named/example.frd example.frd is my forword zone file for my domain example.com

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Kernel Recompilation

    2 comments

    Here I am giving some steps how to complie kernel? By default RedHat will not support the ntfs partitions mounting. So we will do kernel recompilation and get the job done.

    Step1 : Before Compiling the kernel the following packages should be installed in order to compile kernel
    a. Glib-devel
    b. Gcc
    c. Ncurscs-devel
    d. Binutils
    e. Kernel-sourcecode

    Step2 : Download the latest kernel from http://www.kernel.org/ and copy the .tar.bz2 file to /usr/src folder
    #cd /usr/src
    #wget
    http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.4.tar.bz2
    #ls

    Here you have to see the downloaded file from the kernel.org

    Step3 : Now unzip the compressed kernel in the same folder it self
    #tar xvfj linux-2.6.25.4.tar.bz2
    #ls
    Now here you will find a folder with name
    linux-2.6.25.4
    #cd linux-2.6.25.4

    Step4 : If you have compiled any kernels previously first you have to clear any unwanted enteris in source kernel
    #make mrproper

    Step5 : Before recompiling the new kernel we have to take the backup of the old kernel in order to restore it. If in case you face any issues with the new kernel
    #make oldconfig
    This backed up kernel configs are stored in /usr/src/kernel/.config

    Step6 : So now every thing is fine the left part is to compile kernel, to do that we have to execute the following command
    #make menuconfig

    About this command : Actually kernel have so many modules(like process management, memory management, network management, filesystem management, device managemn) etc, So this command will give a menu kind of list where you can select the different modules.

    Linux kernel is Modular kernel, so all the management parts what I have discussed will not be loaded in to kernel at once, The menu will show some check marks.

    Type1 : Square brackets []
    If you want the module to be part of kernel select it

    For example :

    [*] indicates yes
    []
    indicates
    no

    And this <> type of brackets are used to mention wether that option should be a module or built in.

    For example :

    < > for a feature indicates that feature is not included in the kernel
    the feature is inculeded in kernel but it’s a module.
    <*>the feature is inculeded in kernel as a built in feature.

    So when you execute the above command you will get a menu in this menu select the filesystem->ntfs file system. And save it (here I am giving clear idea about how to select the filesystem type you do your R&D work and get the things done).

    Step7 : So now we have to compile this kernel with added features and to create a bz image file
    #make

    Note : This step will take more time say some 15 to 30 min depends on the features you have selected

    Step8 : Once again we have to say to kernel which are reloadable modules by executing the following command
    #make modules_install

    Step9 : Now we have to execute the follwing command to copy this kernel image to /boot and edit the grub.conf file so that from next boot
    #make install
    That’s it its done

    Some links for your additional :

    http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html
    http://www.nongnu.org/lpi-manuals/lpi-102/html/ch01s03.html
    http://www.netbsd.org/docs/guide/en/chap-kernel.html
    http://www.geekcomix.com/cgi-bin/classnotes/wiki.pl?UNIX02/Kernel_Recompilation

  • Like the post? Please Subscribe to free RSS feed to get updates
  • How To Install YUM Server In Redhat(RHEL5)

    0 comments

    In linux you can install packages through many ways like.
    1. Through RPM,
    2. Through shell script
    3. Through source tar balls etc.

    YUM(Yellow-dog Updater and Modifier) is another and advanced way of installing the packages in Linux distros such as Red-hat, Fedora.

    In RHEL4 installing packages is a tedious process, some times its headache to install all the dependencies. So Red-hat people come with a solution to overcome this problem in most situations, i.e. nothing but YUM implementation which will resolve this dependency issue. Here I am going to present some basic way how to use YUM utility to install packages locally(there are so many ways to install packages from different sources such as ftp, http etc). You can get the full details about YUM in my google docs here. One Two Three Four Five Six Seven Eight Nine Ten

    Basic YUM implementation locally:
    Step1 :
    Copy the entire OS cd's content to Hard-drive as below.

    #cp -ar /media/cdrom/* /destinationfolder

    Example : #cp -ar /media/cdrom/* /var/ftp/pub

    Note :

    1. From second cd on words no need to copy entire cd contents to drive just copy Server content in to drive.

    2. Here please take destination folder as /var/ftp/pub so that we can implement FTP server to share our reposatory.

    3. If you have RHEL5 DVD then just continue with second step.

    #cp -ar /media/cdrom/Server/* /var/ftp/pub/Server/

    Step2 : Now change the directory to /destinationfolder/Server and install the createrepo package #rpm -ivh createrepo.0.4.4-2 --aid

    Step3 : Specify the reposatory location to YUM.

    #createrep -v /destinationfolder/

    Step4 : Create a file with repo as extention and specify the YUM details in /etc/yum.repos.d folder

    #cd /etc/yum.repos.d/ #vi testing.repo

    Note : The directory /etc/yum.repos.d/ contaions two .repo files which should be moved or removed to other directory, so that YUM server will check default .repo file it self. The new file which is created contains as follows

    [station1.example.com]

    comment ="test"

    baseurl=file:///destinationfolder

    gpgcheck=0

    After entring these entries save and exit from the file.

    Let me explain what acutally this four entries mean.

    [station1.example.com] ==>This informs what is the reposatory name.

    Comment ==> Its used to see the inforamtion about the repo.

    Baseurl ==> This is the server and path of the repo(here its a local repo so the base url is just a file:///

    For example you are creating YUM server through FTP then base url should be like this

    baseurl=ftp://station1.example.com/pub/Server gpgcheck ==> This is to check the authentication of the repository, which is disabled in this case.

    Local YUM repository is created, now you can install any package you want with yum command. In order to know more about YUM, Please see man pages for YUM.

    Basic YUM Server Reposatory through FTP server :
    So what about Installing packages remotly by using this reposatory?

    Let us see how to configure client to access this repository. Before doing client configuration we have to share this reposatory through FTP or HTTP.

    Step1 : Install vsftpd server on server

    #yum install vsftpd

    Step2 : Start the ftp service and on it

    #service vsftpd restart

    #chkconfig vsftpd on

    Thats it on the server side every thing configured properly, Now move on to client machine Confugration on client side :

    Step3 : Remove/move the local reposatory file from /etc/yum.repo.d/ folder to some other location #mv /etc/yum.repo.d/* /safe-loc/

    Step4 : Create server.repo file in /etc/yum.repo.d/ with following contents [station1.example.com]

    comment ="test"

    baseurl=ftp://station1.example.com/pub/Server

    gpgcheck=0

    Save and exit the file Now start using yum to install packages, as follows.

    #yum install packagename

    Example : #yum install httpd

    To uninstall a package through YUM

    #yum remove httpd

    To see the info of a package

    #yum info packagename

    To see the package is already installed or not

    #rpm -qa grep packagename

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here