FreeBSD系统安装规范Word格式.docx

上传人:b****6 文档编号:18594984 上传时间:2022-12-29 格式:DOCX 页数:26 大小:914.06KB
下载 相关 举报
FreeBSD系统安装规范Word格式.docx_第1页
第1页 / 共26页
FreeBSD系统安装规范Word格式.docx_第2页
第2页 / 共26页
FreeBSD系统安装规范Word格式.docx_第3页
第3页 / 共26页
FreeBSD系统安装规范Word格式.docx_第4页
第4页 / 共26页
FreeBSD系统安装规范Word格式.docx_第5页
第5页 / 共26页
点击查看更多>>
下载资源
资源描述

FreeBSD系统安装规范Word格式.docx

《FreeBSD系统安装规范Word格式.docx》由会员分享,可在线阅读,更多相关《FreeBSD系统安装规范Word格式.docx(26页珍藏版)》请在冰豆网上搜索。

FreeBSD系统安装规范Word格式.docx

Insert>

键选中您要配置阵列的物理硬盘,回车后回答Y后进行磁盘初始化;

注意:

此步操作会破坏硬盘上原有的数据

4、光标选择CreateContainer回车,用<

键选中您要配置阵列的物理硬盘,回车后出现ContainerProperties选项,根据您的要求选择Raid级别后将光标移到[Done]回车接受配置

5、按<

Esc>

退出阵列配置工具,系统自动Reboot

M>

进入阵列配置菜单

2、光标移到Configure选项上回车,在将光标移到NewConfiguration上回车,回答Yes

3、用空格见依次选中您要配置阵列的硬盘,选中的硬盘光标会不断闪动,硬盘的状态会由Ready变为Online,选择完后可用回车键结束选择

4、此时按下F10键,出现Logicaldrive信息菜单,可以将光标移到Raid选项上按要求选择Raid级别,在Size选项上配置LogicalDrive的容量大小。

配置完成后将光标移到Accept后回车

Esc>

键退出,屏幕提示是否SaveConfiguration?

回答Yes后提示配置被保存,按<

键退回主菜单

6、将光标移到Initialize上回车,屏幕提示用空格键选中要初始化的LogicalDrive,按下F10键后提示是否要进行初始化操作,回答Yes后开始初始化;

当有多个LogicalDrive,请小心选择

7、屏幕会显示的进度条,当进度完成100%后,按<

键退出阵列配置工具重启系统。

 

1.2.开始安装

1.2.1.设置服务器的CMOS

从光驱第一个启动,放入安装光盘。

我们这次安装采用6.1-RELEASE-i386-disc1.iso光盘,FreeBSD最新的RELEASE为6.2。

选择第一项,回车即可。

第四项为单用户模式。

用空格或回车选择UnitedStates。

移动鼠标选择Standard。

回车即可。

1.2.4.硬盘分区

选择硬盘(一般我们的服务器大多有两个硬盘),先选择第一个操作,移动鼠标到ad0,按空格键进入。

进入第一个硬盘ad0

按A,使用整个硬盘(因为安装FreeBSD只能安装在FreeBSD默认的freebsd分区上,格式为ufs)。

记住在分好的区,移动鼠标到第二个区ad0s1上按S键,设置该区可启动!

按Q完成分区过程。

安装启动管理

一般只安装一个操作系统,不存在多个系统多引导情况,所以选择Standard即可。

同样的方法操作第二个硬盘ad1,在分区只用整个硬盘时,按A,然后按Q退出即可,不用设置ad1s1为可启动,这个硬盘的启动管理器也选择None即可。

按TAB键,选择OK,进入磁盘标签编辑。

两个硬盘都要选择,硬盘符号前面有X,表示已选择。

1.2.5.磁盘标签编辑

选择第一个磁盘ad0

按C创建分区,大小输入3000M,按OK。

选择FS,文件系统。

输入挂载点,输入/。

按照以下分区大小的方法,

/3000M

/usr3000M

/home4000M

/var5000M

/swap2048M(2GRAM,/swap约等于内存大小2倍)

/opt5000M

/data1120G

/data2146G(第二个硬盘作为整个分区)

