Thursday 20 May 2010

Successfully Configured a DNS Server On Linux (Fedora 12)

Recently, I successfully configured a DNS server on my Fedora 12 Linux box. It took me weeks of reading and watching DNS related materials and tutorials. I had to watch Webmin videos on youtube and read up on Bind-9 manuals. During the course of the task, at times it got pretty frustrating because to my surprise, there isn't a one-stop tutorial on the Internet on how to setup a DNS Server. I had to read several sources scattered around all over the Internet. Every tutorial that I read seemed to be either incomplete or had a very limited scope. Anyway, in the end I got it to work and it felt really good after all was done. Even though I got it to work, it still needs a bit of tweaks here and there. I'll finish with those tweaks by next week.

After setting up DNS, I managed to configure the DHCP server as well. Configuring a DHCP server is a cake walk compared to configuring a DNS server on Fedora Core 12.

All the effort and time that went into researching DNS servers gave me an idea. Since there isn't a good tutorial available on the Internet to setup a DNS server, I thought I might write one up and publish it on my blog for personal references. It might also help out others who want to setup a DNS server on their own personal network just as I have. Just thinking about the scope of this task I know will require quite a significant amount of time.

Tuesday 27 April 2010

How To Install and Configure VNC Server on Linux (Fedora 12)

1. Run the the following command to install VNC Server.
    # yum install vnc-server
 It will most likely install tigervnc-server and that will also work for this tutorial.

2. Configure VNC Server by editing the /etc/sysconfig/vncservers file as the root user using 'vi', 'nano', or the 'gedit' editor.

     VNCSERVERS="1:data 2:picard 3:mujahid"
     VNCSERVERARGS[1]="-geometry 1280x720 -depth 16"
     VNCSERVERARGS[2]="-geometry 1024x768 -depth 16"
     VNCSERVERARGS[3]="-geometry 800x600 -depth 8"

VNC Server uses the port 5900+N for each instances. For example, for the user 'data', the port would be 5901 and for 'picard' 5902. The rest of the configuration lines define the resolution and color depth for the remote desktop.

3. Login to linux as the user you want to setup vnc instance for and type the following command to set a password for the user (eg: mujahid).
   # vncpasswd
This password would be saved in /home/mujahid/.vnc/passwd file.

4. Start the VNC-SERVER
    # service vncserver start

5. Enable VNC Server to start on boot and on all run levels
    # chkconfig vncserver on

6. Make sure you open ports 5900 and 5900+N (eg: 5903) in your fedora firewall or otherwise fedora won't let you log on.

Checkout => Setup VNC Server in Fedora by George Notaras for more user configuration.

How To Install Webmin on Linux (Fedora 12)

1. Go to webmin.com and click on the downloads link and copy the web link for the RPM for fedora.

2. Open terminal window and enter the following commands.
    # rpm --import http://www.webmin.com/jcameron-key.asc
    # yum -y install http://prdownloads.sourceforge.net/webadmin/webmin-1.510-1.noarch.rpm

3. After installing webmin then open the web browser and type the following in the address bar.
     http://localhost:10000/
    
    if your using a ssl certificate then type https://localhost:10000/ (https not http).

* A shout out to Jamie Cameron for making Linux administration such a breeze with Webmin.

Wednesday 24 March 2010

How To Install and Configure SSH On Linux (Fedora 12)

Usually SSH package is already install on fedora 12 by default. Just in case its not then follow the steps below.

1. Check to see if ssh is installed.
    # rpm -qa openssh
    openssh-5.3p1-19.fc12.i686

if not then install it with the following command.
    # yum -y install openssh

2. Run the following command as the user (eg: mujahid) you want to enable SSH for.
    # ssh-keygen -rsa
    the previous command generates a key for that user (eg: mujahid). The previous command has to be run for every user you want to enable shh

3. Start service with the command.
    # service sshd start

4. Enable ssh to start on boot and all run levels.
    # chkconfig sshd on

5. Make sure the port 22 is open on the linux's firewall or it won't allow remote logons.

You can do the same for the root user. But, I won't recommend enabling ssh for root because its not a good security practice. You can always "# su" into root from your regular user (eg: mujahid).

Tuesday 23 March 2010

How To Install nVidia Driver On Linux (Fedora 12)

Source: www.if-not-true-then-false.com

I've tried this method in two Fedora 12 machine, and looks like it is working. Nouveau has been enabled by default starting from Fedora 11 and looks like nouveau cause some problems on Fedora 12, when try to use nVidia proprietary driver.

Note: nVidia proprietary drivers on Fedora 12 does not support older cards than GeForce 6 cards.

Install nVidia driver and disable nouveau.

Step 1: Run the following commands as root. Enable access to both the free and the nonfree RPM Fusion repository.

   rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
   rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

Step 2: Update system and repositories.

   yum update

Step 3: Install kmod-nvidia or kmod-nvidia-PAE if you are using PAE (Physical Address Extension) kernel.

   yum install kmod-nvidia
                or
   yum install kmod-nvidia-PAE


Step 4:  Allow nVidia driver loading and set SElinux allow_execstack on.
 
   setsebool -P allow_execstack on


Step 5: Disable nouveau, add following to grub.conf (/boot/grub/grub.conf or /etc/grub.conf) end of the "kernel" line.

  rdblacklist=nouveau

eg.
title Fedora (2.6.31.5-127.fc12.i686)
       root (hd0,0)
       kernel /vmlinuz-2.6.31.5-127.fc12.i686 ro root=UUID=a94a89b7-e984-4c00-4447-7d45a77b124 rhgb quiet SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=en rdblacklist=nouveau
       initrd /initramfs-2.6.31.5-127.fc12.i686.img

Step 6: Reboot system.

   reboot

And finally nVidia driver should work normally.