Tomcat与Oracle安装配置方法.docx

上传人:b****0 文档编号:17633921 上传时间:2023-07-27 格式:DOCX 页数:21 大小:1.15MB
下载 相关 举报
Tomcat与Oracle安装配置方法.docx_第1页
第1页 / 共21页
Tomcat与Oracle安装配置方法.docx_第2页
第2页 / 共21页
Tomcat与Oracle安装配置方法.docx_第3页
第3页 / 共21页
Tomcat与Oracle安装配置方法.docx_第4页
第4页 / 共21页
Tomcat与Oracle安装配置方法.docx_第5页
第5页 / 共21页
Tomcat与Oracle安装配置方法.docx_第6页
第6页 / 共21页
Tomcat与Oracle安装配置方法.docx_第7页
第7页 / 共21页
Tomcat与Oracle安装配置方法.docx_第8页
第8页 / 共21页
Tomcat与Oracle安装配置方法.docx_第9页
第9页 / 共21页
Tomcat与Oracle安装配置方法.docx_第10页
第10页 / 共21页
Tomcat与Oracle安装配置方法.docx_第11页
第11页 / 共21页
Tomcat与Oracle安装配置方法.docx_第12页
第12页 / 共21页
Tomcat与Oracle安装配置方法.docx_第13页
第13页 / 共21页
Tomcat与Oracle安装配置方法.docx_第14页
第14页 / 共21页
Tomcat与Oracle安装配置方法.docx_第15页
第15页 / 共21页
Tomcat与Oracle安装配置方法.docx_第16页
第16页 / 共21页
Tomcat与Oracle安装配置方法.docx_第17页
第17页 / 共21页
Tomcat与Oracle安装配置方法.docx_第18页
第18页 / 共21页
Tomcat与Oracle安装配置方法.docx_第19页
第19页 / 共21页
Tomcat与Oracle安装配置方法.docx_第20页
第20页 / 共21页
亲,该文档总共21页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

Tomcat与Oracle安装配置方法.docx

《Tomcat与Oracle安装配置方法.docx》由会员分享,可在线阅读,更多相关《Tomcat与Oracle安装配置方法.docx(21页珍藏版)》请在冰点文库上搜索。

Tomcat与Oracle安装配置方法.docx

Tomcat与Oracle安装配置方法

InstallationInstructionsfor:

Tomcat6.0or7.0

Oracle10g(ExpressEditionXE)

 

Tomcat7.0Installation

1.DownloadApacheTomcat7andunzipit.

2.AddthelocationofyourJDKorJREtotheenvironmentvariable$JAVA_HOMEor$JRE_HOME

3.AddthelocationofyourTomcattotheenvironmentvariable$CATALINA_HOME

4.Add$CATALINA_HOME/bintoyourenvironmentvariable$PATH

5.Changeeveryoccurrenceofport8080to8088in$CATALINA_HOME/conf/server.xml

6.Edit$CATALINA_HOME/conf/tomcat-users.xmlandaddamanger:

7.TostartTomcatopenacommandwindowandtypestartup

8.TostopTomcatopenacommandwindowandtypeshutdown

9.TooperateTomcatgotoStep6inthenextsection.

 

Tomcat6.0Installation

1.   DownloadApacheTomcatInstallerandrunit.

 

2.   SelectFullinstallationoption

 

3.  ToavoidpossibleconflictswithOraclechooseConnectorPort8088;selectanyusernameandpasswordyouwish.

 

4.  TostartTomcat,gotoAllPrograms>ApacheTomcat6.0>ConfigureTomcatmenuitemandclickStart

 

5.  TostopTomcat,gotoAllPrograms>ApacheTomcat6.0>ConfigureTomcatmenuitemandclickStop

 

6.  Toconnecttothemanager,gotoAllPrograms>ApacheTomcat6.0>TomcatManagerandentertheusernameandpasswordyouselectedinStep3

 

7.  Youshouldthenseethemanageropenupinyourwebbrowser(http:

//localhost:

8088/manager/html)asshownbelow.MakesureMessageisOK.

 

8.  UnzipandcopytheentiremyJSPdirectory,whichcontainsanumberofJSPexamples,towebappsdirectoryunderyourTomcat6.0homedirectory.Todeploythisdirectory,type/myJSPinContextPathasshownbelowandclicktheDeploybutton.

 

9.  TotesttheJSPexamplescontainedinthemyJSPdirectory,typetheirexactaddressinyourbrowser’sURLboxasshownbelow:

10. Finally,toenableTomcattoconnecttoOraclecopytheOracleJDBCdrivertothelibdirectoryunderyourTomcat’shomedirectory.

 

 Oracle10g(ExpressEditionXE)Installation