编辑分区标签完成,按Q进入下一步。

1.2.6.ChooseDistributions选择安装包

移动鼠标选择Minimal,然后进入Custom,选择man、src->

sys.

Man:

不清楚一些命令的用法时可用。

src->

sys:

重新编译FreeBSD的内核所需的源代码。

1.2.7.选择安装介质

选择CD/DVD。

我们选择最小化安装,很快就安装好了。

(1)配置网卡:

选择YES,这里需要注意的是,一般我们的服务器有两块网卡,系统检测出两块网卡,FreeBSD中网卡的命名,不是eth0、eth1之类的,而是已检测到该网卡时,系统所加载的模块命名的,如bge、lnc、fxp等。

安装界面,只配置一块网卡,另一块网卡,安装完毕,进入系统候再配置。

如这里,检测到两块网卡:

选择lnc0,进行配置。

关闭Ipv6的支持。

关闭DHCP

按照需求输入IP地址等相关网络信息。

接下来,启用该网卡。

是否把机器作为网关使用?

选择否。

(2)关闭inetd

(3)启用SSH

(4)设置匿名FTP,NFSserver,NFSclient

选择NO

(5)设置时区

选择的时区:

(6)安装FreeBSD可兼容Lnux软件包

选择Yes。

(7)接下来,会让你选择FreeBSD的其它package

选择Yes,进入选择:

Perl5->

perl5.88

然后OK,选择install即可。

这一步必须选择,这是安装Squid所需的。

(8)增加用户

默FreeBSDroot用户能远程登陆的,只有wheel组的用户才可以su为root。

(9)接下来是设置root的密码。

然后按照提示,重启机器。

(10)安装完毕。

2.安装后注意事项

2.1.编辑系统启动文件

编辑系统启动文件/etc/rc.conf

这里以体育东的一台机器作为例子:

#--sysinstallgenerateddeltas--#ThuSep700:

27:

322006

#Created:

ThuSep700:

#Enablenetworkdaemonsforuserconvenience.

#Pleasemakeallchangestothisfile,notto/etc/defaults/rc.conf.

#Thisfilenowcontainsjusttheoverridesfrom/etc/defaults/rc.conf.

defaultrouter="

10.17.0.1"

#默认路由

hostname="

tyd21"

#机器名

ifconfig_em0="

inet10.18.12.21netmask255.255.0.0"

#配置第一块网卡

ifconfig_em1="

inet10.17.12.21netmask255.255.0.0"

#配置第二块网卡

#routeadd-net10.0.0.010.17.0.10255.0.0.0#加路由

#routeadd-net172.16.0.010.17.0.1255.240.0.0#加路由

#routeadd-net192.168.0.010.17.0.1255.255.0.0#加路由

inetd_enable="

NO"

#关闭inetd

linix_enable="

YES"

#启用Linux软件兼容

sshd_enable="

#启用SSH

usbd_enable="

#关闭USB

sendmail_enable="

NONE"

#关闭sendmail

nfs_sercer_enable="

#关闭NFSserver

nfs_client_enable="

#关闭NFSclient

portmap_enable="

#关闭Portmap

syslogd_enable="

#开启系统日志记录

syslogd_flags="

-ss"

#关闭因开启syslog而开启的514端口

update_motd="

#关闭开机更新motd

blanktime="

90"

#设置屏保时间

saver="

logo"

#设置屏保时的图片

firewall_enable="

#启用IPFW防火墙

firewall_type="

open"

#启用的防火墙默认规则为全部通过

firewall_quiet="

#增加防火墙规则时,不显示相关信息

firewall_logging_enable="

#不记录防火墙规则匹配的情况

#降低TCP/IP中TIMEWAIT状态,让系统循环使用TIME_WAIT

sysctl-wnet.ipv4.tcp_tw_reuse=1

sysctl-wnet.ipv4.tcp_tw_recycle=1

#下面是Squid的优化选项

sysctl-wkern.maxfiles=65536#系统可打开文件数

#加大临时端口范围

sysctl-wnet.inet.ip.portrange.last=30000

sysctl-wkern.maxfilesperproc=4096

