BAMP环境搭建手册_第1页
BAMP环境搭建手册_第2页
BAMP环境搭建手册_第3页
BAMP环境搭建手册_第4页
BAMP环境搭建手册_第5页
已阅读5页,还剩49页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

InformationSecurityServiceProfessionalProvider(ISSPP)

信息宁静办事专业提供商

BAMP情况搭建手册

SXECiUnREBNEsTWwORKaS.y

河北鑫博威网络科技有限公司

二O-O年二月

目录

一、BSD系统安装3

二、根本配置22

2.1网卡配置22

2.2SSH酉乙置23

三、BAMP情况搭建28

3.1安装Mysql28

3.2安装php5-Mysql33

3.3Apache安装34

3.4安装php36

3.5安装php5_extensions38

3.6配置Apache与php兼容42

3.7phpmyadmin安装44

四、宣布网站论坛48

BSD系统安装

在VMWare中新建一个虚拟机,操纵系统选择"其他fFreeBSD"其它选项默认。设置

CD-ROM为虚拟光驱的位置,将系统映像加载到虚拟光驱中。

典范设置

版本选择FreeBSD

选择安装目录

NewVirtualBachineVizardX

MetvorkType

Whattypeofnetworkdoyouwanttoadd?

Networkconnection

OUsebridgednetworking

GivetheguestoperatingsystemdirectoccesstoonexternalCthcrnc^network.

TheguestmusthaveitsownIPaddressontheexternalnetwork.

OUsenetworkaddresstranslation(NAT)

Givetheguestopeiatingsystemaccesstothehostcomputer'sdial-upor

externalEthernetnetworkconnectionusingthehost'sIPaddress.

O'Usehost-onlynetworking

Connecttheguestoperatingsystemtoaprivatevirtualnetworkonthehost

computer.

ODono]useanetworkconnection

「上一步[下一步由)>][取消]

设置网络类型:桥接网络

HewVirtualMachineVizard

Speci£yDiskCapacity

Howlargedoyouwantthisdisktobe?

Diskcapacity

Thisvirtualdiskcanneverbelargerthanthemaximumcapacitythatyousethere.

Disksize(GB):8.00

IIAllocatealldiskspacenow.

Byallocatingthefullcapacityofthevirtualdisk,youenhanceperformanceof

yourvirtualmachine.However,thediskwilllakelongertocreateandtheremust

beenoughspaceonthehost'sphysicaldisk.

Ifyoudonotallocatediskspacenow,yourvirtualdiskfileswillstartsmallthen

becomelargerasyouaddapplications,files,anddatatoyourvirtualmachine.

□Splitdiskinto2GBMes.

「上一步电)][完成取消

设置虚拟硬盘巨细

CD-ROI(IDE1:0)X

Devicestatus

_Connected

Devices

0Connectatpoweron

00Memory256MB

ConnecbonQH»rdDiskCEDE0:0)80GB

OUsephysicaldrive:售CD-ROMODE1:0)Autodetect

昌FloppyAutodetect

^^EthernetBridged

onnectexclusivelytothisvitualmachine^^USBControllerPr«zant

egacyemulationQ》SoundAdapterAutodetect

K©U$eISOimage:以DisplayAutodetect

Processors1

F:\田振博Wanabi筵\8.0和||艮rowse…]

|AdYanced...

OK][Cancel][Hdp]

插入系统镜像

启动虚拟机进入FreeBSD启动的画面

选择国度我们伟大的祖国中国45

ountrylection

Pleasechooseacountry,region,orgroup.

SelectaniteMusing[SPACE]or[ENTER].

CapeUerde

Ca^ManIslands

Centra1AfricanRepublic

Chad

Chile

1的hina

ChristnasIsland

7Cocos(Keeling)Islands

8ColoMbia

9COMOFOS

0Congo

1Congo,theDeMocraticRepub1icofthe

2CookIslands

3CostaRica

Cance1

标准键盘类型

insole

ThedefaultsystenconsoledriverforFreeBSD(s^scons)defaults

toastandard''Anerican'1keyboardwap.Usersinothercountries

(orMithdifferentkeyboardpreferences)nayHishtochooseoneof

theotherkeyriapsbeloM.

Notethats^sinstal1itse1fonlyusesthepartofthekeyboardmap

MhichisrequiredtogeneratetheANSIcharactersubset,butyour

