Checking Temp space: must be greater than 120 MB. Actual 26363 MB Passed Checking swap space: must be greater than 150 MB. Actual 4095 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-12-27_02-06-55PM. Please wait ...[oracle@dbserver database]$ You can find the log of this install session at: /u01/app/oraInventory/logs/installActions2017-12-27_02-06-55PM.log
INFO: Completed validating state <finish> INFO: Terminating all background operations INFO: Terminated all background operations INFO: Successfully executed the flow in SILENT mode INFO: Finding the most appropriate exit status for the current application INFO: Exit Status is 0 INFO: Shutdown Oracle Database 11g Release 2 Installer INFO: Unloading Setup Driver
1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/sh #Root scripts to run
/u01/app/oraInventory/orainstRoot.sh /u01/app/oracle/product/11.2.0/db_1/root.sh To execute the configuration scripts: 1. Open a terminal window 2. Log in as "root" 3. Run the scripts 4. Return to this window and hit "Enter" key to continue
Successfully Setup Software.
一直到主窗口出现以上提示,以root用户打开一个窗口,一次执行下面操作
1 2 3 4 5 6 7 8 9
[root@dbserver ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [root@dbserver ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh Check /u01/app/oracle/product/11.2.0/db_1/install/root_dbserver_2017-12-27_14-23-43.log for the output of root script
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-DEC-2017 14:26:34
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 27-DEC-2017 14:25:48 Uptime 0 days 0 hr. 0 min. 50 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1521))) The listener supports no services The command completed successfully
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-DEC-2017 17:04:44
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 27-DEC-2017 16:49:14 Uptime 0 days 0 hr. 15 min. 32 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1521))) Services Summary... Service "sx21" has 1 instance(s). Instance "sx21", status READY, has 1 handler(s) for this service... Service "sx21XDB" has 1 instance(s). Instance "sx21", status READY, has 1 handler(s) for this service... The command completed successfully
--创建表空间 CREATE TABLESPACE TS_TENV datafile '/u01/app/oracle/oradata/monitor/ts_tenv01.dbf' SIZE 200m AUTOEXTEND ON NEXT 32m MAXSIZE 32767M EXTENT MANAGEMENT LOCAL; CREATE TABLESPACE TS_WEATHER datafile '/u01/app/oracle/oradata/monitor/ts_weather01.dbf' SIZE 200m AUTOEXTEND ON NEXT 32m MAXSIZE 32767M EXTENT MANAGEMENT LOCAL;
--创建临时表空间 CREATE TEMPORARY TABLESPACE TS_TENV_TEMP TEMPFILE '/u01/app/oracle/oradata/monitor/ts_tenv_temp01.dbf' SIZE 200m AUTOEXTEND ON NEXT 32m MAXSIZE 2048m EXTENT MANAGEMENT LOCAL; CREATE TEMPORARY TABLESPACE TS_WEATHER_TEMP TEMPFILE '/u01/app/oracle/oradata/monitor/ts_weather_temp01.dbf' SIZE 200m AUTOEXTEND ON NEXT 32m MAXSIZE 2048m EXTENT MANAGEMENT LOCAL;
创建用户指定默认表空间 --新建用户 CREATE USER TENV IDENTIFIED BY tenv#123 DEFAULT TABLESPACE TS_TENV TEMPORARY TABLESPACE TS_TENV; CREATE USER WEATHER IDENTIFIED BY weather#123 DEFAULT TABLESPACE TS_WEATHER TEMPORARY TABLESPACE TS_WEATHER;
--如果先新建用户了,使用以下命令修改默认表空间 alter user TENV default tablespace TS_TENV; alter user WEATHER default tablespace TS_WEATHER; --授权连接权限 GRANT CONNECT TO TENV; GRANT CONNECT TO WEATHER; --授权表空间 GRANT UNLIMITED TABLESPACE TO TENV; GRANT UNLIMITED TABLESPACE TO WEATHER;
--修改密码有效期为永久 ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED ; SELECT * FROM dba_profiles WHERE profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME'; --解锁账号 alter user 用户名 identified by 原密码; alter user db_user account unlock; --查看每个用户连接数 select username,count(username) from v$session where username is not null group by username; --修改最大连接数 1. 查看最大连接数 show parameter processes 2. 修改最大连接数 alter system set processes = 1500 scope = spfile; 3. 重启数据库 shutdown immediate; startup;