SecureCRT linux vim 颜色设置

二月 22nd, 2012

a 安装vim-enhanced包
b 修改secureCRT的属性:Options->SessionOptions ->Emulation,然后把Terminal类型改成xterm,并点中ANSI Color复选框。
c 按:进入命令模式输入syntax on也没有效果.这是因为vi没有识别你编译的文件类型
在命令模式下输入:set filetype=c
d 在/etc/profile中加入
export TERM=xterm-color
做以上几步就可以了

参考:http://hi.baidu.com/71167609/blog/item/4b939a9026600e88a977a499.html

HP BL580c G5 recommended bios settings

二月 14th, 2012

I’ve just run through all the BIOS settings I have in place on a DL380 G5 we’re using here as a vSphere pilot host (I will be using the same settings for VI3.5 in our VDI/View installation as well). Missing sections indicates that I didn’t make any changes there.

 

System Options

- Embedded Serial Port: Disabled

- Virtual Serial Port: Disabled

- Integrated Diskette Controller: Disabled

- NUMLOCK Power-On State: On

- Embedded NICs

          – NIC 1 Boot Options: Disabled

          – NIC 2 Boot Options: Disabled

- Diskette Write Control: Read Only

- Diskette Boot Control: Disabled

- Advanced Memory Protection: Advanced ECC Support

- USB Control: USB Enabled

- USB 2.0 Controller: Disabled

- USB DriveKey Boot Sequence: Internal DriveKeys First

- Power Regulator for ProLiant: OS Control Mode

 
PCI Devices

I didn’t make any changes here.

 
Standard Boot Order (IPL)

- IPL:1 Floppy Drive

- IPL:2 USB DriveKey (C:)

- IPL:3 CD-ROM

- IPL:4 Hard Drive C: (See Boot Controller Order)

 
Boot Controller Order

- Ctlr:1 PCI Slot 1 (HP Smart Array P400 Controller)

- Ctlr:2 PCI Embedded (HP Integrated PCI IDE Controller)

 
Server Availability

- ASR Status: Disabled

- ASR Timeout: 10 minutes

- Thermal Shutdown: Enabled

- Wake-On LAN: Enabled

- POST F1 Prompt: Delayed

- Power Button: Disabled

- Automatic Power-On: Enabled

- Power-On Delay: Random Delay

 
Advanced Options

- MPS Table Mode: Full Table APIC

- Processor Options

          – HW Prefetcher: Enabled

          – Adjacent Sector Prefetch: Enabled

          – No-Execute Memory Protection: Enabled

          – Intel (R) Virtualization Technology: Enabled

          – Expansion Card Caching Optimization: Disabled

          – Low Power Halt State (Intel C1E): Enabled

          – Intel Core C3 State: Enabled

          – Processor Core Disable: All Processor Cores Enabled

- Option ROM Loading Sequence: Load Option Card Devices First

- Embedded VGA Control: Automatic

- PCI-X Riser Maximum Bus Speed: Auto

 
If I make further changes, I will list them (and give the reasons for the change).

 
Regards,

The Execute Disable/No Execute CPU feature is not enabled for this machine

二月 14th, 2012

VSPHERE

在本地控制台上收到的警告消息

在计算机的系统 BIOS 中禁用了 No-Execute Memory Protection 选项的 HP 系统上或在计算机的系统 BIOS 中禁用了 Execute Disable 选项的 Dell 系统上安装 ESX 4.0 时,会出现 [未对为此计算机启用 Execute Disable/No Execute CPU 功能(The Execute Disable/No Execute CPU feature is not enabled for this machine)] 警告消息。

解决办法:在 HP 或 Dell 计算机的系统 BIOS 中分别启用 No-Execute Memory Protection 或 Execute Disable 选项。

 

Not sure if it’s the right one, but it may be talking about the memory data execution bit.  There is a enable/disable setting in your bios, under Security then Memory.  You’ll want to make sure this is enabled.  Also since this is a virtual machine you’ll want to verify VT is enabled in the bios also under CPU I think.

Pfsense双线负载均衡设置图解

二月 2nd, 2012

pfsense

http://blog.163.com/jacky_it/blog/static/16612145520110493758257/

Some Initial MPLS Reading

一月 18th, 2012

I mentioned on Twitter yesterday that I was doing some basic/introductory reading on MPLS, and someone asked what materials I was using. While I’m still very early in the process of trying to understand MPLS, I thought I might share the resources I’ve used so far in trying to wrap my head around MPLS, what it is, and the basics of how it works.

Here are some of the sites I’ve used so far:

MPLS Terminology
MPLS VPN terminology
MPLS Basics – LSR Terminology
Cisco Nexus 7000 Series NX-OS MPLS Configuration Guide
MPLS, Multi-Protocol Label Switching

As you can see, right now I’m focusing on what I call the grammar—that is, the day-to-day terminology and acronyms that are prevalent throughout any and all discussions of MPLS. Being able to recognize and know what an LSR is or what label imposition means is important and prepares me for future stages of learning. (Some people may recognize my use of “grammar” here as taken from the classical education approach.)

Even based on my limited reading so far, I’m beginning to get an idea of why MPLS can be so useful—and why MPLS can be complex. I’m looking forward to continuing my MPLS education. Resources and recommended reading are welcome in the comments!

 

