xinlugang 2020-01-09
使用到的工具:
软件名称 | 版本 | 软件包 |
---|---|---|
系统 | centOS6.8 | CentOS-6.8-x86_64-bin-DVD1.iso |
数据库 | ORACLE11g | linux.x64_11gR2_database_1of2.ziplinux.x64_11gR2_database_2of2.zip |
ssh工具 | Xshell5 | |
文件传输工具 | Xftp | |
图形化显示工具 | Xming | Xming-6-9-0-31-setup.exe |
安装用户:
我安装时使用到的是普通用户myos,并不是大部分教程当中使用到的oracle.
[root@localhost myos]# id myos?uid=500(myos) gid=501(oinstall) groups=501(oinstall),502(dba)
因为我是在自己搭建的虚拟机上进行的操作,所以在普通用户和root之间切换用的是su命令,在实际项目开发过程中,推荐使用sudo命令来切换,这样利于系统安全性管理。
[root@localhost myos]# vi /etc/security/limits.conf?添加以下内容:?oracle soft nproc 2047?oracle hard nproc 16384?oracle soft nofile 1024?oracle hard nofile 65536
[root@localhost myos]# vi /etc/pam.d/login?添加如下内容?session required /lib/security/pam_limits.so?session required pam_limits.so
[root@localhost myos]# vi /etc/sysctl.conf?添加如下内容?fs.file-max = 6815744?fs.aio-max-nr = 1048576?kernel.shmall = 2097152?kernel.shmmax = 2147483648?kernel.shmmni = 4096?kernel.sem = 250 32000 100 128?net.ipv4.ip_local_port_range = 9000 65500?net.core.rmem_default = 4194304?net.core.rmem_max = 4194304?net.core.wmem_default = 262144?net.core.wmem_max = 1048576? 使文件生效? [root@localhost myos]# sysctl -p
[root@localhost myos]# vi /etc/profile?添加如下内容:?if [ $USER = "myos" ]; then?if [ $SHELL = "/bin/ksh" ]; then? ulimit -p 16384? ulimit -n 65536?else? ulimit -u 16384 -n 65536?fi?fi
[root@localhost myos]# groupadd oinstall?[root@localhost myos]# groupadd dba?[root@localhost myos]# usermod -g oinstall -G dba myos?[root@localhost myos]# id myos? uid=500(myos) gid=501(oinstall) groups=501(oinstall),502(dba)
[root@localhost myos]# mkdir application/oracle?[root@localhost myos]# mkdir application/oracle/oracle?[root@localhost myos]# mkdir application/oracle/oradata?[root@localhost myos]# mkdir application/oracle/oracle/product?修改权限?[root@localhost myos]# chown -R myos:oinstall application/oracle?[root@localhost myos]# chmod -R 777 application/oracle?查看信息?[root@localhost myos]# id myos?uid=500(myos) gid=501(oinstall) groups=501(oinstall),502(dba)
[root@localhost oracle]# su myos
[myos@localhost oracle]$ vi ~/.bash_profile?添加如下内容?export ORACLE_BASE=/home/myos/application/oracle/oracle?export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1?export ORACLE_SID=orcl?export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin?export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
[myos@localhost oracle]$ echo $DISPLAY?[myos@localhost oracle]$ DISPLAY="192.168.1.106:0.0"?[myos@localhost oracle]$ export DISPLAY?[myos@localhost oracle]$ echo $DISPLAY?192.168.1.106:0.0
[myos@localhost application]$ unzip linux.x64_11gR2_database_1of2.zip?[myos@localhost application]$ unzip linux.x64_11gR2_database_2of2.zip
这时候在windows下打开Xming,执行安装的时候,图形安装界面就会在windows下显示了。
[myos@localhost application]$ cd database?[myos@localhost database]$ ./runInstaller?Starting Oracle Universal Installer...?Checking Temp space: must be greater than 120 MB. Actual 8386 MB Passed?Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed?Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed?Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-04-05_05-27-15PM. Please wait ...[myos@localhost database]$
yum install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc-2.5 glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel
接下来就是等待安装了,这个时候你可以趁机上个厕所。。。
执行脚本:
[root@localhost myos]su root?[root@localhost myos]# cd /home/myos/application/oracle/oraInventory?[root@localhost oraInventory]# sh orainstRoot.sh?[root@localhost oraInventory]# cd /home/myos/application/oracle/oracle/product/11.2.0/dbhome_1?[root@localhost dbhome_1]# sh root.sh
安装完成
上面安装成功之后,服务监听和本地网络服务应该是就配置好了,我实际安装的过程中都会提示服务名称已经存在。如果没有的话,我们可以按照下面的步骤进行配置。
[root@localhost dbhome_1]# netca? Oracle Net Services Configuration:
[myos@localhost ~]$ lsnrctl status? LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-APR-2018 18:06:52?Copyright (c) 1991, 2009, Oracle. All rights reserved.?Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))?STATUS of the LISTENER?\------------------------?Alias LISTENER?Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production?Start Date 05-APR-2018 17:41:44?Uptime 0 days 0 hr. 25 min. 8 sec?Trace Level off?Security ON: Local OS Authentication?SNMP OFF?Listener Parameter File ?/home/myos/application/oracle/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora ?Listener Log File ?home/myos/application/oracle/oracle/diag/tnslsnr/localhost/listener/alert/log.xml?Listening Endpoints Summary...? (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))? (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=
表格的现在还是较为常用的一种标签,但不是用来布局,常见处理、显示表格式数据。在HTML网页中,要想创建表格,就需要使用表格相关的标签。<table> <tr> <td>单元格内的文字</td> ...