Archive for July, 2011

Linux DNS: creating a subdomain.

Here I have chosen to use a separate zone file for my subdomain. This is not the only way to do this, but it is the way I did it. I did this in CentOs 5.x.

One using it own zone file:
vi /var/named/chroot/etc/named.conf

zone “mydomain.com” in {
type master;
file “mydomain.com.zone”;
allow-transfer { xxx.yyy.zzz.aaa ; bbb.ccc.ddd.eee ; };
};

// Begin MyDomain.com Subdomains
zone “subdomain.mydomain.com” in {
type master;
file “subdomain.mydomain.com.zone”;
allow-transfer { xxx.yyy.zzz.aaa ; bbb.ccc.ddd.eee; };
};
// End MyDomain.com Subdomains

vi /var/named/chroot/var/named/subdomain.mydomain.com.zone
$ORIGIN .
$TTL 86400 ; 1 day
subdomain.mydomain.com IN SOA ns1.subdomain.mydomain.com. root.localhost.subdomain.mydomain.com. (
201002224 ; serial
7200 ; refresh (8 hours)
7200 ; retry (2 hours)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)

$ORIGIN subdomain.mydomain.com.
NS ns1.subdomain.mydomain.com.
NS ns2.subdomain.mydomain.com.
IN MX 10 mail1.subdomain.mydomain.com.
IN MX 20 mail2.subdomain.mydomain.com.
IN A xxx.yyy.zzz.aaa
ns1 IN A xxx.yyy.zzz.aaa
ns2 IN A bbb.ccc.ddd.eee
mail1 IN A xxx.yyy.zzz.aaa
mail2 IN A bbb.ccc.ddd.eee
host1 IN A xxx.yyy.zzz.aaa
host2 IN CNAME host1.subdomain.mydomain.com.

Delete a Windows user’s local profile

Right click on Computer and go to Properties.
Click Change Settings .
In the System Properties dialog box, click the Advanced tab.
Under User Profiles , click Settings .
In the User Profiles dialog box, select the profile that you want to delete, click Delete , and then click OK .

Locate and then expand the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

Right-click the SID that you want to remove, and then click Delete .

Log on to the computer and create a new profile.

VMware ESXi and Windows 2008 R2 Cluster in a box

Software: VMware ESXi 4.1 Update 1, Windows 2008 R2.
Cluster Members: VMCLMEM01, VMCLMEM02.
Cluster Name: CL01.

In the vSphere client, you need to create a virutal network to support the cluster heartbeat communication.
Click on your ESXi host, and then the Configuration tab.
Select Networking under Hardware.
Then Add Networking…
Connection Type: Virtual Machine
Create a virtual switch.
Network Label: Private

Create new virtual machine from the vSphere Client:
Options:
Typical
Name: VMCLMEM01
Datastore
Guest Operating System: Windows 2008 R2
Create a Disk:
Disk Size: 20GB
Disk Provisioning: “Support clustering features such as Fault Tolerance.”
Check “Edit the virtual machine settings before completion.”
Add…
Hard Disk (For the cluster quorum disk)
“Create a new virtual disk”
Disk Size: 2GB.
Disk Provisioning:
“Support clustering features such as Fault Tolerance.”
Virtual Device Node:
SCSI (1:0) # You need to chose a different SCSI controller than the one you used for the system disk (My system disk in on SCSI (0:0).
Select the newly added SCSI controller, and select “Virtual”
Add…
Ethernet Adapter
E100
Network label: Private
Connect at power on
Remove the Floppy.
Configure CD to connect to the installation source (I used an ISO stored in one of my datastores.).

Create the second cluster member from the vSphere Client:
Options:
Typical
Name: VMCLMEM02
Datastore
Guest Operating System: Windows 2008 R2
Create a Disk:
Disk Size: 20GB
Disk Provisioning: “Support clustering features such as Fault Tolerance.”
Check “Edit the virtual machine settings before completion.”
Add…
Hard Disk (For the cluster quorum disk)
“Use an existing virtual disk.”
Browse the 2GB virtual disk you created for VMCLMEM01 and select it.
Virtual Device Node:
SCSI (1:0) # You need to chose a different SCSI controller than the one you used for the system disk (My system disk in on SCSI (0:0).
Select the newly added SCSI controller, and select “Virtual”
Add…
Ethernet Adapter
E100
Network label: Private
Connect at power on
Remove the Floppy.
Configure CD to connect to the installation source (I used an ISO stored in one of my datastores. Make sure you check “Connect at power on.”).

Install the Windows Server 2008 R2 Enterprise Full in VMCLMEM01 on the 20GB virtual disk. The 2GB disk will not be used until the cluster software is install and configured. Do not start the VMCLMEM02 installation yet. Complete the installation (network, name, time synchronization screen resolution of at least 1024/x768, and join the domain). Don’t forget to assign an IP address to the second interface (I used 10.1.1.1 and 10.1.1.2, and I renamed the interfaces to Private.). The cluster members need to be joined to a domain. I believe the same domain.

Shutdown down VMCLMEM01, and install Windows Server 2008 R2 Enterprise Full on VMCLMEM02 as you did on VMCLMEM01.

Once Windows is installed and the cluster members joined to the domain, all logins will be using the domain Administrator account.

Once Windows is installed and configured on both future cluster members, shutdown down VMCLMEM02 and boot VMCLMEM01 and login with domain Administrator account.

Bring quorum disk (2GB) online:
Start a command prompt by right mouse clicking on “Command Prompt” and selecting “Run As Administrator.”
DISKPART
SELECT DISK 1 # See my post on DISKPART for more information.
SAN POLICY=ONLINEALL
ATTRIBUTES DISK CLEAR READONLY
ONLINE DISK

Bring up Computer Management, and click on Disk Manager:
Click on Ok to initialize Disk1.
NTFS Format Disk 1, and assign it a drive letter (I chose M.) and label QuorumDisk.
Add the “Failover Clustering” Feature from Server Manager.

Boot the second cluster member, and add the “Failover Clustering” Feature from Server Manager.

Bring up “Failover Cluster Manager”on VMCLMEM01.
Right mouse click on “Failover Cluster Manager” and choose “Create Cluster.”
Add VMCLMEM01.
Add VMCLMEM02.
Run validation test.
Run all tests.
Enter your cluster name (CL01), and IP address for the cluster.

This will get you virtual Windows 2008 R2 cluster running on one ESXi host. Now you can add any supported cluster services and applications. I set up file and print services, as well as IIS which I will document later.

Enable application and daemon core dumps in RHEL6.

To enable core file creation for daemons:

# vi /etc/security/limits.conf
…
#* soft core 0
* soft core unlimited
…

# vi /etc/sysctl.conf
…
kernel.core_pattern = /tmp/core-%e-%s-%u-%g-%p-%t
fs.suid_dumpable = 2
…

# vi /etc/sysconfig/init
…
DAEMON_COREFILE_LIMIT=’unlimited’
…

# sysctl -p

To enable core dumps for xinetd services, I just needed to install the Automatic Bug Report Tool (abrt), and start the service:

# yum install abrt-desktop

# service abrtd start

Some command line commands:
# abrt-cli –list
# abrt-cli –report crash_id

Return top

INFORMATION