2012年12月16日 星期日

[研究] MRTG 2.17.4 快速安裝程式(tar.gz)(CentOS 6.3 x86)

[研究] MRTG 2.17.4 快速安裝程式(tar.gz)(CentOS 6.3 x86)

2012-12-16
Shau-Rong Lu

MRTG官方安裝方法
http://oss.oetiker.ch/mrtg/doc/mrtg-unix-guide.en.html

# mrtg-2.17.4.tar.gz_install.sh
echo -e "\033[31;42m ********** Install mrtg-2.17.4.tar.gz on CentOS 6.3 x86 ********** \033[0m"
echo -e "\033[31m 2012/12/16 ********** \033[0m"
echo -e "\033[31m by Shau-Rong Lu ********** \033[0m"

# Check SELinux status
if  [ "`grep SELINUX=disabled /etc/selinux/config`" == "" ]; then

# disable SELinux now
/usr/sbin/setenforce 0

# disable SELinux after every reboot
# echo "/usr/sbin/setenforce 0" >> /etc/rc.local  

#or
# disable SELinux always
sed -i -e "s@SELINUX=enforcing@#SELINUX=enforcing@"   /etc/selinux/config
sed -i -e "s@SELINUX=permissive@#SELINUX=permissive@"   /etc/selinux/config
sed -i -e "/SELINUX=/aSELINUX=disabled"   /etc/selinux/config
fi

# Kill yum on running...
ProcessID="`ps aux | grep yum | awk '{print $2}' `"
for i in $ProcessID
do
  echo $i
  kill -9 $i
done

# ************************************************

yum  -y  install gcc perl gd libpng zlib httpd net-snmp net-snmp-utils  gd-devel libpng-devel zlib-devel wget

echo "view systemview included .1.3.6.1.2.1.2.2.1.10"  >>  /etc/snmp/snmpd.conf
echo "view systemview included .1.3.6.1.2.1.2.2.1.16"  >>  /etc/snmp/snmpd.conf
service snmpd restart

cd /usr/local/src
wget http://oss.oetiker.ch/mrtg/pub/mrtg-2.17.4.tar.gz
tar  zxvf   mrtg-2.17.4.tar.gz
cd  mrtg-2.17.4
./configure --prefix=/usr/local/mrtg-2
make
make install

mkdir /var/www/html/mrtg

# 產生 /etc/mrtg.cfg

/usr/local/mrtg-2/bin/cfgmaker  --global 'WorkDir: /var/www/html/mrtg'  --global 'Options[_]: bits,growright'  --output /etc/mrtg.cfg  community@localhost.localdomain
echo "Target[eth0]: 2:public@127.0.0.1"  >>  /etc/mrtg.cfg
echo "MaxBytes[eth0]: 1250000"  >> /etc/mrtg.cfg
echo "Title[eth0]: Traffic Analysis"  >> /etc/mrtg.cfg
echo "PageTop[eth0]: <H1>127.0.0.1 eth0</H1>"  >> /etc/mrtg.cfg

# 根據 /etc/mrtg.cfg 內容,產生基本圖片

env LANG=C /usr/local/mrtg-2/bin/mrtg /etc/mrtg.cfg
env LANG=C /usr/local/mrtg-2/bin/mrtg /etc/mrtg.cfg
env LANG=C /usr/local/mrtg-2/bin/mrtg /etc/mrtg.cfg

# 根據 /etc/mrtg.cfg 內容,產生首頁

/usr/local/mrtg-2/bin/indexmaker /etc/mrtg.cfg > /var/www/html/mrtg/index.html

# 設定排成,每5分鐘產生一次新圖片

echo "*/5 * * * *  root env LANG=C /usr/local/mrtg-2/bin/mrtg /etc/mrtg.cfg  --logging /var/log/mrtg.log"   >>  /etc/crontab

echo  "*/5 * * * * root env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg  > /dev/null 2>&1   " >>  /etc/crontab

# 開放其他主機瀏覽

sed -i -e "s@Deny from all@#Deny from all@" /etc/httpd/conf.d/mrtg.conf

service httpd restart
firefox http://localhost/mrtg &



snmpd.conf 的 systemview 數值意義請參考
http://oss.oetiker.ch/mrtg/doc/mrtg-mibhelp.en.html

