freebsd 安装配置技巧
2008-08-30 13:28
309 查看
配置网络:
手工修改配置文件。 /etc/rc.conf
linux_enable="YES"
sshd_enable="YES"
ifconfig_bce0="inet 192.168.1.28 netmask 255.255.255.0"
/etc/resolv.conf
设置DNS
nameserver 202.96.134.133
nameserver 202.96.128.86
/etc/inetd.conf
把需要开通的网络服务ftp、telnet等前面的'#'去掉。
最后重启
增加用户:
adduser
ftp:资源
ftp://ftp.freebsdchina.org
ifconfig_fx0="DHCP"
安装程序:
pkg_add -r 程序名
设置 资源下载地址:
编辑 用户目录下的 .cshrc 文件
增加:setenv PACKAGEROOT ftp://ftp.freebsdchina.org
FreeBSD portsnap的镜像
地址: portsnap.hshh.org
使用方法:
/etc/portsnap.conf 里面更改
SERVERNAME=portsnap.hshh.org
portsnap简介:
portsnap从6.0开始引进系统,给与用户方便的更新系统ports
portsnap的命令比较少
fetch 获取数据
extract 释放全部ports
update 更新ports
第一次使用可以 portsnap fetch extract
以后使用可以 portsnap fetch update
如果写在cron可以用 portsnap cron update
重开portsnap.hshh.org
这个是反向代理做的,只有用的人多才有效果。不是以前的全镜像,真不爽。
apache 安装
cd /usr/ports/www/apache22/
make install clean
apachectl start
echo ' apache2_enable="YES" ' >> /etc/rc.conf
使用ports 编译安装apache可能出现下面的错误:
[alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of ""
造成apache 不能启动
第一方法:
在/etc/hosts 下添加hostname
192.168.0.200 hostname
第二种方法
将httpd.conf里的ServerName 改为IP对应
No such file or directory: Failed to enable the ‘httpready’ Accept Filter
解决方法是:
#kldload accf_http并在 /boot/loader.conf 中加入下面 2 行,以便下次启动自动装载模块
accf_data_load="YES" # Wait for data accept filter
accf_http_load="YES" # Wait for full HTTP request accept filter
SCSI控制器是由cciss内核模块管理
http://lxr.mstier.de/linux/source/Documentation/cciss.txt
This driver is for Compaq's SMART Array Controllers.
002
003 Supported Cards:
004 ----------------
005
006 This driver is known to work with the following cards:
007
008 * SA 5300
009 * SA 5i
010 * SA 532
011 * SA 5312
012 * SA 641
013 * SA 642
014 * SA 6400
015 * SA 6400 U320 Expansion Module
016 * SA 6i
017 * SA P600
018 * SA P800
019 * SA E400
020 * SA P400i
021 * SA E200
022 * SA E200i
023 * SA E500
/dev/cciss/c0d0p* 是什么意思
对于直接接SCSI卡的硬盘设备名叫/dev/sda,sdb.......
而HP DL 380 530 570 580 他们的硬盘是接到整列卡上面的故叫/dev/cciss/c0d0px
c0:表示第一快控制器
d0:表示第一快磁盘
p1:表示第一快分区
(他的分区命名类似BSD的分区)
[root@linux root]# fdisk /dev/cciss/c0d0
The number of cylinders for this disk is set to 52299.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/cciss/c0d0: 555 heads, 320 sectors, 522999 cylinders
Units = cylinders of 8160 * 512 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 5230 21338384 7 HPFS/NTFS
/dev/cciss/c0d0p2 5231 52298 192037440 f Win95 Ext'd (LBA)
/dev/cciss/c0d0p5 5231 22180 69155984 83 Linux
/dev/cciss/c0d0p6 22181 37239 61440704 83 Linux
/dev/cciss/c0d0p7 37240 52169 60914384 83 Linux
/dev/cciss/c0d0p8 52170 52298 526304 82 Linux swap
Freebsd 编译内核
#更新源代码:
cp /usr/share/examples/cvsup/stable-supfile /root/stable-supfile
cd /root/
ee stable-supfile
#更改 default host = cvsup3.freebsdchina.org
#PING一下选择最快的
cvsup -L2 stable-supfile
#待更新完毕
cd /sys/i386/conf
cp GENERIC /root/kernel
cd /root/
ee kernel
#修改内核配置
ln - s kernel /sys/i386/conf/kernel
cd /usr/src
make buildkernel KERCONF=kernel
#视机器配置二十分钟至一小时不等编译完毕
make installkernel KERCONF=kernel
reboot
uname -a
#查看当前版本
如果有问题请用:
unload
boot kernel.old
linux下硬盘检测工具
linux下硬盘检测工具: smartmontools
工具主页: http://smartmontools.sourceforge.net/
Smartmontools for SCSI硬盘: http://smartmontools.sourceforge.net/smartmontools_scsi.html
简单用法:
1、smartctl -a <device> 检查该设备是否已经打开SMART技术。
2、smartctl -s on <device> 如果没有打开SMART技术,使用该命令打开SMART技术。
3、smartctl -t short <device> 后台检测硬盘,消耗时间短;
smartctl -t long <device> 后台检测硬盘,消耗时间长;
smartctl -C -t short <device> 前台检测硬盘,消耗时间短;
smartctl -C -t long <device> 前台检测硬盘,消耗时间长。
其实就是利用硬盘SMART的自检程序。
4、smartctl -X <device> 中断后台检测硬盘。
5、smartctl -l selftest <device> 显示硬盘检测日志。
6、smartctl -l error <device> 显示硬盘错误汇总。
Linux下惠普服务器硬盘维护技巧
出处:5DMail.Net收集整理 作者: 时间:2007-2-14 14:37:38
简单三步解决企业垃圾邮件难题
硬盘维护方法
1. 用命令:“w”或“uptime“ 查看up X day,系统运行的天数。
2. 在检测前如果需要重新启动,必须先停掉所有进程和服务,如APACHE和ORACLE等。
3. 用命令:tune2fs –l /dev/cciss/c0d0pX 查看Last checked: 和Next check after:当前检查最新的日期,和下一次检察的日期,用来判断是否重新启动自动检查或手动检查。
4. 如果Next check after的天数距离现在大于180天则用手动检查.反之重新启动自动检查,
1. 种:对于硬盘数量少的,或数据占用硬盘比例小的可以直接启动自检。
2. 种:对于硬盘数量多,数据占硬盘空间又大的,需要修改/etc/fstab,例如盘柜,将fstab中盘柜的硬盘注释掉,(VI快捷键“:X行数,Y行数s/^/#/”)从X行到Y行信息注释掉。然后重新启动,一块盘一块盘检测。检测命令和顺序:fsck –y /dev/cciss/c1d0p1 & fsck –y /dev/cciss/c1d1p1 & fsck –y /dev/cciss/c1d0p2 & fsck –y /dev/cciss/c1d1p2 & 先将p后面相同的先检测,然后改变d的值。用jobs命令显示当然后台运行任务。
5. 强制启动系统检测: 在数据占硬盘空间较多并且是自动检测的时候需要通过single模式启动并检测,步骤:重启后到LILO的时候按键盘上的TAB键进入输入模式打2.4.21-27.02smp console=tty0 single 回车,当以single模式启动后,首先把所有的盘先umount掉,再用命令:fsck –yf /dev/cciss/c0d0p1开始检测。
hp 阵列卡工具
http://h50176.www5.hp.com/support/399519-AA1/drivers/os_2026.html#b2db3cf0
http://gentoo-wiki.com
手工修改配置文件。 /etc/rc.conf
linux_enable="YES"
sshd_enable="YES"
ifconfig_bce0="inet 192.168.1.28 netmask 255.255.255.0"
/etc/resolv.conf
设置DNS
nameserver 202.96.134.133
nameserver 202.96.128.86
/etc/inetd.conf
把需要开通的网络服务ftp、telnet等前面的'#'去掉。
最后重启
增加用户:
adduser
ftp:资源
ftp://ftp.freebsdchina.org
ifconfig_fx0="DHCP"
安装程序:
pkg_add -r 程序名
设置 资源下载地址:
编辑 用户目录下的 .cshrc 文件
增加:setenv PACKAGEROOT ftp://ftp.freebsdchina.org
FreeBSD portsnap的镜像
地址: portsnap.hshh.org
使用方法:
/etc/portsnap.conf 里面更改
SERVERNAME=portsnap.hshh.org
portsnap简介:
portsnap从6.0开始引进系统,给与用户方便的更新系统ports
portsnap的命令比较少
fetch 获取数据
extract 释放全部ports
update 更新ports
第一次使用可以 portsnap fetch extract
以后使用可以 portsnap fetch update
如果写在cron可以用 portsnap cron update
重开portsnap.hshh.org
这个是反向代理做的,只有用的人多才有效果。不是以前的全镜像,真不爽。
apache 安装
cd /usr/ports/www/apache22/
make install clean
apachectl start
echo ' apache2_enable="YES" ' >> /etc/rc.conf
使用ports 编译安装apache可能出现下面的错误:
[alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of ""
造成apache 不能启动
第一方法:
在/etc/hosts 下添加hostname
192.168.0.200 hostname
第二种方法
将httpd.conf里的ServerName 改为IP对应
No such file or directory: Failed to enable the ‘httpready’ Accept Filter
解决方法是:
#kldload accf_http并在 /boot/loader.conf 中加入下面 2 行,以便下次启动自动装载模块
accf_data_load="YES" # Wait for data accept filter
accf_http_load="YES" # Wait for full HTTP request accept filter
SCSI控制器是由cciss内核模块管理
http://lxr.mstier.de/linux/source/Documentation/cciss.txt
This driver is for Compaq's SMART Array Controllers.
002
003 Supported Cards:
004 ----------------
005
006 This driver is known to work with the following cards:
007
008 * SA 5300
009 * SA 5i
010 * SA 532
011 * SA 5312
012 * SA 641
013 * SA 642
014 * SA 6400
015 * SA 6400 U320 Expansion Module
016 * SA 6i
017 * SA P600
018 * SA P800
019 * SA E400
020 * SA P400i
021 * SA E200
022 * SA E200i
023 * SA E500
/dev/cciss/c0d0p* 是什么意思
对于直接接SCSI卡的硬盘设备名叫/dev/sda,sdb.......
而HP DL 380 530 570 580 他们的硬盘是接到整列卡上面的故叫/dev/cciss/c0d0px
c0:表示第一快控制器
d0:表示第一快磁盘
p1:表示第一快分区
(他的分区命名类似BSD的分区)
[root@linux root]# fdisk /dev/cciss/c0d0
The number of cylinders for this disk is set to 52299.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/cciss/c0d0: 555 heads, 320 sectors, 522999 cylinders
Units = cylinders of 8160 * 512 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 5230 21338384 7 HPFS/NTFS
/dev/cciss/c0d0p2 5231 52298 192037440 f Win95 Ext'd (LBA)
/dev/cciss/c0d0p5 5231 22180 69155984 83 Linux
/dev/cciss/c0d0p6 22181 37239 61440704 83 Linux
/dev/cciss/c0d0p7 37240 52169 60914384 83 Linux
/dev/cciss/c0d0p8 52170 52298 526304 82 Linux swap
Freebsd 编译内核
#更新源代码:
cp /usr/share/examples/cvsup/stable-supfile /root/stable-supfile
cd /root/
ee stable-supfile
#更改 default host = cvsup3.freebsdchina.org
#PING一下选择最快的
cvsup -L2 stable-supfile
#待更新完毕
cd /sys/i386/conf
cp GENERIC /root/kernel
cd /root/
ee kernel
#修改内核配置
ln - s kernel /sys/i386/conf/kernel
cd /usr/src
make buildkernel KERCONF=kernel
#视机器配置二十分钟至一小时不等编译完毕
make installkernel KERCONF=kernel
reboot
uname -a
#查看当前版本
如果有问题请用:
unload
boot kernel.old
linux下硬盘检测工具
linux下硬盘检测工具: smartmontools
工具主页: http://smartmontools.sourceforge.net/
Smartmontools for SCSI硬盘: http://smartmontools.sourceforge.net/smartmontools_scsi.html
简单用法:
1、smartctl -a <device> 检查该设备是否已经打开SMART技术。
2、smartctl -s on <device> 如果没有打开SMART技术,使用该命令打开SMART技术。
3、smartctl -t short <device> 后台检测硬盘,消耗时间短;
smartctl -t long <device> 后台检测硬盘,消耗时间长;
smartctl -C -t short <device> 前台检测硬盘,消耗时间短;
smartctl -C -t long <device> 前台检测硬盘,消耗时间长。
其实就是利用硬盘SMART的自检程序。
4、smartctl -X <device> 中断后台检测硬盘。
5、smartctl -l selftest <device> 显示硬盘检测日志。
6、smartctl -l error <device> 显示硬盘错误汇总。
Linux下惠普服务器硬盘维护技巧
出处:5DMail.Net收集整理 作者: 时间:2007-2-14 14:37:38
简单三步解决企业垃圾邮件难题
硬盘维护方法
1. 用命令:“w”或“uptime“ 查看up X day,系统运行的天数。
2. 在检测前如果需要重新启动,必须先停掉所有进程和服务,如APACHE和ORACLE等。
3. 用命令:tune2fs –l /dev/cciss/c0d0pX 查看Last checked: 和Next check after:当前检查最新的日期,和下一次检察的日期,用来判断是否重新启动自动检查或手动检查。
4. 如果Next check after的天数距离现在大于180天则用手动检查.反之重新启动自动检查,
1. 种:对于硬盘数量少的,或数据占用硬盘比例小的可以直接启动自检。
2. 种:对于硬盘数量多,数据占硬盘空间又大的,需要修改/etc/fstab,例如盘柜,将fstab中盘柜的硬盘注释掉,(VI快捷键“:X行数,Y行数s/^/#/”)从X行到Y行信息注释掉。然后重新启动,一块盘一块盘检测。检测命令和顺序:fsck –y /dev/cciss/c1d0p1 & fsck –y /dev/cciss/c1d1p1 & fsck –y /dev/cciss/c1d0p2 & fsck –y /dev/cciss/c1d1p2 & 先将p后面相同的先检测,然后改变d的值。用jobs命令显示当然后台运行任务。
5. 强制启动系统检测: 在数据占硬盘空间较多并且是自动检测的时候需要通过single模式启动并检测,步骤:重启后到LILO的时候按键盘上的TAB键进入输入模式打2.4.21-27.02smp console=tty0 single 回车,当以single模式启动后,首先把所有的盘先umount掉,再用命令:fsck –yf /dev/cciss/c0d0p1开始检测。
hp 阵列卡工具
http://h50176.www5.hp.com/support/399519-AA1/drivers/os_2026.html#b2db3cf0
http://gentoo-wiki.com
相关文章推荐
- FreeBSD下SSH安装配置
- freebsd 6.2 安装配置笔记[转]
- FreeBSD下安装配置Hadoop集群(性能调优)
- 【SPOTO】GNS3使用技巧连载-01安装配置指南【SIN笔记】
- FreeBSD下SSH安装配置
- 10步完成freebsd下 python+django+fastcgi+lighttpd+sqlite3 源码安装与配置.
- FreeBSD网站平台建设全过程(六、安装配置视频点播服务器)
- Freebsd安装配置Xcache
- freebsd6.2的gnome2桌面安装配置手记
- freebsd下安装sphinx及其配置文件和分布式检索
- freebsd反安装另一技巧pkg_delete
- 在 FreeBSD 10.2 上如何通过配置 Apache 和 SSL 安装 Bugzilla
- ACE安装配置--ubuntu技巧
- FreeBSD从零开始---安装后配置
- opensips源代码安装与配置的技巧方法
- mysql 5.7.20下载、安装和配置方法及简单操作技巧(解压版免安装)
- NagiosQL--FreeBSD下安装Nagios可视化配置工具
- FreeBSD安装zabbix ——web页面配置篇
- FreeBSD从零开始---安装后配置(三)
- FreeBSD iscsi 安装配置