欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Oracle之靜默安裝-創(chuàng)新互聯(lián)

服務(wù)器采用的是阿里云,具體看下面

興山網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)公司!從網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、響應(yīng)式網(wǎng)站開發(fā)等網(wǎng)站項目制作,到程序開發(fā),運(yùn)營維護(hù)。創(chuàng)新互聯(lián)公司成立于2013年到現(xiàn)在10年的時間,我們擁有了豐富的建站經(jīng)驗和運(yùn)維經(jīng)驗,來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)公司。

[root@aliyun_test var]# cat /etc/system-release

CentOS release 6.5 (Final)

[root@aliyun_test var]# uname -r

2.6.32-431.23.3.el6.x86_64

[root@aliyun_test var]# uname -n

aliyun_test

內(nèi)存:

Oracle之靜默安裝

由于阿里云默認(rèn)是沒有swap的,所以這個需要自己創(chuàng)建,后面會提到如何創(chuàng)建

靜默安裝前一些必要的操作

#####install java

rpm -ivh jdk-7u75-linux-x64.rpm

echo "export JAVA_HOME=/usr/java/jdk1.7.0_75" >> /etc/profile.d/java.sh

echo "export PATH=$JAVA_HOME/bin:$PATH" >> /etc/profile.d/java.sh

echo "export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar" >>/etc/profile.d/java.sh

. /etc/profile.d/java.sh

######verify java

java -version

一些必須的包

yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 ksh elfutils-libelf \

elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio \

libaio.i686 libaio-devel libaio-devel.i686 libgcc libstdc++ libstdc++.i686 \

libstdc++-devel libstdc++-devel.i686 make sysstat unixODBC unixODBC-devel unzip

然后是一些內(nèi)核參數(shù)調(diào)整

########modify /etc/sysctl.conf

echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf

echo "fs.file-max = 6815744" >> /etc/sysctl.conf

echo "kernel.shmmni = 4096" >> /etc/sysctl.conf

echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf

echo "net.ipv4.ip_local_port_range = 9000 65500" >> /etc/sysctl.conf

echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf

echo "net.core.rmem_max = 4194304" >> /etc/sysctl.conf

echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf

echo "net.core.wmem_max = 1048576" >> /etc/sysctl.conf

/sbin/sysctl -p

然后是軟硬文件打開數(shù)

##############modify /etc/security/limits.conf

echo "oracle soft nproc 2047" >> /etc/security/limits.conf

echo "oracle hard nproc 16384" >> /etc/security/limits.conf

echo "oracle soft nofile 1024" >> /etc/security/limits.conf

echo "oracle hard nofile 65536" >> /etc/security/limits.conf

創(chuàng)建oracle用戶

#########create user oracle

/usr/sbin/groupadd oinstall

/usr/sbin/groupadd dba

/usr/sbin/useradd -g oinstall -G dba oracle

passwd oracle

mkdir /u01/app -p

chown -R oracle:oinstall /u01

chmod 755 /u01/app

創(chuàng)建oracle清單文件

########create oraInventory

echo "inventory_loc=/u01/app/oraInventory" >> /etc/oraInst.loc

echo "inst_group=oinstall" >> /etc/oraInst.loc

chown -R oracle:oinstall /etc/oraInst.loc

chmod 755 /etc/oraInst.loc

添加登錄認(rèn)證

########modify /etc/pam.d/login

#add

session   required   pam_limits.so

修改/etc/profile 限制其他用戶使用

############modify /etc/profile

# add follows to the end

if [ $USER = "oracle" ]; then

   if [ $SHELL = "/bin/ksh" ]; then

      ulimit -p 16384

      ulimit -n 65536

   else

      ulimit -u 16384 -n 65536

   fi

fi

然后切換oracle用戶進(jìn)行操作

#########for oracle user

su - oracle

cd /home/oracle

file1:wget http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_1of2.zip

file2:wget http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_2of2.zip

vim .bash_profile

export ORACLE_BASE=/u01/app

export ORACLE_SID=test

unzip linux.x64_11gR2_database_1of2.zip -d /u01/app

unzip linux.x64_11gR2_database_2of2.zip -d /u01/app

