公告版位

目前分類:Linux (140)

瀏覽方式: 標題列表 簡短摘要

假設:

      電腦A: 使用eth1

      電腦B: Mac address為 90:00:11:8E:39:7A

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. VNC + Gnome

    step1) 安裝Gnome
    $ yum groupinstall gnome-desktop
    $ yum install gnome-session 
    $ yum groupinstall "X Window System" "GNOME Desktop Environment"


    step2) 安裝Firefox與中文支援
    $ yum install vnc vnc-server firefox x11-xorg
    $ yum install fonts-chinese


    step3)
    $ vim ~/.vnc/xstartup
    (將最後一行的「twm &」改成「gnome-session &」)




2. VNC + KDE

    step1) 安裝KDE
    $ yum install kdepim
    $ yum groupinstall "X Window System" "KDE (K Desktop Environment)"


    step2) 安裝Firefox與中文支援
    $ yum install vnc vnc-server firefox x11-xorg
    $ yum install fonts-chinese


    step3)
    $ vim ~/.vnc/xstartup
    (將最後一行的「twm &」改成「startkde &」)

dreamtails 發表在 痞客邦 留言(0) 人氣()

        由於我們在一個不穩定的架構下測試軟體,不過網路對外可是順暢的很,但......由外部的電腦確ping與ipmitool皆無法順利連上我們在測試的機器,因為這台我們的interface有做bridge. 那我們想要使用local端(KCS)使用ipmitool指令對自己host下命令,那需要如何安裝ipmitool與啟動呢? 請參照下面教學。

step1) 安裝OpenIPMI與ipmitool
# sudo apt-get install openipmi
# sudo apt-get install ipmitool

 

step2) 載入IPMI
# modprobe ipmi_msghandler
# modprobe ipmi_devintf
# modprobe ipmi_si

 

step3) 看自己local端的BMC資訊
# ipmitool lan print

dreamtails 發表在 痞客邦 留言(0) 人氣()

step 1) 建立一個6G的空檔os.img

$ dd if=/dev/zero of=/root/os.img bs=1M count=6144

 

step 2) 將此6G空檔轉換成ext3的img格式

$ mke2fs -t ext3 -m 0 /root/os.img

dreamtails 發表在 痞客邦 留言(0) 人氣()

開機時若出現,以下訊息
=================================
Give root password for maintenance
(or type Control-D to continue):
================================= 

 

可以重新mount / 看看是否可以解決!

$ mount -o remount,rw /

dreamtails 發表在 痞客邦 留言(0) 人氣()

我們需要使用到Linux command: sshpass

到此下載並自行安裝:http://sourceforge.net/projects/sshpass/

用法:

$ sshpass -p <密碼> ssh <使用者>@<主機> <指令>

dreamtails 發表在 痞客邦 留言(0) 人氣()

$ yum install -y rdesktop

$ rdesktop -a 16 192.168.1.1

   -a 16的意思是指畫面用16-bit 顯示

dreamtails 發表在 痞客邦 留言(0) 人氣()

一、安裝與設定VNC Server

Step 1) 安裝vnc-server package

(此為CentOS 5.5安裝package方式)
[root]$ yum install -y vnc-server

(此為CentOS 6.2安裝package方式)
[root]$ yum install -y tigervnc-server

dreamtails 發表在 痞客邦 留言(0) 人氣()

一、YUM Server環境建置:

Step 1) 下載mirrordir套件安裝

mirrordir:http://pkgs.repoforge.org/mirrordir/

 

Step 2) 下載yum-arch套件安裝(自動產生headers資料夾)

yum-arch:http://rpm.pbone.net/index.php3/stat/4/idpl/4852179/com/yum-arch-2.2.2-2.el5.noarch.rpm.html

 

Step3) 安裝createrepo套件(建立索引檔用)

$ yum install -y createrepo

 

Step 4) 安裝並啟動httpd套件

$ yum install -y httpd

 

dreamtails 發表在 痞客邦 留言(1) 人氣()