choiceofkeyxapMi11alsobesavedforlater(fuller)use.

UkrainianK0I8-UUkrainianKOI8-Ukeyzap

UkrainianKOI8-U+K0I8-RUkrainianKO18-U+KOI8-Rkeycap(alter)

USACapsLock->Ctr1standard(CapsasL-Contro1)

USADvorakDvorakkeycap

USADvorak(left)lefthandedDvorakkeynap

USADvorak(right)righthandedDvorakkepwap

USfiEnacsstandardoptizizodforEMACS

USAISI)ISOkeynap

traditiona1UNIX-workstation

Cance1

接下来就是系统安装主菜单,FreeBSD的安装配置全部可以在这里设置,使用上下箭头

移动到差别的选项,按下空格大概回车进入,英文欠好的朋友不消担心,其实这里的英

文很简单在这里我们选择Standard标准安装

nsi

Uleleonetoth©FreeBSDinsta1lationandconfigurationtool.Please

selectoneoftheoptionsbeIOHbyusingthearrowkeysortypingthe

firstcharacterofIheoptionnaMeyou*reinterestedin.Invokean

optionHith(SPACE]or(ENTER].Toexit,use[TAB]toMovetoExit.

Quickstart-HOHtousethisMenusysteM

[gndcird,

IxpressBeginaquickinstallation(forexperts)

CustOMBoginacustOMinsta1lation(forexperts)

onfigureDopost-insta11configurationofFreeBSD

ocInsta1lationinstructions,README,etc.

eyMupSelectkeyboardtype

ptionsUieui/Setvariousinsta1lationoptions

ixitRepairModeHithCDROM/DUD/flopp^orstartshe11

pgradeUpgradeanexistingsysteM

oadConfigLoaddefauItinsta11configuration

ndexGlossaryoffunctions

lectXExitInstal1

^ssage

InthenextMenu,youwillneedtosetupaDOS-st^le("fdisk")partitioning

schetieforyourharddisk.IfyousizplyHishtodevotea11diskspace

toFreeBSD(overMritinganythingelsethatMightbeonthedisk(s)selected)

thenusethe(A)11coMwandtoselectthedefaultpartitioningscheMefollouied

bya(Q)uit.Ifyouzishtoa1locateonlyfreespacetoFreeBSD,Movetoa

partitionMarked“unused“andusethe(C)reatecoMMand.

(iee%)

Pressenterorspace]

FreeBSD的分区和一般的Linux不太一样,先要分别出一块FreeBSD专用空间称作Slice,然后

再在这块Slice里分区(分区叫做Label)。A自动分区S设置启动Q生存退出

这是FreeBSD的FDISKPartitionEditor,第2行显示的是VMware存放FreeBSD目录所在

Win2K里面的分区巨细,可以看到是8G左右的空间,因为这是测试用的,就使用整个分

区来安装FreeBSD的话,按A,使用整个分区,如果你不想使用整个分区的话,按C来定

制分区,可以直接输入M为单位的,按D是删除当前分区,Q键是生存分区,手动分区

的话,分区类型选择默认的165,直接回车就行了。

Disknane:JQQ]■工■iTW

DISHGeoMetry:17753cyls/15heads/63sectors=16776585sectors(8191MB)

OffsetSize(ST)EndWanePTypeDescSubtypeFlags

06362-12unused0

631677652216776584ad8sl8freebsd165A

1677658563116777215-12unused0

ThefollouingcoMMandsaresupported(inupperorloNercase):

A=UseEntireDiskIj=setDriveGeoiietryC=CreateSlice

D=DeleteSIice:Z=ToggleSizeUnitsS=SetBootable•=ExpertM.

T=ChangeType1J=Undofi11ChangesQ=Finish

UseFlor?togetworehelp,arrowkeystoselect•

启动治理选项,多系统选择"BootMgr”,只装Freebsd就选第一个。

FreeBSDCOMCSMithabootManager1hatallOMStoeasily

selectbetweenFreeBSDandanyotheroperatingeMSon$/ourMachine

atboottiMe.If^cuhaveMorethanonedriveandMant1oboot

froMthesecondon。,thobootnngorMi11a1soMnkeitpossib1Q

todoso(1iMitationsinthePCBIOSusuallypreventthisotherwise).

If“illonlyhavesFrtstsBSDonth<st-tachfinoth”bootM<Inaguris