/root/ipfw.sh

2.2.编辑防火墙

编辑防火墙/root/ipfw.sh,增加该文件的可执行权限。

通用脚本如下:

#!

/bin/sh

#

CMD="

ipfw-qadd"

OFFICE="

219.136.222.90"

OFFICE2="

219.136.222.89"

TYD="

61.140.60.0/24"

TYD2="

202.104.32.0/24"

DG="

218.16.123.0/24"

DG2="

59.36.102.0/24"

XA="

218.30.69.0/24"

HB="

222.222.1.0/24"

HB2="

221.192.129.0/24"

HZ="

61.140.60.9"

HZ2="

61.140.60.33"

INTERNAT="

10.0.0.0/8"

SSH_PORT="

22"

SSH_PORT2="

48022"

SSH_PORT3="

58022"

FTP_PORT="

21"

FTP_PORT2="

48021"

FTP_PORT3="

58021"

HTTP_PORT="

80"

HTTP_PORT2="

8080"

HTTP_PORT3="

8081"

RSYNC_PORT="

873"

RSYNC_PORT2="

20873"

RSYNC_PORT3="

40873"

LOOP()

{

ipfw-q-fflush

$CMD100passallfromanytoanyvialo0

$CMD200denyallfromanyto127.0.0.0/8

$CMD300denyipfrom127.0.0.0/8toany

$CMD65000passallfromanytoany

}

#setdefault

LOOP

###############startofipfwrulesscript#############

#forSSH_PORTACCEPTLIST

$CMD00501allowtcpfrom$OFFICEtome$SSH_PORTin

$CMD00502allowtcpfrom$OFFICE2tome$SSH_PORTin

$CMD00503allowtcpfrom$TYDtome$SSH_PORTin

$CMD00504allowtcpfrom$TYD2tome$SSH_PORTin

$CMD00505allowtcpfrom$DGtome$SSH_PORTin

$CMD00506allowtcpfrom$DG2tome$SSH_PORTin

$CMD00507allowtcpfrom$XAtome$SSH_PORTin

$CMD00508allowtcpfrom$HZtome$SSH_PORTin

$CMD00509allowtcpfrom$HZ2tome$SSH_PORTin

$CMD00510allowtcpfrom$HBtome$SSH_PORTin

$CMD00511allowtcpfrom$HB2tome$SSH_PORTin

$CMD00512allowtcpfrom$INTERNATtome$SSH_PORTin

$CMD00601allowtcpfrom$OFFICEtome$SSH_PORT2in

$CMD00602allowtcpfrom$OFFICE2tome$SSH_PORT2in

$CMD00603allowtcpfrom$TYDtome$SSH_PORT2in

$CMD00604allowtcpfrom$TYD2tome$SSH_PORT2in

$CMD00605allowtcpfrom$DGtome$SSH_PORT2in

$CMD00606allowtcpfrom$DG2tome$SSH_PORT2in

$CMD00607allowtcpfrom$XAtome$SSH_PORT2in

$CMD00608allowtcpfrom$HZtome$SSH_PORT2in

$CMD00609allowtcpfrom$HZ2tome$SSH_PORT2in

$CMD00610allowtcpfrom$HBtome$SSH_PORT2in

$CMD00611allowtcpfrom$HB2tome$SSH_PORT2in

$CMD00612allowtcpfrom$INTERNATtome$SSH_PORT2in

$CMD00701allowtcpfrom$OFFICEtome$SSH_PORT3in

$CMD00702allowtcpfrom$OFFICE2tome$SSH_PORT3in

$CMD00703allowtcpfrom$TYDtome$SSH_PORT3in

$CMD00704allowtcpfrom$TYD2tome$SSH_PORT3in

$CMD00705allowtcpfrom$DGtome$SSH_PORT3in

$CMD00706allowtcpfrom$DG2tome$SSH_PORT3in

$CMD00707allowtcpfrom$XAtome$SSH_PORT3in

$CMD00708allowtcpfrom$HZtome$SSH_PORT3in

$CMD00709allowtcpfrom$HZ2tome$SSH_PORT3in

