2013年1月30日 星期三
Monitorix 安裝
apt-get update
apt-get install monitorix
service apache2 reload
service monitorix restart
http://localhost/monitorix/
2013年1月25日 星期五
ubuntu設定IP
設定IP
/etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.10.10
netmask 255.255.255.0
gateway 192.168.10.1
設定DNS
/etc/resolv.conf
nameserver 192.168.10.1
重新啟動網路
/etc/init.d/networking restart
2013年1月24日 星期四
2012年12月2日 星期日
Mandriva 安裝 f77
Mandriva 2010.2_x86_64 安裝 f77
urpmi -a gcc
urpmi -a make
urpmi -a csh
將下列內容儲存成install_f2c_linux.csh安裝檔
#! /bin/csh
setenv INSTALL /usr/local
curl "http://netlib.sandia.gov/cgi-bin/netlib/netlibfiles.tar?filename=netlib/f2c" -o "f2c.tar"
tar -xvf f2c.tar
gunzip -rf f2c/*
cd f2c
mkdir libf2c
mv libf2c.zip libf2c
cd libf2c
unzip libf2c.zip
cp makefile.u Makefile
make
cp f2c.h $INSTALL/include
cp libf2c.a $INSTALL/lib
cd ../src
cp makefile.u Makefile
make
cp f2c $INSTALL/bin
cd ..
mkdir -p $INSTALL/man/man1
cp f2c.1t $INSTALL/man/man1
cp fc $INSTALL/bin/f77
chmod +x $INSTALL/bin/f77
cd ..
rm -rf f2c
echo "==================SUMMARY=================="
echo $0 " has built and installed:"
find $INSTALL -name '*f2c*' -mmin -5
find $INSTALL -name '*f77*' -mmin -5
執行安裝檔
測試是否安裝成功
將下列內容儲存成hello.f程式檔
program hello
print *,'Hello World!'
end program
urpmi -a gcc
urpmi -a make
urpmi -a csh
將下列內容儲存成install_f2c_linux.csh安裝檔
#! /bin/csh
setenv INSTALL /usr/local
curl "http://netlib.sandia.gov/cgi-bin/netlib/netlibfiles.tar?filename=netlib/f2c" -o "f2c.tar"
tar -xvf f2c.tar
gunzip -rf f2c/*
cd f2c
mkdir libf2c
mv libf2c.zip libf2c
cd libf2c
unzip libf2c.zip
cp makefile.u Makefile
make
cp f2c.h $INSTALL/include
cp libf2c.a $INSTALL/lib
cd ../src
cp makefile.u Makefile
make
cp f2c $INSTALL/bin
cd ..
mkdir -p $INSTALL/man/man1
cp f2c.1t $INSTALL/man/man1
cp fc $INSTALL/bin/f77
chmod +x $INSTALL/bin/f77
cd ..
rm -rf f2c
echo "==================SUMMARY=================="
echo $0 " has built and installed:"
find $INSTALL -name '*f2c*' -mmin -5
find $INSTALL -name '*f77*' -mmin -5
執行安裝檔
chmod +x install_f2c_linux.csh
./install_f2c_linux.csh
將下列內容儲存成hello.f程式檔
program hello
print *,'Hello World!'
end program
執行程式
f77 -o hello hello.f
./hello
./hello
2012年11月21日 星期三
Windows 7製作能安裝的USB隨身碟
命令提示字元
diskpart
list disk #列出電腦所有的實體磁碟#
select disk {n} # n是隨身碟的磁碟編號#
clean #清理隨身碟,不會有任何分割區#
create partition primary #在隨身碟建立主分割區#
select partition 1 #選取隨身碟唯一的分割區#
active #將分割區設為使用中,變成可以開機的分割區#
format fs=fat32 quick #以快速模式格式化成FAT32檔案系統#
assign #磁碟代號指定給在隨身碟建立、格式化過的分割區#
exit #結束diskpart#
Windows 7光碟boot資料夾
bootsect /nt60 {drive letter:}
---------------------------------------------------------------------------------------
簡單的作法
Windows 7
命令提示字元
NTFS:format {drive letter:} /q /fs:ntfs
Windows XP
命令提示字元
format {drive letter:} /fs:fat32 /q
convert {drive letter:} /fs:ntfs
bootsect /nt60 {drive letter:}
[bootsect:在Windows 7安裝光碟boot資料夾中]
diskpart
list disk #列出電腦所有的實體磁碟#
select disk {n} # n是隨身碟的磁碟編號#
clean #清理隨身碟,不會有任何分割區#
create partition primary #在隨身碟建立主分割區#
select partition 1 #選取隨身碟唯一的分割區#
active #將分割區設為使用中,變成可以開機的分割區#
format fs=fat32 quick #以快速模式格式化成FAT32檔案系統#
assign #磁碟代號指定給在隨身碟建立、格式化過的分割區#
exit #結束diskpart#
Windows 7光碟boot資料夾
bootsect /nt60 {drive letter:}
---------------------------------------------------------------------------------------
簡單的作法
Windows 7
命令提示字元
NTFS:format {drive letter:} /q /fs:ntfs
Windows XP
命令提示字元
format {drive letter:} /fs:fat32 /q
convert {drive letter:} /fs:ntfs
bootsect /nt60 {drive letter:}
[bootsect:在Windows 7安裝光碟boot資料夾中]
Linux查硬體資訊指令
主機板
lshw -c bus | head
dmidecode -t baseboard
BIOS
dmidecode -t bios
中央處理器
less /proc/cpuinfo
lshw -c processor
dmidecode -t processor
記憶體
dmidecode -t memory
硬碟
lshw -c disk
hdparm -I /dev/sda
網路卡
lspci | grep -i eth (查看網卡名稱)
ethtool -i eth0 (查看網卡 driver)
顯示卡
lspci | grep VGA
lshw -c display
USB 裝置
lsusb
2012年9月24日 星期一
Ubuntu RAID 5 4TB HD
OS : Ubuntu 14.10 AMD64
HD : 2TB X 3
RAID : 5 (4TB)
TABLE : GPT
磁區分割:
開機區:EFI :500 M
根目錄:50 G
SWAP:5 G
HOME:3800721 M
BOOT OPTION
Advanced options for ubuntu
Linux 3.16.0-23-generic
GRUB
Class ubuntu
Vmlinuz-3.16.0-30-generic -> Vmlinuz-3.16.0-23-generic
HD : 2TB X 3
RAID : 5 (4TB)
TABLE : GPT
磁區分割:
開機區:EFI :500 M
根目錄:50 G
SWAP:5 G
HOME:3800721 M
BOOT OPTION
Advanced options for ubuntu
Linux 3.16.0-23-generic
GRUB
Class ubuntu
Vmlinuz-3.16.0-30-generic -> Vmlinuz-3.16.0-23-generic
2012年8月30日 星期四
Windows 7 刪除 100M
Windows 7 系統
命令提式字元 (按右鍵 以系統管理員身份執行)
diskpart
DISKPART>list disk (列出硬碟以便確認) 筆者硬碟為磁碟0
DISKPART>select disk 0 (選擇磁碟0 ,0是剛剛確認的磁碟順序)
DISKPART>list partition (確認磁碟分區)
DISKPART>select partition 1 (1是目前確認的100MB的磁碟分區代號)
DISKPART>inactive (將此磁區設為非活動)
DISKPART>select partition 2 (選擇系統C磁碟)
DISKPART>active (將C磁碟設為活動)
設定完成後打exit 離開
將開機資訊寫到C槽系統磁區
命令提式字元 (按右鍵 以系統管理員身份執行)
bcdboot c:\windows /s c: /l zh-tw
2012年8月27日 星期一
2012年6月19日 星期二
PHP MySQL Apache 安裝
安裝MySQL-Server
apt-get install mysql-server
安裝Apache HTTP Server
apt-get install apache2
安裝PHP for Apache HTTP Server
apt-get install php5
安裝MySQL for Apache HTTP Server
apt-get install libapache2-mod-auth-mysql
apt-get install php5-mysql
訂閱:
文章 (Atom)