create iso from dvd:
dd if=/dev/dvd of=/var/www/html/centos/CENTOS5.iso

mount iso “into” an accessible directory
mount -o loop /var/www/html/centos/CENTOS5.iso /var/www/html/centos/src/

make an iso from a directory
mkisofs -o /path/to/directory.iso /path/to/directory/

label_txt.autoSize = TextFieldAutoSize.NONE — The default. No resizing.

label_txt.autoSize = TextFieldAutoSize.LEFT — Will automatically resize the textfield and left-align the text.

label_txt.autoSize = TextFieldAutoSize.CENTER — Will automatically resize the textfield and center the text.

label_txt.autoSize = TextFieldAutoSize.RIGHT — Will automatically resize the textfield and right-align the text.

NOW=$(date +”%b-%d-%y-%H-%M”)

#back everything up
tar -czvf /home/user/archives/$NOW.tgz /home/user/htdocs
mysqldump –user=user –password=XXXXX –opt some_database > /home/user/archives/some_database.$NOW.sql

#get the new content
scp -r user@example.com:/home/vhosts/user/htdocs/* /home/remotefiles/htdocs
mysqldump -h remotedata.com –user=user –password=XXXXX somedatabase | mysql -h localhost –user=user –password=XXXXX some_database

yum install bind bind-utils bind-libs bind-chroot caching-nameserver system-config-bind

Open the file /var/named/chroot/etc/named.conf and add the following lines to the global options section:

forwarders { xxx.xxx.xxx.xxx; xxx.xxx.xxx.xxx; }; #IP of upstream ISP nameserver(s)
forward only; #rely completely on our upstream nameservers

if named.conf doesn’t exist and it didn’t on mine run system-config-bind it will create it.

chmod 644 named.conf

Check the syntax using the named-checkconf utility provided by the bind RPM:
named-checkconf named.conf

Modify the /etc/resolv.conf file to the following:
nameserver 127.0.0.1

If you are running a DHCP server on your router make sure your /etc/resolv.conf file does not get overwritten whenever your DHCP lease is renewed. To prevent this from happening, modify /etc/sysconfig/network-scripts/ifcfg-eth0 (replace eth0 with your network interface if different) and make sure the following settings are set:

BOOTPROTO=dhcp
PEERDNS=no
TYPE=Ethernet

Go ahead and start the nameserver as root and configure to start in runlevels 2-5:
service named start
chkconfig named on

If you are running a firewall on the nameserver system, make sure clients have access to port 53. An example iptables rule for the 192.168.15.0/24 subnet would be:

iptables -A INPUT -s 192.168.15.0/24 -p udp –dport 53 -j ACCEPT

service iptables save

#!/bin/bash
#
# iptables example configuration script
#
# Flush all current rules from iptables
#
iptables -F
#
# Allow SSH connections on tcp port 22
# This is essential when working on remote servers via SSH to prevent locking yourself out of
the system
#
iptables -A INPUT -p tcp –dport 22 -j ACCEPT
#
# Set default policies for INPUT, FORWARD and OUTPUT chains
#
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
#
# Set access for localhost
#
iptables -A INPUT -i lo -j ACCEPT
#
# Accept packets belonging to established and related connections
#
iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
#
# Save settings
#
/sbin/service iptables save
#
# List rules
#
iptables -L -v

© 2012 James Border Suffusion theme by Sayontan Sinha