$CMD00710allowtcpfrom$HBtome$SSH_PORT3in

$CMD00711allowtcpfrom$HB2tome$SSH_PORT3in

$CMD00712allowtcpfrom$INTERNATtome$SSH_PORT3in

$CMD00990droptcpfromanytome$SSH_PORTin

$CMD00991droptcpfromanytome$SSH_PORT2in

$CMD00992droptcpfromanytome$SSH_PORT3in

#forftp

$CMD01501allowtcpfrom$OFFICEtome$FTP_PORTin

$CMD01502allowtcpfrom$OFFICE2tome$FTP_PORTin

$CMD01503allowtcpfrom$TYDtome$FTP_PORTin

$CMD01504allowtcpfrom$HZtome$FTP_PORTin

$CMD01505allowtcpfrom$HZ2tome$FTP_PORTin

$CMD01506allowtcpfrom$INTERNATtome$FTP_PORTin

$CMD01601allowtcpfrom$OFFICEtome$FTP_PORT2in

$CMD01602allowtcpfrom$OFFICE2tome$FTP_PORT2in

$CMD01603allowtcpfrom$TYDtome$FTP_PORT2in

$CMD01604allowtcpfrom$HZtome$FTP_PORT2in

$CMD01605allowtcpfrom$HZ2tome$FTP_PORT2in

$CMD01606allowtcpfrom$INTERNATtome$FTP_PORT2in

$CMD01701allowtcpfrom$OFFICEtome$FTP_PORT3in

$CMD01702allowtcpfrom$OFFICE2tome$FTP_PORT3in

$CMD01703allowtcpfrom$TYDtome$FTP_PORT3in

$CMD01704allowtcpfrom$HZtome$FTP_PORT3in

$CMD01705allowtcpfrom$HZ2tome$FTP_PORT3in

$CMD01706allowtcpfrom$INTERNATtome$FTP_PORT3in

$CMD01990droptcpfromanytome$FTP_PORTin

$CMD01991droptcpfromanytome$FTP_PORT2in

$CMD01992droptcpfromanytome$FTP_PORT3in

#forhttp

#$CMD02501allowtcpfromanytome$HTTP_PORTin

#$CMD02502allowtcpfromanytome$HTTP_PORT2in

#$CMD02503allowtcpfromanytome$HTTP_PORT3in

#ForRSYNC

$CMD03501allowtcpfrom$OFFICEtome$RSYNC_PORTin

$CMD03502allowtcpfrom$OFFICE2tome$RSYNC_PORTin

$CMD03503allowtcpfrom$TYDtome$RSYNC_PORTin

$CMD03504allowtcpfrom$TYD2tome$RSYNC_PORTin

$CMD03505allowtcpfrom$DGtome$RSYNC_PORTin

$CMD03506allowtcpfrom$DG2tome$RSYNC_PORTin

$CMD03507allowtcpfrom$XAtome$RSYNC_PORTin

$CMD03508allowtcpfrom$HZtome$RSYNC_PORTin

$CMD03509allowtcpfrom$HZ2tome$RSYNC_PORTin

$CMD03510allowtcpfrom$HBtome$RSYNC_PORTin

$CMD03511allowtcpfrom$HB2tome$RSYNC_PORTin

$CMD03512allowtcpfrom$INTERNATtome$RSYNC_PORTin

$CMD03601allowtcpfrom$OFFICEtome$RSYNC_PORT2in

$CMD03602allowtcpfrom$OFFICE2tome$RSYNC_PORT2in

$CMD03603allowtcpfrom$TYDtome$RSYNC_PORT2in

$CMD03604allowtcpfrom$TYD2tome$RSYNC_PORT2in

$CMD03605allowtcpfrom$DGtome$RSYNC_PORT2in

$CMD03606allowtcpfrom$DG2tome$RSYNC_PORT2in

$CMD03607allowtcpfrom$XAtome$RSYNC_PORT2in

$CMD03608allowtcpfrom$HZtome$RSYNC_PORT2in

$CMD03609allowtcpfrom$HZ2tome$RSYNC_PORT2in

$CMD03610allowtcpfrom$HBtome$RS

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 商务科技

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1