上司要求為應屆畢業生搭建一台LINUX伺服器。要求安裝ORACLE CVS SVN FTP JDK WEBSphere.想來想去,用那個版本比較好?正好以前玩了一段時間的CentOS。就用它了。安裝過程一切正常,等到提示重新啟動,全部安裝完成。
開機,進系統,設定網絡,用ifconfig檢視隻發現了LO。其它都沒有。想有可能網卡驅動沒有安裝。檢視網卡的硬體版本Broadcom 57785.go to 官網。查找驅動。
驅動下載下傳網址為:http://www.broadcom.com/support/ethernet_nic/netlink_k57.php
然後複制到U盤。到Centos進行U盤挂載檔案解壓。
- mount /dev/sdb1 /mnt
- cd /mnt
- unzip linux-3.110g.zip
解壓完成以後進入相應目錄,檢視README檔案。說明檔案提供二種安裝方法,第一種 RPM包,第二種 源代碼安裝。我用第一種安裝成功,就沒有進行第二種方法的測試(安裝方法我會粘貼到最後。)
- rpm -ivh tg3-3.116j-1.src.rpm #完成後進入安裝目錄
- cd /usr/scr/redhat #目錄下共計五個子目錄:BUILD RPMS SOURCES SPECS SRPMS
- rpm -bb SPECS/tg3.spec
- or
- rpmbuild -bb SPECS/tg3.spec #我用些指令
- 然後到進入RPMS下的i386目錄你ls檢視目錄會發現有新RPM檔案生成
- rpm -ivh tg3-3.116j-1.i386.rpm
- 分别檢視二個檔案目錄看是否有tg3.o or tg3.ko檔案。
- /lib/modules/<kernel_version>/kernel/drivers/net/tg3.o #<kernel_version>為你的核心目錄。
- /lib/modules/<kernel_version>/kernel/drivers/net/tg3.o #<kernel_version>為你的核心目錄。
- 加載子產品
- modprobe tg3
- service network restart #添加網卡完成。
1. Create a directory and extract the files:
tar xvzf tg3-<version>.tar.gz
2. Build the driver tg3.o (or tg3.ko) as a loadable module for the
running kernel:
cd src
make
The driver will be compiled for the running kernel by default. To build
the driver for a kernel different than the running one, specify the
kernel by defining it in KVER:
make KVER=<kernel version>
where <kernel version> in the form of 2.x.y-z is the version of another
kernel that is installed on the system.
3. Test the driver by loading it:
insmod tg3.o
or
insmod tg3.ko (on 2.6.x kernels)
or
insmod tg3
4. Install the driver:
make install
到此結束。