Linux Command Test to New Hire @ Company :)

I was asked by my manager & team to compose a tiny test of Linux command line for new hire @ development. Share it here:

  1. ssh -X: what does “-X” mean?
    Answer: enable X-window forward over SSH on port 22
  2. What is “authorized_keys2“? What does 2 mean”? Where is it supposed to stay?
    Answer: enable passwordless login in SSH2 protocol in ~/.ssh/
  3. What is “createrepo Server
    Answer: to create a YUM repository in directory of “Server”
  4. How can I know detailed launched kernel in Unix?
    Answer: uname -a
  5. How can I know whether KVM package installed in Redhat and Ubuntu?
    Answer: rpm -qa | grep -i kvm and dpkg -l | grep -i kvm
  6. What does “lvcreate -L5G -n redhat VolGroup00” mean?
    Answer: to create/ new a logical volume (lv) in 5G size, named “redhat”, on top of volume group (vg) named “VolGroup00″.
  7. What does “set -o vi” mean? Where could it be run?
    Answer: to set vi editing mode in shell. Either in a BaSH shell or put it in bottom of /etc/bashrc for login shell
  8. What difference between “rpm -Uvh PACKAGE_NAME” and “yum install PACKAGE_NAME
    Answer: rpm one = install specific & particular rpm package named PACKAGE_NAME. yum install = install rpm package named PACAGE_NAME, and with associating dependent package(s) from repo.
  9. What is “yum install kvm libvirt virt-manager“? What purpose of such command?
    Answer: to install kvm libvirt virt-manager packages. To install/ enable Kernel- based Virtual Machine in Linux
  10. What does “gpg –output doc.gpg –encrypt –recipient blake@domain.org doc” mean?
    Answer: to encrypt “doc” file, by using public key of blake@domain.org, then output result into doc.gpg
  11. What is “iptables -L -n -v?
    Answer: to list (-L) firewall rules in selected chaim in iptables. -n = in numberic, -v = verbose
  12. How can I check default installed java info?
    Answer: java -fullversion
  13. How can I know default java home setting?
    Answer: echo $JAVA_HOME
  14. What is result of “lslpp -l bos.rte.libc” on AIX?
    Answer: rte = runtime environment. To tell runtime libc version, aka AIX version.
  15. What does “chkconfig xinetd off” mean?
    Answer: to disable xinetd daemon from all runlevels.
  16. What is “sysctl -w net.ipv4.ip_forward =’1′“?
    Answer: turn on IP_forward in system control. Take effective immediately without reboot.
  17. What is “tcpdump -i eth1 ‘proto UDP and (port not 53)’“?
    Answer: to capture all UDP traffic packet, but besides on port 53, in tcpdump.
  18. Describe the following block in httpd.conf?
    <virtualhost *:80>
    ServerName
    smallblue4.watson.ibm.com
    Redirect / http://spirit125.watson.ibm.com/smallblue
    </virtualhost>
    Answer: redirect all http traffic hitting smallblue4.watson.ibm.com over port 80 to spirit123.watson.ibm.com/smallblue
  19. What is “echo 0 > /selinux/enforce“?
    Answer: temporarily disable Security Enhancement Linux
  20. What is “/etc/init.d/iptables status“?
    Answer: to check iptables (firewall) running status.

Comments off

Enable WCDMA 3G Wireless @ Ubuntu 10.04

WCDMA 3G Wireless: Huawei e1750

Service Provider: China Unicom

  • Install USB driver then reboot
    sudo apt-get install usb-modeswitch
  • Go to nm-conntion-editor > Mobile Broadband > Add … >

  • Configure
    APN: uninet
    PIN: 1234

Comments off

Hypervisor Brief Intro

View of Avi Kivity By Irfan Habib, http://www.linuxjournal.com/article/9764?page=0,1

In many ways, VMware is a ground-breaking technology. VMware manages to fully virtualize the notoriously complex x86 architecture using software techniques only, and to achieve very good performance and stability. As a result, VMware is a very large and complex piece of software. KVM, on the other hand, relies on the new hardware virtualization technologies that have appeared recently. As such, it is very small (about 10,000 lines) and relatively simple. Another big difference is that VMware is proprietary, while KVM is open source.

Xen is a fairly large project, providing both paravirtualization and full virtualization. It is designed as a standalone kernel, which only requires Linux to perform I/O. This makes it rather large, as it has its own scheduler, memory manager, timer handling and machine initialization.

KVM, in contrast, uses the standard Linux scheduler, memory management and other services. This allows the KVM developers to concentrate on virtualization, building on the core kernel instead of replacing it.

