仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 845|回复: 8
打印 上一主题 下一主题

[学习教程] MYSQL网页编程之Oralcle 10g Fedora Core X上疾速安装指...

[复制链接]
飘飘悠悠 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-16 22:43:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
采用DBaaS解决方案,他们也可以使用同大企业一样的技术。在大型组织中,DBaaS可以提供部门级解决MySQL学习教程,而无需IT部门和采购部门的介入,提供更快和更容易的方法来实现小型解决方案。core
Home->oracle->Oracle10grelease1(10.1.0.2)onFedoracore1
OracleDatabase10grelease1(10.1.0.2)installationonFedoracore1
PleasenotethatOracleDatabase10gisnotcertifiedtorunonFedoraLinux,thereforeyoushouldnotusethiscombinationonaproductionserver.YoucanexamineOraclecertificationmatrixatMetalink
Contents
1.Downloadingandunpackinginstallationfiles
2.Preparingyoursystem
2.1Stepstoperformasrootuser
2.2Stepstoperformasoracleuser
3.Runningtheinstaller
4.Post-installationsteps
4.1Startingdatabaseservices
4.2Shuttingdowndatabaseservices
4.3Automatingoraclestartupandshutdown
1.Downloadingandunpackinginstallationfiles
DownloadOracleDatabase10gfromOracleTechnologyNetwork.Fourfilesareavailable:

ship.ccd.cpio.gz-Oracle10gCompanionCD
ship.client.cpio.gz-Oracle10gClient
ship.crs.cpio.gz-Oracle10gClusterReadyServices
ship.db.cpio.gz-Oracle10gDatabase
Onlyship.db.cpio.gzisrequiredinordertoinstallthedatabase.
Onceyoudownloadedthefile,unpackit:
gunzipship.db.cpio.gz
cpio-idmv<ship.db.cpio
Allfourinstallationfilesunpacktodirectorynamed"Disk1",sorenamedirectorybeforeyoueventuallyunpackanotherfile.
YoumaywanttocreateOracleinstallationCDsetfromunpackedinstallationfiles.AsIdonthaveaCD-burneronanyofmylinuxboxes,IcreatedISOimagesusing
mkisofs-JR-l-oship.db.isoDisk1/
andburnedCDsonWindowsmachine.
2.Preparingyoursystem
2.1Stepstoperformasrootuser
Installfollowingfedorapackagesusingrpm-ivhpackage_name:
FromFedora-coreDisk1:

setarch-1.0-1.i386.rpm
FromFedora-coreDisk2:

openmotif-2.2.2-16.1.i386.rpm
FromFedora-coreDisk3:

compat-libstdc++-7.3-2.96.118.i386.rpm
compat-db-4.0.14-2.i386.rpm
compat-gcc-7.3-2.96.118.i386.rpm
compat-libgcj-7.3-2.96.118.i386.rpm
compat-libstdc++-devel-7.3-2.96.118.i386.rpm
compat-libgcj-devel-7.3-2.96.118.i386.rpm
NowwehavetomakeOracleinstallerthinkthatwehaveoneofthesupporteddistributions:Createabackupofyour/etc/redhat-releasefile,anchangeitscontents:
#cp/etc/redhat-release/etc/redhat-release.orig
#echo"RedHatEnterpriseLinuxASrelease3(Taroon)">/etc/redhat-release
Changekernelparametersbyaddingthefollowinglinesin/etc/sysctl.conf:
kernel.shmall=2097152
kernel.shmmax=2147483648
kernel.shmmni=4096
kernel.sem=25032000100128
fs.file-max=65536
net.ipv4.ip_local_port_range=3276865000
Updatekernelconfiguration:
[root@fedoraroot]#sysctl-e-p/etc/sysctl.conf
Addthefollowinglinesto/etc/security/limits.conffile:
*softnproc2047
*hardnproc16384
*softnofile1024
*hardnofile65536
Addthefollowinglinetothe/etc/pam.d/loginfile,ifitdoesnotalreadyexist:

sessionrequired/lib/security/pam_limits.so
Createuserandgroupsthatwillownoracleinstallation.Inthisexapletheusernamewillbeoracle:
[root@fedora]#groupaddoinstall
[root@fedora]#groupadddba
[root@fedora]#useradd-goinstall-Gdbaoracle
[root@fedora]#passwdoracle
Createdirectoriesinwhichoraclesoftwarewillbeinstalled.OraclerecommendsOFA-OptimalFlexibleArchitecture(seeoracleinstallationguide),butinthisexampleeverythingwillbeinstalledunder/home/oracle:
[root@fedora]#mkdir-p/home/oracle/product/10g
[root@fedora]#chown-Roracle.oinstall/home/oracle/*
2.2Stepstoperformasoracleuser
Makegcc296defaultcompilerforuseroraclebycreatingsymboliclink.Itisimportantthatthedirectorycontainingthelink(/home/oracle/bin)islistedinthePATHvariablebefore/usr/bin.
[oracle@fedoraoracle]$mkdir/home/oracle/bin
[oracle@fedoraoracle]$cd/home/oracle/bin
[oracle@fedorabin]$ln-s/usr/bin/gcc296gcc
Putthefollowinglinesinoracleuser.bash_profile
exportORACLE_BASE=/home/oracle
exportORACLE_HOME=/home/oracle/product/10g
exportORACLE_SID=orcl
exportORACLE_TERM=xterm
exportPATH=$HOME/bin:$ORACLE_HOME/bin:$PATH
ulimit-u16384-n65536
#
#changethisNLSsettingstosuityourcountry:
#example:
#german_germany.we8iso8859p15,american_america.we8iso8859p1etc.
#
exportNLS_LANG=croatian_croatia.ee8iso8859p2
SinceIamfromCroatia,IuseCroatiannationallanguagesupport(NLS_LANG,NLS_DATE_LANGUAGE,NLS_SORTandNLS_DATE_FORMAT).Youshouldsetthesevariablestosuityourneeds.
ListingofvalidOracleNLSDataparametersincludingsupportedlanguages,territoriesandstoragecharactersetscanbefoundhere.
InthisexampleORACLE_SID=orcl.YouwillbepromptedbyinstallertospecifySIDandglobaldatabasename,andyoushouldreplacetheSIDin.bash_profilewithyourownSID.
Updateenvironmenttoincludenewvariables:

[oracle@fedora]$source/home/oracle/.bash_profile
Everythingisnowreadytostarttheoracleinstaller.
3.Runningtheinstaller
IfyouhaveOracle10gDatabaseCD,loginasrootandmountit:
[root@fedora]#mount/mnt/cdrom
OracleinstallerneedstoberunfromXwindows,sostartXwindowsandloginasuseroracle.
Makesurethatyourenvionmentiscorrectlysetup:
[oracle@fedoraoracle]$set|grepORACLE
ORACLE_BASE=/home/oracle
ORACLE_HOME=/home/oracle/product/10g
ORACLE_SID=orcl
ORACLE_TERM=xterm
[oracle@fedoraoracle]$gcc--version
2.96
Starttheinstaller:
[oracle@fedoraoracle]$/mnt/cdrom/runInstaller
Note:ifyougetthewfollowingerrorwhenrunningtheinstallerfromCD-ROM
bash:/mnt/cdrom/runInstaller:/bin/sh:badinterpreter:Permissiondenied
youshouldcheckhowyourCD-ROMwasmounted.Itshouldbemountedbyuserroot,andtheinformationaboutthefilesystemin/etc/fstabsohuldlooksimilartothis:
/dev/cdrom/mnt/cdromautoexec,noauto,owner,kudzu,ro00
Nowtheinstallershouldbeupandrunning.
4.Post-installationsteps
Firstwewanttochangebackthe/etc/redhat-releasefile:
[root@fedora]#cp/etc/redhat-release.orig/etc/redhat-release
Next,modifythe/etc/oratabfileinordertousedatabasestartupandshutdownscriptsprovidedbyoracle.Findthelinein/etc/oratabthatlookssimilartothis:
*:/home/oracle/product/10g:N
Entriesareoftheform:$ORACLE_SID:$ORACLE_HOME:<N|Y>
Changethelastfield(N)toY,andyouwillbeabletostartthedatabaseusingdbstartutility.
4.1.Startingdatabaseservices
Note:IfyoujustinstalledOracle,thedatabase,TNSlistenerandenterprisemanagerarealreadyrunning.
StartTNSListener:

[oracle@fedoraoracle]$lsnrctlstart
Youcanstartthedatabaseviadbstartutility:
[oracle@fedoraoracle]$dbstart
orviaSQL*Plus:
[oracle@fedoraoracle]$sqlplus/assysdba

SQL*Plus:Release10.1.0.2.0-ProductiononSatFeb2118:05:432004

Copyright(c)1982,2004,Oracle.Allrightsreserved.

Connectedtoanidleinstance.

SQL>startup
ORACLEinstancestarted.

TotalSystemGlobalArea188743680bytes
FixedSize778036bytes
VariableSize162537676bytes
DatabaseBuffers25165824bytes
RedoBuffers262144bytes
Databasemounted.
Databaseopened.
SQL>exit
DisconnectedfromOracleDatabase10gEnterpriseEditionRelease10.1.0.2.0-
ProductionWiththePartitioning,OLAPandDataMiningoptions
[oracle@fedoraoracle]$
StartEnterprisemanagerserver:
[oracle@fedoraoracle]$emctlstartdbconsole
4.2.Stoppingdatabaseservices
StopEnterprisemanagerserver:
[oracle@fedoraoracle]$emctlstopdbconsole
Youcanstopthedatabaseviadbshututility:
[oracle@fedoraoracle]$dbshut
orviaSQL*Plus:
[oracle@fedoraoracle]$sqlplus/assysdba