PXE Booting VMware ESX 4.0

一月 18th, 2012

I recently had the opportunity to work on a proof of concept (PoC) in which we wanted to help a customer streamline the processes needed to deploy new hosts and reduce the amount of time it took overall. One of the tools we used in the PoC for this purpose was PXE booting VMware ESX for an automated installation. Here are the details on how we made this work.

Before I get into the details, I’ll provide this disclaimer: there are probably easier ways of making this work. I specifically didn’t use UDA or similar because I wanted to gain the experience of how to do this the “old fashioned” way. I also wanted to be able to walk the customer through the “old fashioned” way and explain all the various components.

With that in mind, here are the components you’ll need to make this work:

  1. You’ll need a DHCP server to pass down the PXE boot information. In this particular instance, I used an existing Windows-based DHCP server. Any DHCP server should work; feel free to use the Linux ISC DHCP server if you prefer.
  2. You’ll need an FTP server to host the kickstart script and VMware ESX 4.0 Update 1 installation files. In this case, I used a third-party FTP server running on the same Windows-based server as DHCP. Again, feel free to use a Linux-based FTP server if you prefer.
  3. You will need a TFTP server to provide the boot files. The third-party FTP server used in the previous step also provided TFTP functionality. Use whatever TFTP server you prefer.

Make sure that each of these components is working as expected before proceeding. Otherwise, you’ll spend time troubleshooting problems that aren’t immediately apparent.

Preparing for the Automated ESX Installation

First, copy the contents for the VMware ESX 4.0 Update 1 DVD—not the actual ISO, but the contents of the ISO—to a directory on the FTP server. Test it to make sure that the files can be accessed via an anonymous FTP user.

Also go ahead and create a simple kickstart script that automates the installation of VMware ESX. I won’t bother to go into detail on this step here; it’s been quite adequately documented elsewhere. You’ll need to put this kickstart script on the FTP server as well.

At this point, you’re ready to proceed with gathering the PXE boot files.

Gathering the PXE Boot Files

The first task you’ll need to complete is gathering the necessary files for a PXE boot environment.

First, copy the vmlinuz and initrd.img files from the VMware ESX 4.0 Update 1 ISO image. Since I use a Mac, for me this was a simple case of mounting the ISO image and copying out the files I needed. Linux or Windows users, it might be a bit more complicated for you. These files, by the way, are in the ISOLINUX folder on the DVD image.

Next, you’ll need the PXE boot files. Specifically, you’ll need the menu.c32 andpxelinux.0 files. These files are not on the DVD ISO image; you’ll have to download Syslinux from this web site. Once you download Syslinux, extract the files into a temporary directory. You’ll find menu.c32 in the com32/menu folder; you’ll find pxelinux.0 in the core folder. Copy both of these files, along withvmlinuz and initrd.img, into the root directory of the TFTP server. (If you don’t know the root directory of the TFTP server, double-check its configuration.)

You’re now ready to configure the PXE boot process.

Configuring the PXE Boot Environment

Once the necessary files have been placed into the root directory of the TFTP server, you’re ready to configure the PXE boot environment. To do this, you’ll need to create a PXE configuration file on the TFTP server.

The file should be placed into a folder named pxelinux.cfg under the root of the TFTP server. The filename of the PXE configuration file should be named something like this:

01-<MAC address of network interface on host>

If the MAC address of the host was 01:02:03:04:05:06, the name of the text file in the pxelinux.cfg folder on the TFTP server would be:

01-01-02-03-04-05-06

The PoC in which I was engaged involved Cisco UCS, so we knew in advance what the MAC addresses were going to be (the MAC address is assigned in the UCS service profile).

The contents of this file should look something like this (lines have been wrapped here for readability and are marked by backslashes; don’t insert any line breaks in the actual file):

default menu.c32
menu title Custom PXE Boot Menu Title
timeout 30

label scripted
menu label Scripted installation
kernel vmlinuz
append initrd=initrd.img mem=512M ksdevice=vmnic0 \
ks=ftp://A.B.C.D/ks.cfg
IPAPPEND 1

You’ll want to replace ftp://A.B.C.D/ks.cfg with the correct IP address and path for the kickstart script on the FTP server.

Only one step remains: configuring the DHCP server.

Configuring the DHCP Server for PXE Boot

As I mentioned earlier, I used the Windows DHCP server as a matter of ease and convenience; feel free to use whatever DHCP server best suits your needs. There are only two options that are necessary for PXE boot:

066 Boot Server Host Name (specify the IP address of the TFTP server)
067 Bootfile Name (specify pxelinux.0)

In this particular example, I created reservations for each MAC address. Because the values were the same for all reservations, I used server-wide DHCP options, but you could use reservation-specific DHCP options if you wanted different boot options on a per-MAC address (i.e., per-reservation) basis.

The End Result

Recall that this PoC was using Cisco UCS blades. Thus, in this environment, to prepare for a new host coming online we only had to make sure that we had a PXE configuration file and create a matching DHCP reservation. The MAC address would get assigned via the service profile, and when the blade booted then it would automatically proceed with an unattended installation. Combined with Host Profiles in VMware vCenter, this took the process of bringing new ESX/ESXi hosts online down to mere minutes. A definite win for any customer!