notneededanditsIOMSdokinthebootuhileofferingyouthechoice

ofMHichoperatingsysteMtoboot.IfyoudonotMantaboot

r»an«ger,orMishtorep1aceanexistingone,seIect''standard.

Ifwouldprefer^iourMasterBootRecordreMa1nuntouchedthen

1UJ,lltf.

NOTE:PC-DOSusursM111aiMOstcertainlyruq*ire''Non。'',

;tta11astaydamd「BW(nobootManager)

InstalltheFreeBSDBootMannger

LeavetheMasterBootRecorduntouched

NOHyouneedtocreateBSDpartitionsinsideofthefdiskpartition(s)

justcreated.IfyouhaveareasonableaMountofdiskspace(1GBorMore)

anddon'thaveanyspecialrequireMents,sinplyusethe(ft)utoCOMMAndto

a1locatespaceautomatically.Ifyouhaveworespecificneedsorjustdon't

careforthelayoutchosenby(A)uto,pressFlforworeinforMationon

Manuallayout.

(108%)

Pressenterorspace]

选择A自动分区,Q退出,自动选择系统分区即可,也可以凭据自己情况手动分区,C键

分区

Fre&bSUDisKlabelEditor

Disk:ad0Partilionnane:adOslFree:0blocks(0MB)

PartMountSizeNeHfsPartMountSizeNeufs

adBsla/435MBUFS2Y

ndBslbsnap344MBSNAP

adesld/var755MBUFS2+SY

ndBsleZtMp396MBUFS2*SY

ddBslf/usr6261MBUFS2+SY

e

followingCOMMAndsarevalidhere(upperorlowercase):

Tcl=

CreateD=DeleteM=Mountpt.

N=

T=NeuifsOptsQ=FinishS=ToggleSoftUpdatesZ=CustoMNeHfs

ToggleNeufsU=UndoA=AutoDefauItsR=Delete♦Morge

选择所要安装的内容,这里为了方便演示选择All

Asaconvenience,ueprovidesevera1"canned''distributionsets.

Thesesso1ec<zha,consider-iobe-fher-iostreasenabledefauItsforthe

typeofsysteMinquestion.1fyouHOUIdprefertopickandchoosethe

listofdistributionsyourself,sinplyselect',CustOMM.YOUcanaIso

pickacanneddistributionsetandthenfine-tuneitHiththeCustoMiten.

ChooseanitGMbypressing(SPACE]or[ENTER].Ullisnfinished,choosethe