由于是使用靜默文件安裝oracle,所以必須創(chuàng)建修改響應(yīng)文件(具體參數(shù)說明請參考官方網(wǎng)站)

cp /u01/app/database/response/db_install.rsp /home/oracle

chmod 700 /home/oracle/*.rsp

####add to rsp

修改以下值

oracle.install.option=INSTALL_DB_SWONLY

ORACLE_HOSTNAME=oracle11g

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u01/app/oraInventory

SELECTED_LANGUAGES=en,zh_CN,zh_TW

ORACLE_HOME=/u01/app/product/11.2.0/dbhome_1

ORACLE_BASE=/u01/app

oracle.install.db.InstallEdition=EE

oracle.install.db.isCustomInstall=false

oracle.install.db.DBA_GROUP=dba

oracle.install.db.OPER_GROUP=oinstall

oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

oracle.install.db.config.starterdb.globalDBName=test

oracle.install.db.config.starterdb.SID=test

oracle.install.db.config.starterdb.memoryLimit=512

oracle.install.db.config.starterdb.password.ALL=redhat

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

DECLINE_SECURITY_UPDATES=true

準(zhǔn)備工作就緒后,于是進(jìn)行安裝

#######silent install oracle

cd /u01/app

./database/runInstaller -silent -responseFile /home/oracle/db_install.rsp

請根據(jù)屏幕上的輸出信息進(jìn)行相應(yīng)的措施(由于是阿里云主機(jī),swap要求沒有達(dá)到)

swap內(nèi)存做如下操作:

如果交換空間不夠:針對阿里云主機(jī)或者swap為0的主機(jī)

dd if=/dev/zero of=/test bs=1G count=4----》如果這種方法不行,請選擇下面

mkswap -f /test

swapon /test

free -m

設(shè)置2G的swap空間

[root@aliyun_test var]# dd if=/dev/zero of=/var/test bs=1G count=2

dd: memory exhausted

[root@aliyun_test var]# dd if=/dev/zero of=/var/test bs=1024 count=2097152

2097152+0 records in

2097152+0 records out

2147483648 bytes (2.1 GB) copied, 38.0205 s, 56.5 MB/s

[root@aliyun_test var]# du -sh /var/test

2.1G   /var/test

[root@aliyun_test var]# mkswap -f /var/test

Setting up swapspace version 1, size = 2097148 KiB

no label, UUID=d3ba4921-7d5e-47ae-810b-44f2369a24c2

[root@aliyun_test var]# swapon  /var/test

[root@aliyun_test var]# free -m

       total    used    free   shared   buffers   cached

Mem:      994     930     63      0     31     809

-/+ buffers/cache:     89     905

Swap:     2047      0    2047

安裝到出現(xiàn)如下叫你使用root用戶執(zhí)行以下腳本

/u01/app/product/11.2.0/dbhome_1/root.sh

于是使用另一會話終端執(zhí)行

[root@aliyun_test ~]# /u01/app/product/11.2.0/dbhome_1/root.sh

Check /u01/app/product/11.2.0/dbhome_1/install/root_aliyun_test_2016-09-20_10-20-22.log for the output of root script

然后回到oracle用戶那個終端敲入enter鍵就安裝完成

然后繼續(xù)修改oracle家目錄下的環(huán)境文件如下

vim /home/oracle/.bash_profile

export ORACLE_HOME=/u01/app/product/11.2.0/dbhome_1

PATH=${ORACLE_HOME}/bin:$PATH:$HOME/bin

下一步就是配置監(jiān)聽服務(wù),具體操作如下

啟動監(jiān)聽

###############modify netca.rsp

cp database/response/netca.rsp /home/oracle/

vim /home/oracle/netca.rsp

GENERAL]

RESPONSEFILE_VERSION="11.2"

CREATE_TYPE="CUSTOM"

INSTALL_TYPE=""custom"   "安裝的類型("typical—典型","minimal—最小" or "custom—自定義")

LISTENER_NUMBER=1     監(jiān)聽器數(shù)量

LISTENER_NAMES={"test"}  監(jiān)聽器的名稱列表

LISTENER_PROTOCOLS={"TCP;1521"} 監(jiān)聽器使用的通訊協(xié)議列表

LISTENER_START=""test""     監(jiān)聽器啟動的名稱

然后運(yùn)行:

netca /silent /responsefile /home/oracle/netca.rsp

[oracle@aliyun_test app]$ netca /silent /home/oracle/netca.rsp

Parsing command line arguments:

  Parameter "silent" = true

  Parameter "responsefile" = /opt/oracle/netca.rsp

Done parsing command line arguments.

Oracle Net Services Configuration:

Configuring Listener:test

Listener configuration complete.

Oracle Net Listener Startup:

  Running Listener Control:

   /u01/app/product/11.2.0/dbhome_1/bin/lsnrctl start test

  Listener Control complete.

  Listener started successfully.

Profile configuration complete.

Oracle Net Services configuration successful. The exit code is 0

監(jiān)聽配置完,端口就會開啟,查看一下

[root@aliyun_test ~]# netstat -tunlp|grep 1521

tcp     0    0 0.0.0.0:1521         0.0.0.0:*          LISTEN    17760/tnslsnr

/u01/app/product/11.2.0/dbhome_1/bin/tnslsnr test(這條命令啟動的)

最后創(chuàng)建單實例數(shù)據(jù)庫

靜默建立新庫

cp database/response/dbca.rsp /home/oracle/

vim /home/oracle/dbca.rsp

然后修改以下:

[GENERAL]

 RESPONSEFILE_VERSION = "11.2.0"    //不能更改

 OPERATION_TYPE = "createDatabase"

 GDBNAME = "test"        //全局?jǐn)?shù)據(jù)庫的名字=SID+主機(jī)域名

 SID= "test"             //對應(yīng)的實例名字

 TEMPLATENAME = "General_Purpose.dbc"   //建庫用的模板文件

 SYSPASSWORD = "redhat"         //SYS管理員密碼

 SYSTEMPASSWORD = "redhat"        //SYSTEM管理員密碼

 DATAFILEDESTINATION = /u01/app/oradata //數(shù)據(jù)文件存放目錄

 RECOVERYAREADESTINATION=/u01/app/flash_recovery_area   //恢復(fù)數(shù)據(jù)存放目錄

 CHARACTERSET = "AL32UTF8"  //字符集,重要!!! 建庫后一般不能更改,所以建庫前要確定清楚。(CHARACTERSET = "AL32UTF8"

NATIONALCHARACTERSET= "UTF8")

 TOTALMEMORY = "380"   //oracle內(nèi)存

然后靜默建庫

dbca -silent -responseFile /home/oracle/dbca.rsp

Oracle之靜默安裝如此之后數(shù)據(jù)庫創(chuàng)建完成,使用sqlplus命令操作,進(jìn)行登錄

Oracle之靜默安裝

登錄的用戶采用的system密碼為redhat,上述操作都有記錄

至此靜默安裝oracle完成

啟動監(jiān)聽:

[oracle@oracle admin]$ lsnrctl start test

查看端口1521是否開啟

啟動數(shù)據(jù)庫:

[oracle@oracle admin]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 26 14:37:17 2017

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn /as sysdba

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area  584568832 bytes

Fixed Size          2215544 bytes

Variable Size       490733960 bytes

Database Buffers      88080384 bytes

Redo Buffers         3538944 bytes

Database mounted.

Database opened.

連接數(shù)據(jù)庫:

[oracle@oracle admin]$ echo $ORACLE_SID

test

[oracle@oracle admin]$ sqlplus system/redhat@test

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 26 14:42:34 2017

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:

ORA-28002: the password will expire within 7 days

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> 

[oracle@oracle admin]$ echo $SERVICE_NAME

oracle.test

[oracle@oracle admin]$ sqlplus system/redhat@192.168.223.138:1521/oracle.test

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 26 14:44:02 2017

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:

ORA-28002: the password will expire within 7 days

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> 

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。

分享題目:Oracle之靜默安裝-創(chuàng)新互聯(lián)
網(wǎng)站地址:http://chinadenli.net/article18/desodp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)、網(wǎng)站排名、標(biāo)簽優(yōu)化、電子商務(wù)、服務(wù)器托管品牌網(wǎng)站設(shè)計

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司