∙DownloadandinstallOracle10gforWindowsXP.

∙Duringinstallationyouwillbepromptedtoenterapassword.ThatpasswordalongwiththeusernamesystemwillallowyoutologintoOracleastheSystemAdministratortocreateuseraccounts.

∙OnceOracleisinstalled,itwillberunninglocallyonyourPCoffport8080andyouwillbeabletoaccessitthroughOracle’sApplicationExpress(apex)interface.

CreatingDatabaseUserAccounts

LoginasSystemAdministratortocreateuseraccounts:

 

GotoAdministration-DatabaseUsersandselectCreate:

 

Enteryourchoiceofusernameandpasswordandmakesureallcheckboxesarechecked(exceptforDBA):

 

Now,logoutandlogbackinasthenewusertorunSQLcommands.

 

RunningSQLCommands

Loginasthedatabaseusercreatedinthepreviousstep:

 

SelecttheSQLoptions:

 

SelecttheSQLCommandsoptions:

NowenterSQLcommandsinthetoppanelandthenclickRunorSaveorHistory:

 

PopulatingTableswithData

Assumewehaverelationtempstoredinthedatabaseasshownabove.Datacanbeenteredonerowatatimeusingtheinsertintocommand:

Whenworkingwithlargeamountsofdatathatarestoredinexternalfiles,youmayimporttheexternaldatabycreatingatab-separateddatafileusingatexteditorsuchasNotepadorTextpad.Let’sassumewehaveatab-separatedtextfilecalledtemp.datasshownbelow:

GotoHome>Utilities>DataLoad/Unload>Load>LoadTextDataandselectExistingTableandUploadFileoptionsasshownbelow.Then,clickNexttwice:

SelectTemp(table)andNext:

ChooseFiletemp.dat,type\t(tab)intheSeparatorboxanduncheckthecheckbox.Then,clickNext:

SelectappropriateColumnNamesandnoticethereadrowsofdataatthebottomoftheColumnMappingsection:

Theresultscreenshouldshow2(rowsofdata)forSucceeded0forFailed.Anon-zerovalueforFailedwillmeanthatyouhaveskippedsomeofthestepsaboveoryourinputfileisnotinthecorrectformat:

Toverifythedataload,gotoHome>SQL>SQLCommandsandexaminethecontentsoftemp:

 

CreatingandRunningSQLScripts

GotoHome-SQLandchoosetheSQLScriptsoptions:

 

 

YoumaycreatescriptsinternallythroughOracle’sScriptEditororexternallythroughNotepadoranothertexteditor.CreateaSQLscriptfilecalledquery1.sql:

createtablechefs

CHEF_ID          intnotnull,

NAME              varchar2(20),

SPECIALTY       varchar2(20),

SALARY           number(10),

primarykey(CHEF_ID)

);

Uploadthescriptandgiveitaname:

 

Ifallgoeswell,thescriptwillappearasanicononthebottompanel:

 

ChangetheViewoptiontoDetailsandclickGoandyoushouldseethefollowingscreenappear.NowclickRun:

 

ConfirmyourrequestbyclickingRunagainandthenViewResults:

Afterviewingtheresults,gobacktoHome-SQL-SQLCommandstoexaminethecatalogandmakesurethechangeshavetakenplace:

 

RunningSQLCommandLineUtility

∙InadditiontousingOracle’sgraphicaluserinterface,youmayusetheRunSQLCommandLineutilitytorunSQLcommandsorload/executeSQLscripts.Onyourdesktopclick:

         Start–Oracle10gExpressEdition–RunSQLCommandLine

∙WhentheSQL>promptappears,loginastheDBuser.Forexample,ifyouhavesetupauserbforourawithpasswordbforoura,enter:

           SQL>connectbforoura

           Enterpassword:

bforoura

∙Whenyouareloggedin,youmaytypeinSQLcommandsorloadSQLscripts(seemyOraclelecturenotes)

∙Tocreateanoutputofyoursession,usethespoolcommand

           SQL>spoolc:

\temp\output.txt                  --savetheoutputfileintherequiredlocation

           SQL>typeinallyourcommandshere

           SQL>…

           SQL>spooloff                                            --nowallyoursessiontransactionsaresavedinthisfile

 

ConnectingtoOracle10gviaTomcat6.0

1.LogintoOracleasaregularuserandcreatetheemployeesrelationandfillitwithdataasshownhere.

2.StartTomcatandgotohttp:

//localhost:

8088/myJSP/ex5.html.TypeintheusernameandpasswordoftheOracleuseryoupreviouslycreated.

3.Youshouldseethetabledataappearonthewebpageasshownbelow:

4.WE’REDONE!

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

当前位置:首页 > 工作范文 > 行政公文

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2