ExititeMorMovetotheOKbuttonHith[TABI.

Q<BExitthisMenu(returningtoprevious)11

AllsysteMsourcesandbinaries

esetResetselecteddistribution1isttonothing

rxiDeveloperFu11sources,binariesanddocbutnoganes

[XJKern-Deve1operFullbinariesanddoc,kerne1sourcesonly

[X]UserAverageuser-binariesanddoconly

l】MininalTheSMA1lestconfigurationpassible

>>Specifyyourokindistributionset

L_UKJ

PressFlfurMore1nfurMatIononoption

选择安装方法这里选择CD/DVD

FreoBSDc<inboinstalledfCOMavarietyofdifferentinstallation

Media,rangftngfTOMf1oppftestoanInternetFTPserver.Ifyou're

insta11ingFreeBSDfTOMasupportedCD/DUDdrivethenthisisgenera11^

thebestMediatouseifpouhavenooverridingreasonforusingother

Modfia.

开始安装

UserConfirnationRequested

LastChance?AreyouSUREyouuantcontinuetheinsta1lation?

Ifyou'rerunningthisonadiskNithdatayouMishtosave

thenUESTRONGLYENCOURAGEYOUTOMAKEPROPERBACKUPSbefore

proceeding!

Uecantakenoresponsibilityforlostdiskcontents?

No

Extractingbaseiirectoru...

285184Bbytesreadfronbasedist,chunk30f38@1425.9KBytes/sec.

安装完毕进行进一步的设置

网卡设置

设置leO

nterfaceinforMainrequin

IfyouareusingPPPoveraseria1device,asopposedtoadirect

ethernetconnection,thenyouzayfirstneedtodialyourInternet

ServiceProviderusingtheppputilityzeprovideforthatpurpose,

Ifyou*reusingSLIPoveraserialdevicethenth©expectationis

thatyouhaveaHARDUIREDconnection.

YoucanaIsoinstalloverapara1le1portusingaspecia1"laplink''

cabletoanotherMachinerunningFreeBSD.

Cance1

IHorkconfigurationMom

是否配置IPV6在此选NO

orwationrequ

IfyouareusingPPPoiveraseria1device9asopposedtoadirect

ethernetconnection.thenyouMayfirstneedtodialyourInternet

ServiceProviderusingtheppputilityueprovideforthatpurpose.

1fyou'reusingSLIPoveraseria1devicethentheexpectationis

thatyouhaveaHARDUIREDconnection.

YouDoyouHanttoIPv6configurationofthe

cab1

Para1leiPort(PLIP)eerconnection

networkconfiqurationManual1

是否启用DHCP在此选NO

配置主机名、域名、ip地点、DNS办事器、网关等

是否启用接口

是否把办事器设置为网关,在此选择NO

是否开启SSh办事,在此设置为YES

是否开启FTP办事,在此选择NO

是否开启NFS办事,在此选NO

是否安装NFS客户端,在此选NO

是否自界说系统控制台设置,在此选NO

设置时区

是否属于UTC时间(格林威治时间),对付绝大部分人来说,虽然选N。了

选择地区亚洲5

中国9

Cancel

选北京时间了,回车,接下来系统再次询问,是否属于该时区,选(0K)

是否设置非USB鼠标选择N。

是否现在配置浏览器选择NO

Th©FreeBSDpackagecolloctionisaco1lectionofthousandsofready-to-run

app1ications,fFOMtexteditorstogaMestoUEBserversandMore.UouIdyou

1iketobrouisetheco1lectionnow?

Yes

设置系统治理员的密码,以root用户登入

设置系统密码

NeuPassword:

RetypeNewPassword:1

退出安装

U<s1COMMtoth<iFrcscsBSDinstn11ationandconfigurationtoo1.P1c><ts;o

2:u1uatoituofthuoptionscbu1UMbvus;inqthuorTOMkuv^ortUPincithti

firstcharacttsrofthuoptionnaMtsyou'reinturtt:ctodin.Invokuait

optionMith(SPACEJorCENTERJ.Toexit.usetTABJtoMOMOtoExit.

Quickstart-HOMtousethisMenus^steM

t.1nil.«r.1■Beainastandardinsta11ation(recoMM©nded)■

Beginaquickinstallation(forexperts)

CllStOMDegftnccustOMinstallation(forexperts)

Dopost-instn11configurationofFrooDSD

ocInstA11ationinxtruction?;,README.ofc.

OV*MAPSn1netkeybeerdt?pr>

ptionsUitv<iriOUKinstallationoptions

ixitRupairrodsMithCDROM/DUDxflopp^ortnrtEhull

pgradeUpgradeanexistingtWM

oadConfig..Loaddefau11installconfiguration

ndexG1ossarvoffunctions

ExitInstall)

删除驱动器的介质

配置完毕确定退出,系统将要重启

启动界面

Startingdevd.

Creatingand/ortriMtiinglogfiles.

Startingsyslogd.

ELFIdconfigpath:/lib/usr/1ib/usr/1ib/cowpat/usr/local/1ib

a.outIdconfigpath:/usr/1ib/aout/usr/1ib/coMpat/aout

Clearing/tnp(Xrelated).

UpdatingMotd:.

Configuringsyscons:keycapblanktiwe.

Startingsshd.

Startingcron.

Startingbackgroundfilesystemchecksin60seconds.

FriFeb519:34:23CST2018

FreeDSD^i30G(xinbowa^.con)(ttyv0)

login:root

Password:

Feb519:36:85xinbozaylogin:ROOTLOGIN(root)ON

Copyright(c)1992-2009TheFreeBSDProject.

Copyright(c)1979,1980,1903,1986,1908,1989.1991,1992,1993,1994

TheRegentsoftheUniversityofCa1ifornia.A11rightsreserved.

FreeBSD8.0-RELEASE(GENERIC)#0:SatNov2115:48:17UTC2009

xinbouay#|

addnetdefault:gateway192.IGO.100.1

Startingdeud.

Creatingand/ortriMMinglogfiles.

Startingsyslogd.

ELFIdconfigpath:/lib/usr/lib/usr/1ib/conpat/usr/local/1ib

a.outIdconfigpath:/usr/1ib/aout/usr/1ib/coMpat/aout

Clearing/tup(Xrelated).

UpdatingMotd:.

Configuringsyscons:keyMapblanktine.

Startingsshd.

Startingcron.

StartingbackgroundfilesysteMchecksin60seconds.

FriFeb519:34:23CST2010

FreeBSD/i386(xinbondy.coM)(tt^uB)

login:root

Passuord:|

输入用户名密码进入系统

BSD系统至此安装完毕

二、根本配置

2.1网卡配置

ifconfig查察网卡配置情况

—HNU.a.shifen.coMpingstatistics——

2packetstransMitted,2packetsreceived,0.0^packetloss

round-tripMin/aug/Max/stddev=20.009/21,020/22,031/1.011MS

xinboway*ifconfig

leB:flags=8843<UP,BR0nDCnST,RUNNING,SIMPLEX,MULTICAST)Metric0Mtu1500

options=8<ULRN_MTU>

ether00:0c:29:cc:52:28

inet1netMask0xffffff00broadcast55

Media:Ethernetautoselect

status:active

plip0:flags=8818<P0INT0P0INT,SIMPLEX,MULTICRST>Metric0Mtu1500

100:flags=8049<UP,LOQPBfiCK,RUNNING,MULTICAST)Metric0Mtu16384

