freebsd安装linux网卡驱动,freebsd从安装到想要的状态配置
1、前言
笔者出来工作多年,对属于unix分支的bsd系列freebsd的大名早有耳闻。今天终于下定决心去玩一下,发现与linux的细致还是有差异的,将常见的配置记录于此,供往后参阅。
2、系统的安装
系统下载:
系统的安装:
注:请安装FreeBSD 10.2-RELEASE
3、服务的管理
3.1、查看当前安装的服务ls /etc/rc.d/
3.2、服务的选项/etc/rc.d/moused
显式如下:Usage: /etc/rc.d/moused [fast|force|one|quiet](start|stop|restart|rcvar|enabled|status|poll)
3.3、服务操作/etc/rc.d/moused start #moused服务的启动
/etc/rc.d/moused restart #moused服务的重启
/etc/rc.d/moused status #moused服务的状态
/etc/rc.d/moused stop #moused服务的关闭
3.4、服务自启动vi /etc/rc.conf
配置如下:moused_enable="YES" #moused服务默认开机启动
moused_enable="NO" #moused服务默认开机不启动
3.5、常见的服务清单/etc/rc.d/netif #网络接口服务
/etc/rc.d/routing #路由服务
注:使用方式请参考3.3服务的操作
4、网络的配置
4.1、有线网络
4.1.1、dhcp自动获取IPvi /etc/rc.conf
配置如下:ifconfig_re0="DHCP"
re0为指定的网卡名称
4.1.2、静态IP配置
vi /etc/rc.conf
详细配置如下ifconfig_re0="inet 10.168.0.8 netmask 255.255.255.0" #IP地址配置
ifconfig_re0_alias0="inet 10.168.0.9 netmask 255.255.255.0" #多个IP地址配置(可选)
defaultrouter="10.168.0.1" #网关配置
重启服务/etc/rc.d/netif restart #重启网络接口服务使IP配置生效
/etc/rc.d/routing restart #重启网络接口服务使路由配置生效
4.2、dns配置
vi /etc/resolv.conf
详细配置如下:nameserver 202.96.128.86
nameserver 202.96.128.166
nameserver 8.8.8.8
nameserver 8.8.4.4
4.3、无线网络
4.3.1、提取windows驱动
1)去一键工作室下载个U盘pe制作工具,网址:http://www.upanok.com/
2)从U盘的PE系统启动
3)启动PE网络的模式
4)使用PE自带的驱动提取工具提取无线网卡的驱动文件(*.inf,*.sys)
注:以上适用于32位操作系统
4.3.2、制作内核驱动
1)提取的驱动文件U盘复制到系统mount -t msdos /dev/da1s1 /mnt/ #挂载U盘
注:卸载方法unmount /mnt #卸载U盘
2)生成内核驱动cd /mnt
ndisgen x.inf x.sys
注:以上一路回车即可看到生成的x_sys.ko文件
4.3.3、加载内核驱动
1)手动加载kldload ./x_sys.ko
ifconfig
可发现无线网卡:ndis0: flags=8843 metric 0 mtu 2290
ether 00:25:56:77:85:b6
nd6 options=29
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
status: associated
2)自动加载内核cp ./x_sys.ko /boot/modules/
echo "kldload /boot/modules/x_sys.ko" >> /etc/rc.local
4.3.4、加载无线所需的其他内核
1)内核加载if_ath_load="YES"
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
2)重启系统reboot
4.3.5、创建无线
1)手动创建无线ifconfig wlan0 create wlandev ndis0
2)自动创建无线echo "ifconfig wlan0 create wlandev ndis0" >> /etc/rc.local
4.3.6、创建无线认证
1)配置认证vi /etc/wpa_supplicant.conf
加入如下配置:network={
ssid="ssid-name"
psk="password"
}
2)重启网络服务/etc/rc.d/netif restart
4.3.7、检查ifconfig
显示如下:wlan0: flags=8843 metric 0 mtu 1500
ether 00:25:56:77:85:b6
inet 10.168.0.77 netmask 0xffffff00 broadcast 10.168.0.255
nd6 options=29
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
status: associated
ssid will-work channel 6 (2437 MHz 11g) bssid 12:18:d6:8f:b7:f8
country US authmode WPA2/802.11i privacy OFF powersavemode CAM
powersavesleep 100 txpower 0 bmiss 7 mcastrate 6 mgmtrate 6
scanvalid 60 protmode CTS roaming MANUAL bintval 0
4.3.8、图形wifi管理pkg install wifimgr
5、软件包安装
5.1、常用指令pkg search vim #搜索vim
pkg install vim #安装vim
pkg remove vim #删除vim
5.2、配置文件
5.2.1 官方的pkg源cat /etc/pkg/FreeBSD.conf
显示如下:FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
5.2.2 本地自定义pkg源mkdir -p /usr/local/etc/pkg/repos
vi /usr/local/etc/pkg/repos/FreeBSD_install_http.conf
定义如下:FreeBSD_install_http: {
url: "http://192.168.0.200/FreeBSD-11.0-RELEASE-amd64/packages/${ABI}",
mirror_type: "none",
enabled: yes
}
FreeBSD: {
enabled: no
}
6、ssh服务配置
6.1、增加用户adduser
执行完根据向导完成用户的信息填写。
6.2、用户加入组
vim /etc/groupwheel:*:0:root,user1
因为root默认禁止ssh登录,故而将普通用户user1加入wheel组(可以使用su指令)
6.3、切换至root用户su -
6.4、启动服务并/etc/rc.d/sshd start
6.5、设置服务自启动vim /etc/rc.conf
配置如下sshd_enable="YES"
7、命令行使用
由于无法使用[end]等键,提供如下快捷方式供用户使用:[ctrl]+a #到达行首
[ctrl]+e #到达行尾
[ctrl]+u #向行首清除
[ctrl]+k #向行尾清除
[ctrl]+w #向行首清除一个单词
8、桌面环境安装
8.1、二进制包的安装pkg install xorg gnome3
8.2、配置
8.2.1、配置/proc挂载(GNOME运行需要)vim /etc/fstab
配置如下:proc /proc procfs rw 0 0
保存并退出后mount -a
8.2.2、配置启动文件echo "/usr/local/bin/gnome-session" > ~/.xinitrc
8.2.3、开机启动桌面环境
1)配置服务vim /etc/rc.conf
配置如下:gnome_enable="YES"
或者这样写gdm_enable="YES"
dbus_enable="YES"
2)重启并测试reboot
8.2.4、手动启动桌面环境
1)配置服务
vim /etc/rc.conf
配置如下:#gnome_enable="YES"
#gdm_enable="YES"
dbus_enable="YES"
2)重启并测试reboot
startx
8.2.5、中文输入法pkg install ibus zh-ibus-pinyin
安装完毕选择以下菜单添加输入法:
Activities -> Setting -> Region & Language -> Input Sources -> 单击【+】 -> Chinese(China) -> Chinese(Pinyin) -> Add
8.2.6、办公软件pkg install libreoffice xpdf xpdfopen zh-xpdf-zhfont gimp
8.2.7 浏览器的安装
1)安装firefox-esr浏览器pkg install -y firefox-esr
flash安装pkg install nspluginwrapper
cd /usr/ports/www/linux-f10-flashplugin11
make install
make clean
nspluginwrapper -v -a -i
nspluginwrapper -v -a -u
#-v 输出详细信息
#-a 自动探测可用插件
#-i 安装插件
#-u 更新插件
2)安装chrome浏览器pkg install -y chromium
sysctl kern.ipc.shm_allow_removed=1
echo "kern.ipc.shm_allow_removed=1" >> /etc/sysctl.conf
flash安装cd ~
wget https://fpdownload.adobe.com/pub/flashplayer/pdc/25.0.0.127/flash_player_ppapi_linux.x86_64.tar.gz
#wget https://fpdownload.adobe.com/pub/flashplayer/pdc/25.0.0.127/flash_player_ppapi_linux.i386.tar.gz
tar -xf flash_player_ppapi_linux.x86_64.tar.gz
#tar -xf flash_player_ppapi_linux.i386.tar.gz
mkdir -p /usr/local/share/chromium/RepperFlash
cp libpepflashplayer.so manifest.json /usr/local/share/chromium/RepperFlash
chmod -R 755 /usr/local/share/chromium/RepperFlash
vim /usr/local/share/applications/chromium-browser.desktop
Exec=chome %U --ppapi-flash-path=/usr/local/share/chromium/RepperFlash/libpepflashplayer.so
8.2.8、远程控制pkg install tigervnc
9、拯救模式
9.1、什么是拯救模式
拯救模式是用于系统拯救,如当修改内核参数发生错误,导致系统无法正常引导,我们需要借助光盘引导到正常的操作系统,并切换到可以修复原来系统环境的工作模式。
9.2、操作步骤
1)准备一张光盘并从光驱启动
2)选择“boot single user”模式启动
3)看到如下提示按回车Enter full pathname of shell or RETURN for /bin/sh:
4)挂载文件系统mount /dev/ad0p2 /mnt #挂载系统分区到/mnt
ls /mnt #确认系统分区
5)切换根到文件系统chroot /mnt
6)做反向操作修复错误配置文件
7)重新引导进入系统reboot
10、错误处理
10.1、错误提示1
pkg: cached package xxx: size mismatch, cannot continue
处理命令:pkg update -f
11、设置时区和校正时间cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ntpdate 0.pool.ntp.org
--------------------------------------------------------------------
参考文献:
系统下载:
U盘制作
系统的安装:
使用帮助:
flash的安装:
无线驱动解决方法:
升级方法:
freebsd安装linux网卡驱动,freebsd从安装到想要的状态配置相关推荐
- sr650安装linux网卡驱动,Lenovo SR650安装Windows Server 2012之Solarflare驱动导致系统异常...
Lenovo SR650安装Windows Server 2012,同时配置Solarflare万兆网卡,但当下载Solarflare安装完成Solarflare万兆网卡驱动后导致OS无法正常启动,同 ...
- 7080mt安装linux网卡驱动,Intel英特尔PRO100/1000/10GbE系列网卡驱动
Intel英特尔PRO100/1000/10GbE系列网卡驱动17.3版For WinXP/2003-32/2003-64/Vista-32/Vista-64/Win7-32/Win7-64/Win8 ...
- linux网卡驱动离线安装_手动安装linux网卡驱动方法
在Linux下配置网卡的驱动程序,总结了一下: 以D-Link530的网卡进行模块的编译. 由于Linux的默认内核已经建立很多网卡驱动程序模块,所以在编译网卡模块之前就要确认网卡芯片是否被支持,如果 ...
- 惠普安装linux网卡,网络无人职守安装linux PXE
网络无人职守安装linux Writen BY HPLJ-2007.12.4 1配置启动安装服务器 1)install and configure dhcp service /etc/dhcpd.co ...
- 浪潮linux网卡驱动,浪潮NF5280M5安装redhat7.2下网卡驱动
驱动文档如下: Building and Installation To build a binary RPM* package of this driver, run 'rpmbuild -tb i ...
- linux 安装水星无线网卡驱动,Linux下安装RTL8188CE网卡驱动(Mercury MW150U)
先说明下我的系统: kernel: 3.0.0-32-generic 今天买了个无线网卡Mercury 150Mbps MW150U系列,我发现在我的笔记本的Ubuntu 12.10下不用安装驱动就能 ...
- linux网卡驱动离线安装_Linux网卡驱动的安装方式
如何安装Linux网卡驱动呢,看看下面的说明. 适用机型: 所有xSeries 205; 所有xSeries 206; 所有xSeries 225; 所有xSeries 226; 所有xSeries ...
- linux 服务器 安装网卡驱动,linux下安装编译网卡驱动的方法
安装linux操作系统后发现没有网卡驱动,表现为 system → Administration → Network下Hardware列表为空. 以下为安装编译网卡驱动的过程,本人是菜鸟,以下是我从网 ...
- linux双网卡驱动配置,linux网卡驱动安装、双网卡绑定
本次课程包含RAID0/1/5/6/10/50/60配置实验(使用Dell R720服务器实验).Redhat/CentOS/ubuntu/windows操作系统安装.windows/linux网卡绑 ...
最新文章
- 如何获取主机的IP址址
- unix command
- ALSM_EXCEL_TO_INTERNAL_TABLE
- Java zset 应用_Java简单使用redis-zset实现排行榜
- linux mesg 命令详解
- CSS自学笔记(15):CSS3多列布局
- 安装运行 rovio odometry
- 【渝粤教育】国家开放大学2019年春季 233学前儿童语言教育 参考试题
- Kindle阅读产品体验报告-随时随地畅享阅读
- 合并两个有序链表-python
- 怎么在Windows系统中制作Mac系统U盘启动盘?
- 计算机工程科学计算与仿真,BGPLUS实地科研 |中科院|计算机科学、计算机工程:计算机算法与数值建模实训...
- 指定Web打印的打印机
- 3DTouch Demo
- 将秒针声音加入JAVA_喜马拉雅联合秒针系统发布声音流广告报告
- Python正则re模块详解
- 前端js实现文字自动转拼音方法
- ubuntu黑屏有声音
- SQL Server安装提示安装程序无法通过windows update服务搜索更新
- Html画组织架构图