SQL*Plus:Release10.1.0.2.0-ProductiononSatFeb2118:11:232004

Copyright(c)1982,2004,Oracle.Allrightsreserved.


Connectedto:
OracleDatabase10gEnterpriseEditionRelease10.1.0.2.0-
ProductionWiththePartitioning,OLAPandDataMiningoptions

SQL>shutdownimmediate
Databaseclosed.
Databasedismounted.
ORACLEinstanceshutdown.
SQL>exit
DisconnectedfromOracleDatabase10gEnterpriseEditionRelease10.1.0.2.0-
ProductionWiththePartitioning,OLAPandDataMiningoptions
[oracle@fedoraoracle]$
StopTNSlistener:
[oracle@fedoraoracle]$lsnrctlstop
4.3Automatingoraclestartupandshutdown
Toautomaticallystart/shutoracledatabaseduringsystemstartup/shutdownyouneedtowriteascriptin/etc/rc.d/init.ddirectory.YoucanvieworDownloadanexamplescript.
Copythescriptto/etc/rc.d/init.dasrootuser,editenvironmentvariablestomatchyoursettingsandmodifyitspermissions:
[root@fedoraroot]#chownroot.root/etc/rc.d/init.d/ora10
[root@fedoraroot]#chmod755/etc/rc.d/init.d/ora10
ThescriptIwroteuseschkconfigutilitytosimplifyservicemanagement.Itisconfiguredtostartoracleservicesinrunlevels3and5,withstartpriority95andstoppriority1.
Initializenewservice:
[root@fedoraroot]#chkconfigora10reset
[root@fedoraroot]#chkconfig--listora10
ora100:off1:off2:off3:on4:off5:on6:off
Noworacleserviceswillbeautomaticallystartedwhenenteringrunlevels3and5,andshutdownwhenenteringanyotherrunlevel.Formoreinformationonchkconfigutilityrefertoitsmanpage.
Tomanuallystart/stoporacleservicesyoucanuse
[root@fedoraroot]#serviceora10start
and
[root@fedoraroot]#serviceora10stop
Hopethishelps.
Denis.
Home->oracle->Oracle10grelease1(10.1.0.2)onFedoracore1




--------------------
HAPPYMENG
为维持生产环境和非生产环境需要不断地投入管理支持费用MySQL学习教程,最终导致客户为数据库资源投入巨额成本。
因胸联盟 该用户已被删除
沙发
发表于 2015-1-19 21:45:33 | 只看该作者
作了些试验,发现使用CLR的存储过程或函数在达到一定的阀值的时候,系统性能会呈指数级下滑!这是非常危险的!只使用几个可能没有问题,当一旦大规模使用会造成严重的系统性能问题!
再见西城 该用户已被删除
板凳
发表于 2015-1-26 23:47:25 | 只看该作者
不好!如果出了错;不好调试;不好处理!其实web开发将代码分为3层:web层;业务逻辑层和数据访问层;一般对数据库的操作都在数据访问层来做;这样便于调试和维护!而且将来如果是换了数据库的话;你只需要改数据层的代码;其他层的基本可以不变!要是你在jsp中直接调用sql数据库;那么如果换了数据库呢?岂不都要改?如果报了异常呢?怎么做异常处理?
不帅 该用户已被删除
地板
发表于 2015-2-4 22:58:33 | 只看该作者
是要和操作系统进行Socket通讯的场景。否则建议慎重!
飘灵儿 该用户已被删除
5#
发表于 2015-2-10 22:33:39 | 只看该作者
发几份SQL课件,以飨阅者
小魔女 该用户已被删除
6#
发表于 2015-3-1 16:53:49 | 只看该作者
对于数据库来说,查询是数据库的灵魂,那么SQL查询效率究竟效率如何呢?下文将带对SQL查询的相关问题进行讨论,供您参考。
透明 该用户已被删除
7#
发表于 2015-3-10 21:09:52 | 只看该作者
但换公司用MSSQL2K感觉自己好像根本就不了解MSSQL。什么DTS触发器以前根本没用过。
爱飞 该用户已被删除
8#
发表于 2015-3-17 10:10:27 | 只看该作者
大家注意一点。如下面的例子:
飘飘悠悠 该用户已被删除
9#
 楼主| 发表于 2015-3-24 06:44:26 | 只看该作者
个人感觉没有case直观。而且默认的第三字段(还可能更多)作为groupby字段很容易造成新手的错误。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-12-29 23:40

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表