QEMU is a user-space emulator. It is a fairly amazing project, emulating a variety of guest processors on several host processors, with fairly decent performance. However, the user-space architecture does not allow it to approach native speeds without a kernel accelerator. KVM recognizes the utility of QEMU by using it for I/O hardware emulation. Although KVM is not tied to any particular user space, the QEMU code was too good not to use—so we used it.

Comments off

Enable VT @ BIOS

One of my customer asked me how to reuse the old fashioned PC in their Cloud. The question leads to “How to enable VT @ BIOS?”. I wrote the following message to my customer:

Go to BIOS setting, then “Enable” or “Turn On” “Virtualization Technology” like

Source & Credit: http://publib.boulder.ibm.com/../kvminstall/kvmadvancedsetup.jpg

In Linux, here are steps to enable VT

(source: http://www.redhat.com/..VT_in_BIOS.html)

Verify the virtualization extensions are enabled in BIOS. The BIOS settings for Intel® VT or AMD-V are usually in the Chipset or Processor menus. The menu names may vary from this guide, the virtualization extension settings may be found in Security Settings or other non standard menu names.

Procedure 34.1. Enabling virtualization extensions in BIOS

Reboot the computer and open the system’s BIOS menu. This can usually be done by pressing the delete key, the F1 key or Alt and F4 keys depending on the system.

Select Restore Defaults or Restore Optimized Defaults, and then select Save & Exit.

Power off the machine and disconnect the power supply.

Enabling the virtualization extensions in BIOS

Note: BIOS steps

Many of the steps below may vary depending on your motherboard, processor type, chipset and OEM. Refer to your system’s accompanying documentation for the correct information on configuring your system.

Power on the machine and open the BIOS (as per Step 1).

Open the Processor submenu The processor settings menu may be hidden in the Chipset, Advanced CPU Configuration or Northbridge.

Enable Intel Virtualization Technology (also known as Intel VT) or AMD-V depending on the brand of the processor. The virtualization extensions may be labeled Virtualization Extensions, Vanderpool or various other names depending on the OEM and system BIOS.

Enable Intel VTd or AMD IOMMU, if the options are available. Intel VTd and AMD IOMMU are used for PCI passthrough.

Select Save & Exit.

Power off the machine and disconnect the power supply.

Run cat /proc/cpuinfo | grep vmx svm. If the command outputs, the virtualization extensions are now enabled. If there is no output your system may not have the virtualization extensions or the correct BIOS setting enabled.

Comments off

InfoSphere BigInsights

image


IBM announced new offering in Cloud http://www.ibm.com/software/data/infosphere/hadoop/

The comments from CNet:

tags: linux bi opensource hadoop cloud big apache infosphere data biginsights

Comments off

Install Ubuntu in Personal Way

One of my colleagues was impressed by the 3D desktop, driven by CompizConfig on my Ubuntu 10.04.

He then asked me how to install one on his ThinkPad T43 machine. Giving the steps:

  1. Find a 2G USB key. Click Download @ http://www.ubuntu.com/desktop
  2. You’d be given an ISO file. Then follow the step 2 & select “Create a USB stick” @ http://www.ubuntu.com/desktop/get-ubuntu/download
  3. Restart your Windows then boot from USB key
  4. From the same page you can either run Ubuntu from USB to start the installation

Comments off

Why & How do I choose Linux on Cloud with IBM Tivoli Service Automation Manager 7.2?

The debate occurs quite often on how to stack software in Cloud Computing solution (specifically Development & Test Cloud), amongst Service, Software & STG. I don’t complain the variety of software stack, as I like the more choices. I’m going to write out how my architectural solution looks.

I have one philosophy: When I could use OpenSource + Pure Blue software in my solution, I will do it without any hesitation.

IBM Development & Test Cloud solution is based upon Tivoli Service Automation Manager v7.2 for now. There’re 3 types machines in its Cloud environment. 2 of 3, in Managing environment , are Management Server & Administrative Server. The last one, in Managed environment, is the managed system(s).

My only rule to follow is to check the product infocenter, which tells the truth of technology & product. The one is http://tinyurl.com/tivsam (I talk about x only for my current engaged case @ one Telco customer in Beijing)

For Management Server, we have 2 choices on 64 bits x – RHEL5.4 or SLES10.2

For Administrative Server, SLES10.2 is ONLY our choice for Linux. Obviously Microsoft Windows isn’t in my list either. The reason is clear.

For Managed environment on x, we get rid of VMware and we have RHEL5.4 and SLES10.2 (CentOS isn’t in my list, due to lack testing & support)

To combine the above consideration, I use SuSE Linux Enterprise 10.2 in management environment and Redhat Enterprise Linux 5.4 in managed environment.

Comments off

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »