marcustsai.blogspot.com
馬克思 Linux學習筆記: Linux 透過proxy連外的設定方式
http://marcustsai.blogspot.com/2012/07/linux-proxy.html
Export http proxy=http:/ username:password@"Proxy IP":port. Export ftp proxy=http:/ username:passord@"Proxy IP":port. 其中如果proxy server不須要帳密,就只要打http:/ "Proxy IP":port即可. Vim /bashrc / 將上面兩行export加入即可. Vim /etc/yum.conf / 加入. 選擇『系統』 『偏好設定』 『代理伺服器』. 訂閱: 張貼留言 (Atom). Watermark範本. 由 Blogger.
marcustsai.blogspot.com
馬克思 Linux學習筆記: NFS Export different LUN with parent directory
http://marcustsai.blogspot.com/2012/10/nfs-server-mountnewnew2012new.html
NFS Export different LUN with parent directory. 有兩個空間分別mount在/new與/new/2012並將/new nfs分享出去,client端使用指令將server的/new mount起來後,可以看到/new裡面有一個2012資料夾,但資料寫入卻是寫在/new那個空間. 1 NFS server 新增兩個硬碟空間,分別為/dev/vdb1,/dev/vdc1. Disk /dev/vdb: 2147 MB, 2147483648 bytes. 16 heads, 63 sectors/track, 4161 cylinders. Units = cylinders of 1008 * 512 = 516096 bytes. Sector size (logical/physical): 512 bytes / 512 bytes. I/O size (minimum/optimal): 512 bytes / 512 bytes. Device Boot Start End Blocks Id System. Root@node2 ]# ll /new.
marcustsai.blogspot.com
馬克思 Linux學習筆記: 十一月 2010
http://marcustsai.blogspot.com/2010_11_01_archive.html
2修改/etc/hosts / 讓兩邊一致,用ping測試. 140137.215.238 a238. 192168.188.10 h2. Scp -r a238: /hadoop-0.21.0 . Cd hadoop-0.21.0. Jdk-6u22-linux-i586-rpm.bin / hadoop需要昇陽版本的jdk. Hadoop-0.21.0.tar.gz. 1檢查java環境 / 安裝時不要選取java.光碟中的是openjava. Rpm -qa grep java/jdk. Alternatives - install /usr/bin/java java /usr/java/jdk1.6.0 22/bin/java 1. 指令格式: alternatives - install 連結 名稱 路徑 優先順序. Alternatives - config java / 這邊的java就是上面的名稱. 有 2 程式提供 'java'。 1 /usr/java/jdk1.6.0 22/bin/java. Cat id rsa.pub. Cd hadoop-0.21.0. Archive -...
marcustsai.blogspot.com
馬克思 Linux學習筆記: 九月 2010
http://marcustsai.blogspot.com/2010_09_01_archive.html
Server network setting script (only for ubuntu). Root" ] & echo "need root" & exit 1. Echo "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ". Echo " 1 IP網路設定". Echo " 2 DNS設定". Echo " 3 Default Gateway 設定". Echo " 4 個人燈入檔設定". Echo " 5 重設MAC". Echo " 6/q 離開". Echo "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ". Read -p "your choice? Read -p "要修改的使用者: " user. If [ -d /home/$user ]; then. Elif [ $user = "root" ]; then. F file ]; then. While [ 1 ].
marcustsai.blogspot.com
馬克思 Linux學習筆記: 十二月 2010
http://marcustsai.blogspot.com/2010_12_01_archive.html
Etc/init.d/open-iscsi / 服務起停. Sudo cat /etc/iscsi/initiatorname.iscsi / 查詢iscsi name,類似san 的wwn. InitiatorName=iqn.1993-08.org.debian:01:8c1d5772487a / "="後那一串必須加到NA裡面作設定. Sudo iscsiadm -m discovery -t st -p NA的IP / 尋找target. 找到後會列出可用的iSCSI Target名稱,而且在 /etc/iscsi/nodes. Sudo iscsiadm -m node -T "iscsi target名稱" -p "NA IP" -l / 登入,成功會有success訊息. Logging in to [iface: default, target: iqn.1992-08.com.netapp:sn.99929383, portal: 192.168.56.200,3260]. Sudo fdisk -l / 應該要能夠看到分享出來的目錄. Yum update 套件名稱 / 更新已安裝套件.
marcustsai.blogspot.com
馬克思 Linux學習筆記: 七月 2012
http://marcustsai.blogspot.com/2012_07_01_archive.html
Export http proxy=http:/ username:password@"Proxy IP":port. Export ftp proxy=http:/ username:passord@"Proxy IP":port. 其中如果proxy server不須要帳密,就只要打http:/ "Proxy IP":port即可. Vim /bashrc / 將上面兩行export加入即可. Vim /etc/yum.conf / 加入. 選擇『系統』 『偏好設定』 『代理伺服器』. 訂閱: 文章 (Atom). Watermark範本. 由 Blogger.
marcustsai.blogspot.com
馬克思 Linux學習筆記: Linux備份工具-dump與restore實做
http://marcustsai.blogspot.com/2011/05/linux-dumprestore.html
系統在怎麼穩定都會有掛的一天,所以平常就好做好備份策略,以往MAX通常都用tar來作備份,最近剛好客戶需要使用dump來備份,就來作個測試練習並記錄下來以免忘記. 1 先在虛機A上安裝CentOS5.2,硬碟分割如下. Disk /dev/sda: 8589 MB, 8589934592 bytes. 255 heads, 63 sectors/track, 1044 cylinders. Units = cylinders of 16065 * 512 = 8225280 bytes. Device Boot Start End Blocks Id System. Dev/sda1 * 1 13 104391 83 Linux. Dev/sda2 14 666 5245222 83 Linux. Dev/sda3 667 797 1052257 82 Linux swap / Solaris. Dev/sda4 798 1044 1984027 5 Extended. Dev/sda5 798 1044 1983996 8e Linux LVM. Fdisk /dev/sdb / 分割成一個即可.
marcustsai.blogspot.com
馬克思 Linux學習筆記: 五月 2012
http://marcustsai.blogspot.com/2012_05_01_archive.html
為了再虛擬機上產生軟碟機,試了很多方式,還是dd最簡單:. Dd if=/dev/zero of=floppy.img bs=512 count=2880. 訂閱: 文章 (Atom). Watermark範本. 由 Blogger.
marcustsai.blogspot.com
馬克思 Linux學習筆記: RHEL5 & 6 NIC Bonding
http://marcustsai.blogspot.com/2012/11/rhel5-6-nic-bonding.html
RHEL5 and 6 NIC Bonding. IPADDR=192.168.1.100. NETMASK=255.255.255.0. 編輯/etc/modprobe.d/底下的設定檔(6版改為folder,裡面只要是.conf結尾的檔案都會生效). Vim /etc/modprobe.d/bonding.conf. 如果有兩個以上的bonding介面,就再加alias bond1 bonding .以此類推. IPADDR=192.168.1.1. NETMASK=255.255.255.0. 需有 switch 設定 (trunk) 支援. 8231;具容錯功能, 其中一張 Slave 網卡失效仍可持續運作. 8231;同一時間只有單一 Slave 網卡運作. 8231;Active Slave 網卡失效時自動啟用次一順位 Slave 網卡. 8231;不需 switch 支援. 8231;所有 Slave 網卡一齊收送網路封包. 8231;具容錯功能, 其中一張 Slave 網卡失效仍可持續運作. 8231;傳入由 Current Active Slave 負責.