CentOS 6預設安裝桌面時才會安裝Network Manger,只安裝純文字介面預設不會安裝NetworkManager但可在手動安裝。
用Webmin改hostname之後重開機hostname就可ping的到了
個人在學習Linux過程當中的個人筆記,提供個人及有需要的人查閱,若有錯誤歡迎提供指正,謝謝。 This Blog recorded notes about my learning Linux and provides myself and others reference. If there are any incorrect information, welcome to leave a message to correct me, Thanks.
2013年6月14日 星期五
2013年6月6日 星期四
httpd 403 Forbidden
1. set Alias in httpd.conf
Alias /download /opt/download
2. add directory in httpd.conf
AllowOverride All
AcceptPathInfo On
Options Indexes SymLinksIfOwnerMatch FollowSymLinks
http://server/download may return 403 cause selinux
3. set selinux setting
# chcon -tR httpd_sys_content_t /opt/download
Reference:
http://www.mikehomme.com/node/16
Alias /download /opt/download
2. add directory in httpd.conf
AllowOverride All
AcceptPathInfo On
Options Indexes SymLinksIfOwnerMatch FollowSymLinks
http://server/download may return 403 cause selinux
3. set selinux setting
# chcon -tR httpd_sys_content_t /opt/download
Reference:
http://www.mikehomme.com/node/16
2013年5月14日 星期二
Linux SUID, SGID, Sticky bit
當SUID (set user id):chmod u+s file
http://en.wikipedia.org/wiki/Sticky_bit
- 被設定在檔案上時,檔案的執行者會以檔案的擁有者的身分來執行
- 被設定在檔案上時,檔案的執行者會以檔案的擁有群組的身分來執行
- 當設定在目錄上時,在此目錄下新建的檔案群組會被自動套用此目錄的群組
- 當設定在目錄上時,以下的檔案只有該擁有者才能刪除或更名( /tmp )
http://en.wikipedia.org/wiki/Sticky_bit
2013年5月13日 星期一
compile ipmitool 1.8.13
- remove freeipmi first
# make uninstall (from freeipmi-1.4.9) don't know why
# make clean - yum install ncurses-* readline-* openssl-*
- tar xvjf ipmitool-1.8.13.tar.bz2; cd ipmitool-1.8.13
- ./configure && make
- make install
- Enter freeipmi source code folder (need install libgcrypt-devel before compiler freeipmi)
# ./configure
# make
# make install
Do build freeipmi
# yum install libgcrypt-devel
2013年5月7日 星期二
2012年12月22日 星期六
Ascii hex (IEEE754) 轉成 flaot in python
import sys
form binascii import unhexlify
s = unhexlify(sys.argv[1]) + unhexlify(sys.argv[2]) \
+ unhexlify(sys.argv[3]) + unhexlify(sys.argv[4])
import struct
result = struct.unpack_from('f', s)
print result[0]
訂閱:
文章 (Atom)