Thursday, June 2, 2016
Configure DHCP in Linux
First Go to the rpm directory where dhcp rpm is stored
# rpm -ivh dhcp-version-number.rpm
# vim /etc/dhcpd.conf
and then paste the following lines in that file
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.100;
option domain-name-servers 192.168.1.1;
option domain-name "yourdomain.com";
option netbios-name-servers 192.168.1.1;
option routers 192.168.1.1; #Default Gateway Address
option broadcast-address 192.168.1.255;
default-lease-time 2678400;
max-lease-time 2878400;
}
#To fix an IP Address
host computername {
hardware ethernet 00:50:da:65:07:74;
fixed-address 192.168.1.51;
}
save and exit the file
# service dhcpd start
# service dhcpd status
if "service is running" message appears then you have successfully configured the Dhcp Server. Now enable the clients to get IP from dhcp server by typing command
# setup
Then select Network configuration
and Select your LAN Card
Check the dhcp option by pressing spacebar and then quit and restart the network service
# service network restart
to permanently ON the dhcp service at startup, type command
# chkconfig --level 35 dhcpd on
Feel free for any further queries
Regards
Muhammad Farrukh`
# rpm -ivh dhcp-version-number.rpm
# vim /etc/dhcpd.conf
and then paste the following lines in that file
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.100;
option domain-name-servers 192.168.1.1;
option domain-name "yourdomain.com";
option netbios-name-servers 192.168.1.1;
option routers 192.168.1.1; #Default Gateway Address
option broadcast-address 192.168.1.255;
default-lease-time 2678400;
max-lease-time 2878400;
}
#To fix an IP Address
host computername {
hardware ethernet 00:50:da:65:07:74;
fixed-address 192.168.1.51;
}
save and exit the file
# service dhcpd start
# service dhcpd status
if "service is running" message appears then you have successfully configured the Dhcp Server. Now enable the clients to get IP from dhcp server by typing command
# setup
Then select Network configuration
and Select your LAN Card
Check the dhcp option by pressing spacebar and then quit and restart the network service
# service network restart
to permanently ON the dhcp service at startup, type command
# chkconfig --level 35 dhcpd on
Feel free for any further queries
Regards
Muhammad Farrukh`
Enabling NTFS Support in Linux
This SOP of NTFS support in linux is especially for NEWBIES.
Method#1 A most simple procedure is to install kmod-ntfs through yum. Remember you must have yum-repository for kmod-ntfs installed and copy the commands withour #
# yum install kmod-ntfs
then run the mount command e.g:
# mount /dev/sda1 /mnt/NtfsDrive
sda1 is XpWindowsDrive which can be different in your case, so replace sda1 accordingly. while /mnt/NtfsDrive is mount point, you can define it according to your needs.
Method#2 If you find yourself unlucky in Step#1, then don't worry just follow this this Method.
just download 2 RPMS from the given links
http://rpm.pbone.net/index.php3/stat/4/idpl/11207076/com/fuse-2.7.3-61.2.i386.rpm.html
http://rpm.pbone.net/index.php3/stat/4/idpl/8449517/com/ntfsprogs-2.0.0-3.i586.rpm.html
Go to the directory where rpms have been downloaded and run commands in the given order
# rpm -ivh fuse-2.7.3-61.2.i386.rpm
# rpm -ivh ntfsprogs-2.0.0-3.i586.rpm
Now mount your NTFS drive by the following command. See Method#1 for sda1 and /mnt/NtfsDrive descriptions
# ntfsmount /dev/sda1 /mnt/NtfsDrive
Note: ntfsmount command is used to mount NTFS drives, but to unmount these drives we will use traditional umount command. Congratulations you have successfully enabled NTFS support
To mount NTFS drives permanently just add an entry in /etc/fstab file as follows
# vim /etc/fstab
/dev/sda1 /mnt/NtfsDrive ntfs defaults 0 0
after saving /etc/fstab, restart your Linux Box and enjoy.
Oh ho.. you didn't find any success? No problem
put a # sign in start of ntfs entry in /etc/fstab and save the file, now follow these commands
# vim /etc/rc.d/rc.local
modprobe fuse
ntfsmount /dev/sda1 /mnt/NtfsDrive -o force
now save the file and exit.
You can also make a simple script instead of adding entries in rc.local
I put an example for KDE lovers
# vim /root/.kde/Autostart/mount.sh
Below is the context of script
*********************************************
#!/bin/sh
modprobe fuse
ntfsmount /dev/sda1 /mnt/NtfsDrive -o force
*********************************************
now by saving the script by pressing ESC button and then typing :wq!
just make that script executable
# chmod +x mount.sh
OR # chmod 777 mount.sh
Now restart your machine and enjoy.
Do Inform me in case of any succes/failure.
Best Regards
Muhammad Farrukh`
Method#1 A most simple procedure is to install kmod-ntfs through yum. Remember you must have yum-repository for kmod-ntfs installed and copy the commands withour #
# yum install kmod-ntfs
then run the mount command e.g:
# mount /dev/sda1 /mnt/NtfsDrive
sda1 is XpWindowsDrive which can be different in your case, so replace sda1 accordingly. while /mnt/NtfsDrive is mount point, you can define it according to your needs.
Method#2 If you find yourself unlucky in Step#1, then don't worry just follow this this Method.
just download 2 RPMS from the given links
http://rpm.pbone.net/index.php3/stat/4/idpl/11207076/com/fuse-2.7.3-61.2.i386.rpm.html
http://rpm.pbone.net/index.php3/stat/4/idpl/8449517/com/ntfsprogs-2.0.0-3.i586.rpm.html
Go to the directory where rpms have been downloaded and run commands in the given order
# rpm -ivh fuse-2.7.3-61.2.i386.rpm
# rpm -ivh ntfsprogs-2.0.0-3.i586.rpm
Now mount your NTFS drive by the following command. See Method#1 for sda1 and /mnt/NtfsDrive descriptions
# ntfsmount /dev/sda1 /mnt/NtfsDrive
Note: ntfsmount command is used to mount NTFS drives, but to unmount these drives we will use traditional umount command. Congratulations you have successfully enabled NTFS support
To mount NTFS drives permanently just add an entry in /etc/fstab file as follows
# vim /etc/fstab
/dev/sda1 /mnt/NtfsDrive ntfs defaults 0 0
after saving /etc/fstab, restart your Linux Box and enjoy.
Oh ho.. you didn't find any success? No problem
put a # sign in start of ntfs entry in /etc/fstab and save the file, now follow these commands
# vim /etc/rc.d/rc.local
modprobe fuse
ntfsmount /dev/sda1 /mnt/NtfsDrive -o force
now save the file and exit.
You can also make a simple script instead of adding entries in rc.local
I put an example for KDE lovers
# vim /root/.kde/Autostart/mount.sh
Below is the context of script
*********************************************
#!/bin/sh
modprobe fuse
ntfsmount /dev/sda1 /mnt/NtfsDrive -o force
*********************************************
now by saving the script by pressing ESC button and then typing :wq!
just make that script executable
# chmod +x mount.sh
OR # chmod 777 mount.sh
Now restart your machine and enjoy.
Do Inform me in case of any succes/failure.
Best Regards
Muhammad Farrukh`
Thursday, September 13, 2012
Latest Technology Vidoes (CBTs)
Keep yourself updated by watching latest technology videos in Urdu and Howtos in English
http://www.linuxurducbts.com/urducbts-section-by-babar-zahoor.html
http://www.linuxurducbts.com/urducbts-section-by-babar-zahoor.html
Wednesday, September 12, 2012
LDAP-Samba: An Alternative to Microsoft Active Directory
Subscribe to:
Posts (Atom)