mrtg.cfg 中  public 前面的數字可用下面偵測, 一般 eth0 代號是 2
[root@localhost ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0c:29:65:0f:5f brd ff:ff:ff:ff:ff:ff
3: sit0: <NOARP> mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0


PS: 開放其他機器查詢

vim  /etc/httpd/conf.d/mrtg.cfg
找到
<Location /mrtg>
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1
    # Allow from .example.com
</Location>
增加允許瀏覽 MRTG 的機器或網段
<Location /mrtg>
    Order deny,allow
    Deny from all

    Allow from 192.168.100.100
    Allow from 172.16
    Allow from 192.168.128.0/255.255.255.0
    Allow from 10.1.0.0/16

    Allow from 127.0.0.1
    Allow from ::1
    # Allow from .example.com
</Location>
重新啟動 httpd 讓設定生效
service httpd restart

(完)

參考


[研究] MRTG 2.17.4 安裝(tar.gz)(CentOS 6.3 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=79225

[研究] MRTG 2.17.2安裝(yum)(Fedora 16 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=21201

[研究] MRTG 2.17.2安裝(yum)(CentOS 6.2 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=21196

[研究] MRTG 2.17.1 安裝(tar.gz)(CentOS 6.0 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20208

[研究] MRTG 2.17.0 安裝(tar.gz)(Fedora 14 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19191

[研究] MRTG 2.16.4 安裝(yum)(Fedora 14 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19192

[研究] MRTG 2.16.3 安裝(tar.gz)(CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17992

[研究] MRTG 2.16.2安裝(yum)(CentOS 6.0 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20207

[研究] MRTG 2.16.2 安裝(yum)(CentOS 6.3 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=79309

[研究] MRTG 2.14.5 安裝(yum)(CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17991

[研究] MRTG 快速安裝程式精簡版(Fedora 8 )
http://forum.icst.org.tw/phpbb/viewtopic.php?t=14872

[研究] MRTG 快速安裝程式 (CentOS 5.1)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=14871

[研究] MRTG 安裝(yum)(Fedora 7)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=13689

[研究] MRTG 安裝(Fedora Core 4)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=7014

[研究] MRTG 安裝 (Fedora Core 3)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=8168




2012年12月15日 星期六

[研究] Nikto2 v2.1.5 安裝與使用 (CentOS 6.3 x86)



[研究] Nikto2 v2.1.5 安裝與使用 (CentOS 6.3 x86)
2012-12-15
盧紹榮

Nikto2 是 Web Server Scanner

官方網站
http://www.cirt.net/nikto2

安裝
wget  http://www.cirt.net/nikto/nikto-current.tar.gz
tar  zxvf  nikto-current.tar.gz
cd  nikto-2.1.5

請從這台去攻擊受測主機

測試 (-h 參數表示目的主機)
[root@localhost nikto-2.1.5]# ./nikto.pl -h 192.168.128.102
- ***** SSL support not available (see docs for SSL install) *****
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          192.168.128.102
+ Target Hostname:    192.168.128.102
+ Target Port:        80
+ Start Time:         2012-11-22 06:34:30 (GMT8)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ Server leaks inodes via ETags, header found with file /, inode: 786755, size: 5, mtime: 0x4cf07d649d419
+ The anti-clickjacking X-Frame-Options header is not present.
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
+ Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE
+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST
+ OSVDB-3268: /icons/: Directory indexing found.
+ OSVDB-3233: /icons/README: Apache default file found.
+ 6544 items checked: 0 error(s) and 7 item(s) reported on remote host
+ End Time:           2012-11-22 06:35:29 (GMT8) (59 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested
[root@localhost nikto-2.1.5]#

PS : VM 時間忘了修正,所以日期很舊

(完)

參考

[研究] Nikto2 v2.1.4 安裝與使用 (Fedora 15 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20385

[研究] Nikto2 v2.1.4 Web Scanner 安裝與使用 (CentOS 6.0 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?p=63655

[研究] ntop 5.0.1.tar.gz (CentOS 6.3) 快速安裝程式

[研究] NTOP 5.0.1 快速安裝程式(tar.gz)(CentOS 6.3 x86)

CentOS 6.3 沒有提供 yum 安裝 ntop,所以這篇是下載 tar.gz 安裝 小弟寫了 install.sh 快速安裝程式

把 install.sh 放入 .iso 掛到 CentOS 6.3 (VM) 上
然後拷貝到 /usr/local/src
所以 要用 chmod 加上可執行屬性 (x)
並且用 dos2unix 轉換 CR, LF
dos2unix 預設沒有安裝,可用 yum 安裝
最後執行 install.sh 即可
chmod +x install.sh
yum -y install dos2unix
dos2unix  install.sh
./install.sh


install.sh 內容

# install.sh
echo -e "\033[31;42m ********** Install ntop 5.0.1.tar.gz on CentOS 6.3 x86 ********** \033[0m"
echo -e "\033[31m 2012/12/15 ********** \033[0m"
echo -e "\033[31m by Shau-Rong Lu ********** \033[0m"

# Check SELinux status
if  [ "`grep SELINUX=disabled /etc/selinux/config`" == "" ]; then

# disable SELinux now
/usr/sbin/setenforce 0

# disable SELinux after every reboot
# echo "/usr/sbin/setenforce 0" >> /etc/rc.local  

#or
# disable SELinux always
sed -i -e "s@SELINUX=enforcing@#SELINUX=enforcing@"   /etc/selinux/config
sed -i -e "s@SELINUX=permissive@#SELINUX=permissive@"   /etc/selinux/config
sed -i -e "/SELINUX=/aSELINUX=disabled"   /etc/selinux/config
fi

# Kill yum on running...
ProcessID="`ps aux | grep yum | awk '{print $2}' `"
for i in $ProcessID
do
  echo $i
  kill -9 $i
done

yum -y install subversion gcc gcc-c++ libpcap-devel libpcap  libtool  automake  autoconf  gdbm  gdbm-devel libevent libevent-devel rrdtool rrdtool-devel zlib zlib-devel python python-devel geoip geoip-devel

wget http://sourceforge.net/projects/ntop/files/ntop/Stable/ntop-5.0.1.tar.gz/download
#wget http://nchc.dl.sourceforge.net/project/ntop/ntop/Stable/ntop-5.0.1.tar.gz

tar -zxvf ntop-5.0.1.tar.gz
cd ntop-5.0.1
./autogen.sh
make
make install

useradd -M -s /sbin/nologin -r ntop
chown -R ntop:root /usr/local/var/ntop/
chown -R ntop:ntop /usr/local/share/ntop/
ntop -A
/usr/local/bin/ntop -d -L -u ntop -P /usr/local/var/ntop --skip-version-check --use-syslog=daemon
# or
#/usr/local/bin/ntop -i "eth0,eth1" -d -L -u ntop -P /usr/local/var/ntop --skip-version-check --use-syslog=daemon
firefox http://localhost:3000/ &




[研究] NTOP 5.0.1 快速安裝程式(tar.gz)(CentOS 6.3)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=79224

[研究] NTOP 5.0 安裝(yum)(Fedora 18)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=79312

[研究] NTOP 4.1.0安裝(yum)(Fedora 16 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=21191

[研究] NTOP 4.1.0 安裝(tar.gz)(CentOS 6.2 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=21177

[研究] NTOP 4.0.3安裝(tar.gz)(Fedora 14 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19185

[研究] NTOP 4.0.3安裝(tar.gz)(CentOS 6.0 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20224

[研究] NTOP 4.0.3 安裝(tar.gz)(CentOS 5.5 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19435

[研究] NTOP 3.4-pre3安裝(yum)(Fedora 14 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19188

[研究] NTOP 3.3.9 快速安裝程式(yum)(Fedora 11)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=18364

[研究] NTOP 3.3.8 安裝 (yum)(CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=18000

[研究] NTOP 3.3.10 快速安裝程式(yum)(Fedora 13)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=18363

[研究] NTOP 3.3.10 安裝(tar.gz)(CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17985

[研究] NTOP 3.3 快速安裝程式精簡版(tar.gz)(CentOS 5.1)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=14875

[研究] NTOP 3.3 快速安裝程式(tar.gz)(Fedora 7)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=14843


(完)

2012年12月14日 星期五

[研究] snort-2.9.4.tar.gz (CentOS 6.3 x86) 快速安裝程式


[研究] snort-2.9.4.tar.gz (CentOS 6.3 x86) 快速安裝程式

snort-2.9.4.tar.gz 和 daq-2.0.0.tar.gz 下載網址
http://www.snort.org/snort-downloads?

libdnet-1.11.tar.gz 下載網址
http://libdnet.sourceforge.net/

snortrules-snapshot-2931.tar.gz 下載網址 (免費註冊,登入後才能下載)
http://www.snort.org/snort-rules/?

Registered User Release 免費註冊,登入後才能下載
Subscriber Release 是花錢訂閱才能下載的

請自己手動下載下面檔案,放到 /usr/local/src 目錄
libdnet-1.11.tar.gz 
daq-2.0.0.tar.gz
snort-2.9.4.tar.gz
snortrules-snapshot-2923.tar.gz
  
快速安裝程式內容(實際測試可用)

#!/bin/bash
echo -e "\033[31m"
echo -e "Program : snort2.9.4_centos6.3x86.sh "
echo -e "snort-2.9.4.tar.gz Install Shell Script (CentOS 6.3 x86) "
echo -e "by Shau-Rong Lu 2012/12/14 "
echo -e "\033[0m"

yum -y install gcc gcc-c++ flex bison zlib zlib-devel libpcap libpcap-devel pcre pcre-devel tcpdump
yum -y install dos2unix

cd /usr/local/src

if [ ! -s libdnet-1.11.tar.gz ]; then
  echo "Can not find libdnet-1.11.tar.gz"
  exit
fi

if [ ! -s daq-2.0.0.tar.gz ]; then
  echo "Can not find daq-2.0.0.tar.gz"
  exit
fi

if [ ! -s snort-2.9.4.tar.gz]; then
  echo "Can not find snort-2.9.4.tar.gz"
  exit
fi

if [ ! -s snortrules-snapshot-2923.tar.gz]; then
  echo "Can not find snortrules-snapshot-2923.tar.gz"
  exit
fi



tar zxvf libdnet-1.11.tar.gz
tar zxvf daq-2.0.0.tar.gz
tar zxvf snort-2.9.4.tar.gz

cd /usr/local/src/libdnet-1.11
./configure --with-pic
make
make install

cd /usr/local/src/daq-2.0.0
./configure
make
make install

cd /usr/local/src/snort-2.9.4
./configure --enable-sourcefire
make
make install

# cd /usr/local/lib
# ldconfig -v /usr/local/lib

mkdir -p /etc/snort
cd /usr/local/src
tar xzvf /usr/local/src/snortrules-snapshot-2923.tar.gz -C /etc/snort
touch /etc/snort/rules/white_list.rules /etc/snort/rules/black_list.rules

groupadd -g 40000 snort
useradd snort -d /var/log/snort -s /sbin/nologin -c SNORT_IDS -g snort
cd /etc/snort
chown -R snort:snort *
chown -R snort:snort /var/log/snort

cp /etc/snort/etc/* /etc/snort/.

sed -i -e "s@var RULE_PATH@#var RULE_PATH@"   /etc/snort/snort.conf
sed -i -e "/var RULE_PATH/avar RULE_PATH /etc/snort/rules"   /etc/snort/snort.conf
cat /etc/snort/snort.conf | grep "var RULE_PATH"

sed -i -e "s@var SO_RULE_PATH@#var SO_RULE_PATH@"   /etc/snort/snort.conf
sed -i -e "/var SO_RULE_PATH/avar SO_RULE_PATH /etc/snort/so_rules"   /etc/snort/snort.conf
cat /etc/snort/snort.conf | grep "var SO_RULE_PATH"

sed -i -e "s@var PREPROC_RULE_PATH@#var PREPROC_RULE_PATH@"   /etc/snort/snort.conf
sed -i -e "/var PREPROC_RULE_PATH/avar PREPROC_RULE_PATH /etc/snort/preproc_rules"   /etc/snort/snort.conf
cat /etc/snort/snort.conf | grep "var PREPROC_RULE_PATH"

sed -i -e "s@var WHITE_LIST_PATH@#var WHITE_LIST_PATH@"   /etc/snort/snort.conf
sed -i -e "/var WHITE_LIST_PATH/avar WHITE_LIST_PATH /etc/snort/rules"   /etc/snort/snort.conf
cat /etc/snort/snort.conf | grep "var WHITE_LIST_PATH"

sed -i -e "s@var BLACK_LIST_PATH@#var BLACK_LIST_PATH@"   /etc/snort/snort.conf
sed -i -e "/var BLACK_LIST_PATH/avar BLACK_LIST_PATH /etc/snort/rules"   /etc/snort/snort.conf
cat /etc/snort/snort.conf | grep "var BLACK_LIST_PATH"


mkdir -p /usr/local/lib/snort_dynamicrules
chown -R snort:snort /usr/local/lib/snort_dynamicrules
chmod -R 700 /usr/local/lib/snort_dynamicrules

snort -T -c /etc/snort/snort.conf
if [ "$?" != "0" ]; then
  echo "Snort Test Failed !"
  exit
fi

#cp /root/snort-2.9.4/rpm/snortd  /etc/init.d/.
#chmod +x /etc/init.d/snortd
#cp /root/snort-2.9.4/rpm/snort.sysconfig /etc/sysconfig/snort
#ln -s /usr/local/bin/snort /usr/sbin/snort

rm -fr /etc/init.d/snortd
echo ""  > /etc/init.d/snortd
echo "" >> /etc/init.d/snortd
echo ". /etc/rc.d/init.d/functions "  >> /etc/init.d/snortd
echo "INTERFACE=eth0" >> /etc/init.d/snortd
echo "" >> /etc/init.d/snortd
echo "case \"\$1\" in " >> /etc/init.d/snortd
echo "start)" >> /etc/init.d/snortd
echo "  echo -n \"Starting Snort: \"" >> /etc/init.d/snortd
echo "  daemon PCAP_FRAMES=max /usr/local/bin/snort -D -i \$INTERFACE -c /etc/snort/snort.conf" >> /etc/init.d/snortd
echo "  echo" >> /etc/init.d/snortd
echo "  ;;" >> /etc/init.d/snortd
echo "" >> /etc/init.d/snortd
echo "stop)" >> /etc/init.d/snortd
echo "  echo -n \"Stopping Snort: \"" >> /etc/init.d/snortd
echo "  killproc snort" >> /etc/init.d/snortd
echo "  echo" >> /etc/init.d/snortd
echo "  ;;" >> /etc/init.d/snortd
echo "" >> /etc/init.d/snortd
echo "restart)" >> /etc/init.d/snortd
echo "  \$0 stop" >> /etc/init.d/snortd
echo "  \$0 start" >> /etc/init.d/snortd
echo "  ;;" >> /etc/init.d/snortd
echo "status)" >> /etc/init.d/snortd
echo "  status snort" >> /etc/init.d/snortd
echo "  ;;" >> /etc/init.d/snortd
echo "*)" >> /etc/init.d/snortd
echo "  echo \"Usage: $0 {start|stop|restart|status}\"" >> /etc/init.d/snortd
echo "  exit 1" >> /etc/init.d/snortd
echo "  esac" >> /etc/init.d/snortd
echo "  exit 0" >> /etc/init.d/snortd

chmod +x /etc/init.d/snortd


echo "You can service httpd restart, then use N-Stalker Free Edition (http://nstalker.com/products/free/download-free-edition) on MS-Windows to attack WebSite "
echo ""
echo "or Nikto (http://www.cirt.net/nikto2) on another Linux to attack WebSite"
echo "  wget http://www.cirt.net/nikto/nikto-current.tar.gz"
echo "  tar zxvf nikto-current.tar.gz"
echo "  cd nikto-current"
echo "  nikto.pl -h xxx.xxx.xxx.xxx"

(完)

相關文章

[研究] snort-2.9.5.5.tar.gz (CentOS 6.4 x64) 快速安裝程式
http://shaurong.blogspot.tw/2013/10/snort-2955targz-centos-64-x64.html

[研究] snort-2.9.4.tar.gz (CentOS 6.3 x86) 快速安裝程式
http://shaurong.blogspot.tw/2012/12/snort-294targz-centos-63-x86.html

[研究] Snort 2.9.0.5 安裝(Fedora 15 x86)
http://shaurong.blogspot.tw/2011/07/snort-2905-fedora-15-x86.html

[研究] N-Stalker Web Application Security Scanner X Free Edition 網站漏洞掃描軟體使用
http://shaurong.blogspot.tw/2013/08/n-stalker-web-application-security.html

[研究] N-Stalker Free Edition 2012 網站漏洞掃描軟體使用教學
http://shaurong.blogspot.tw/2011/07/n-stalker-free-edition-2012.html

2012年12月13日 星期四

[研究] VMware VM 拷貝後新 VM 的 eth0 變成 eth1 之解決

[研究] VMware Workstation 9.0.1 VM Clone 後新 VM 的 eth0 變成 eth1 之解決

軟體:VMware Workstation 9.0.1 for Windows
VM 中 OS 為 CentOS Linux 6.3 x86
把原來的 CentOS 6.3 x86 VM 目錄複製一份,開啟後...

(下圖) VMware Workstation 會問你這個 VM 是搬移過來的,還是拷貝過來的,選 I copied it,則網路卡的 MAC address 會換一個新的,避免和原來的相同,導致其中一台 VM 網路功能異常

(下圖) 開啟這台 VM 的設定資訊,看看網路卡新得到的 MAC Address


(下圖) 新得到的 MAC Address 為 00:0C:29:B3:33:9E

(下圖) PowerOn 開機後,可以看到 MAC address 是新的,但是網卡代碼是 eth1,不是 eth0

(下圖) 檢視  /etc/sysconfig/network-scripts/ifcfg-eth0 內容,MAC address 仍是和原來 VM 相同

(下圖) 檢視 /etc/udev/rules.d/70-persistent-net.rules內容,發現有兩張網路卡,一張是原來 VM 的 eth0,一張是新的網卡 eth1


要讓新網卡變成 eth0,方法如下:

(下圖)  /etc/udev/rules.d/70-persistent-net.rules 有兩種處理方式
(1) 刪除掉,在 PowerOn 時候,會自動偵測網卡,添加上去
(2) 把原來 eth0 那筆刪除,把 eth1 改名 eth1

(下圖)  /etc/sysconfig/network-scripts/ifcfg-eth0 也有兩種處理方式
(1) 把 HWADDR 修正為新的 MAC Address
(2) 把 HWADDR 註解掉

(下圖) 接下來請執行 PowerOff 關機 ( 用 service network restart 或 restart 是沒用的)

(下圖) PowerOn 開機後,再次執行 ifconfig 檢查,發現網卡變成 eth0 了

(完)

[研究] VMware VM 拷貝後新 VM 的 eth0 變成 eth1 之解決
http://shaurong.blogspot.tw/2012/12/vmware-image-clone-eth0-eth1.html

[研究] VMware vSphere 4.x CentOS 6.2 VM Clone 產生之 VM 網路卡介面抓不到 IPv4 之解決
http://shaurong.blogspot.tw/2012/05/vmware-vsphere-4x-centos-62-vm-clone-vm.html

[研究] VMware vSphere 4.x CentOS 6.2 x86 VM 網路卡抓不到 IPv4 之解決
http://shaurong.blogspot.com/2012/05/vmware-vsphere-41-centos-62-x86-vm-ipv4.html

[研究] vSphere 4.x 上 Fedora 11 VM 網路卡抓不到 IP 之解決
http://shaurong.blogspot.com/2012/04/vsphere-4x-fedora-11-vm-ip.html

[研究] VMware vSphere 4.x Fedora 11 VM Clone 產生之 VM 網路卡介面抓不到 IPv4 之解決
http://shaurong.blogspot.com/2012/04/vmware-vsphere-4x-fedora-11-vm-clone-vm.html

[研究] VMware vSphere 4.x Ubuntu 12.04 VM 網路卡抓不到 IPv4 之解決
http://shaurong.blogspot.com/2012/05/vmware-vsphere-4x-ubuntu-1204-vm-ipv4.html

2012年12月12日 星期三

[研究] Windows 2008 R2 繁體中文套件安裝

[研究] Windows 2008 R2 繁體中文套件安裝

這是 MSDN 訂閱者才能下載,微軟沒有提供公開下載。

(下圖) Windows 2008 R2 繁體中文套件光碟內容

(下圖) 開始安裝




















(完)

[研究] Windows 2008 R2 英文評估版安裝

[研究] Windows 2008 R2 英文評估版安裝

下載網址
http://technet.microsoft.com/zh-tw/evalcenter/dd459137.aspx

下載到的檔案為 7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso
大小 3,092,618 bytes (約 3GB)









(下圖) 只能試用10天?按下 Active Windows now

(下圖) 更新成為 180 天了



(完)

2012年12月7日 星期五

[研究] Windows 8 標準零售版安裝、啟用記

[研究] Windows 8 標準零售版安裝、啟用記

敝人先把網路斷開了

(下圖) 安裝一開始就要求輸入序號,否則無法繼續安裝

(下圖) 安裝後顯示尚未啟用

(下圖) 安裝後顯示尚未啟用

(下圖) 沒有說幾天內必須啟用

(下圖) 接上網路,偷偷摸摸自動啟用完成,沒有任何提示畫面

(下圖) 啟用完成

(完)