options=3<RXCSUM,TXCSUM>

inet6fe80::Ulo0prefixlen64scopeid0x3

inet6:prefixlen128

inetnetMask0xff000000

xinboway#ee/etc/rc.conf|

ee/etc/rc.config编辑配置文件对主机ip地点主机名开机启动项进行配置

A[(escape)Menu"ysearchproMptAkdelete1ineApprev1iAgprevpage

AoasciicodeAxsearchA1undelete1ineAnnext1iAunextpage

AuendoffileAabeginofline"xdeletewordAbback1char

AttopoftextAeendoflineArrestorewordAfforward1char

ArrnMManddalatarharAiundnlRtRcharAznpxtwnrd

■=====line11co117linesfrontop11========================================三

»—s^sinstal1generateddeltas—«SatFeb603:25:432010

«Created:SatFeb603:25:432010

«Enablenetworkdaewonsforuserconvenience.

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

#ThisfilenoncontainsjusttheoverridesfroM/etc/defaults/rc.conf.

defaultrouter=,,192,168.100.1,1

hostnaMe=,'xinboHa^.COM1'

ifconfig_le0=,,inet1netwaskn

keyMap="us.iso”

sshd_enable=,'YES,,|

2.2SSH配置

xinboua^tfee/etc/ssh/sshd_config1

|=====line1col8linesfroztop1============================================

-J$0penBSD:sshd_config,v1.802008/07/0202:24:18djMExp$

#SFreeBSD:src/crypto/openssh/sshd_config.v.2.12009/10/2501:IE

t*Thisisthesshdservers^steM-wideconfigurationfile.See

ttsshd_config(5)forworeinformation.

»ThissshdMascompiledwithPftTH=/usr/bin:/bin:/usr/sbin:/sbin

MThestrategyusedforoptionsinthedefauItsshd_configshippedwith

ttOpenSSHistospecifyoptionswiththeirdefauItvalue“here

#possible,butleavethencoMMented.UncowMentedoptionschangea

»defaultvalue.

ttNotethatsow©ofFreeBSD'sdefaultsdifferfTOMOpenBSD,and

ttFreeBSDhasafewadditionaloptions.

»UersionflddenduMFreeBSD-20090522

file''/etc/ssh/sshd-config11,1261ines

line48col19linesfrontop48

#LifetiweandsizeofepheMeralversion1serverkey

#Ke^RegenerationintervalIh

*ServerKe^Bits1024

»Logging

#obsoletesQuietModeandFascistLogging

ttSpslogFacilit^AUTH

#LogLevelINFO

#Ruthentication:

#LoginGraceTiMe2M

#PerMitRootLoginno|

#StrictModesyes

HMaxAuthTries6

HMaxSessions10

#PermitRootLoginno变动为:PermitRootLoglnyes

iUerMitRootLoginyes

line73co101inesfFOMtop13========================:

ttHostbasedfiuthenticationno

Changetoyesifyoudon'ttrustssh/known_hostsfor

ttRhos

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论