dreamtails 發表在 痞客邦 留言(0) 人氣()

以下資料來源參考自:
(1) http://ssorc.tw/?p=198
(2) http://blog.yam.com/keynes0918/article/31351174

 

環境:
(1) Windows AD Server:
                                   Homename:AD.COM
                                   IP Address:10.100.99.99
(2) CentOS 6.2 x64:
                                   Homename:HH-AABBCCSS
                                   IP Address:10.100.1.1 (以下設定並未用到)

(3) 需要一組用來驗證AD Server的一般使用者帳號(A12345)/密碼(以下範例使用的非管理者administrator帳號/密碼,而是一般使用者)。

dreamtails 發表在 痞客邦 留言(0) 人氣()

使用檔案系統格式為Ext3, 預設OS會開啟ACL功能,但現在我們要mount一個新的磁區,就需要另外開啟ACL功能,方法如下:

(1) mount -t ext3 -o remount,acl /

(2) vim /etc/fstab

--------------------------------------------------------------
 /dev/sdb1    /mnt     ext3    defaults,acl    1    0
--------------------------------------------------------------

dreamtails 發表在 痞客邦 留言(0) 人氣()

step 1) $ yum install -y setuptool ntsysv system-config-*

dreamtails 發表在 痞客邦 留言(0) 人氣()

一、名詞定義與必要packages:

      (1) Server為Monitoring Host
           - $ yum install -y httpd php gcc glibc glibc-common \
                gd gd-devel openssl openssl-devel

           - nagios-3.4.1.tar.gz (Nagios Core)
           - nagios-plugins-1.4.15.tar.gz (Nagios plugins)
           - nrpe-2.13.tar.gz (NRPE)

      (2) Client為Remote Host
           - $ yum install -y httpd php gcc glibc glibc-common \
                gd gd-devel openssl openssl-devel xinetd

           - nagios-plugins-1.4.15.tar.gz (Nagios plugins)
           - nrpe-2.13.tar.gz (NRPE)

dreamtails 發表在 痞客邦 留言(0) 人氣()

step 1. $ yum install xfsprogs*

step 2. $ yum install xfsdump

step 3. $ fdisk /dev/sdc

                n → Enter

                p → Enter

                1 → Enter

                Enter → Enter → w

 

step 4. $ mkfs -t xfs -f /dev/sdc1

dreamtails 發表在 痞客邦 留言(0) 人氣()

若我們要用IOZone來測試mount在/mnt/iscsi下的iSCSI磁區benchmark, 指令可以如下:

Example 1:
$ iozone -Rab output.xls -i 0 -i 1 -i 2 -y 4K -q 2M -n 4K -g 2G -S 8M -+u -f /mnt/iscsi/iotest.file -z

Example 2:
$ iozone -Rb output.xls -r 4K -s 2G

dreamtails 發表在 痞客邦 留言(0) 人氣()

$ yum install -y sysstat

$ iostat -d -m -t 2 10

dreamtails 發表在 痞客邦 留言(0) 人氣()

$ time ls > output.txt 2>&1

註:一定要加"2>&1"才會將時間寫入output.txt喔!

dreamtails 發表在 痞客邦 留言(0) 人氣()

$ time ls

real 0m0.007s
user 0m0.006s
sys 0m0.001s

dreamtails 發表在 痞客邦 留言(0) 人氣()

step1. 使用RHEL/CentOS光碟開機.

step2. 在進入光碟畫面後,按「F5」進入Rescue mode.

step3. 接著在Command Line下輸入「linux rescue」.

step4. 進入一連串的設定中,我通常不會啟動Networking,然後其他選向接選預設值.

step5. 接著會進入光碟Rescue mode的OS中, 要下「chroot /mnt/sysimage」.

step6. 然後再下指令「fsck -y -A -f」

step7. 修復完成後重開機就ok了.

 

注意:step5很容易忘了做,而找不到/etc/fstab, 要小心^^

dreamtails 發表在 痞客邦 留言(0) 人氣()