Sync time
Cp/usr/share/zoneinfo/asia/shanghai/etc/localtime
Crontab-e
0-59/10 * * * */usr/sbin/ntpdate us.pool.ntp.org | Logger-t NTP
Ntpdate us.pool.ntp.org
Hwclock-w
To set a local DVD as a source:
Mkdir/mnt/cdrom
Mount/dev/cdrom/mnt/cdrom
#添加本地源
Cat >>/etc/yum.repos.d/centos-base.repo<<eof
[Local-cdrom-media]
name=centos-$releasever-media
baseurl=file:///mnt/cdrom/
Gpgcheck=1
Enabled=0
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-beta
Eof
#注意可能会碰到如下报错信息
Public key for *****.rpm isn't installed
#其实此时要导入rpm的签名信息即可
Log in as root, execute the following command
# Rpm–import/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
According to my Linux version, it's CentOS 5.10.
So I executed the following command
#rpm –import/etc/pki/rpm-gpg/rpm-gpg-key-centos-5
#本地安装的方法
Yum--disablerepo=*--enablerepo=local-cdrom-media Install screen lrzsz-y
1. Install Oracle software packages [Direct network Method]
Yum install avahi-compat-libdns_sd.x86_64 compat-db.i386 compat-db.x86_64 compat-gcc-34.x86_64 _64 compat-gcc-34-g77.x86_64 compat-glibc.i386 compat-glibc.x86_64 compat-glibc-headers.x86_64 compat-libf2c-34.x86 _64 compat-libgcc-296.i386 compat-libstdc++-296.i386 compat-libstdc++-33.i386 compat-libstdc++-33.x86_64 java-1.4.2-gcj-compat.x86_64 elfutils-libelf.i386 elfutils-libelf-devel.x86_64 elfutils-libelf-devel-static.x86_ compat-glibc.x86_64 glibc-devel.i386 glibc-devel.x86_64 glibc-headers.x86_64 glibc.x86_64 glibc.i686 kernel-headers.x86_64 libaio.i386 libaio.x86_64 libaio-devel.i386 libaio-devel.x86_64 libstdc++-devel.i386 libxp.i386 libxp.x86_64 libxpm.x86_64 sysstat.x86_64 readline-devel.x86_64 openssl-devel-y
[DVD local source installation]
Yum--disablerepo=*--enablerepo=local-cdrom-media install avahi-compat-libdns_sd.x86_64 compat-db.i386 compat-db.x86_64 compat-gcc-34.x86_64 compat-gcc-34-c++.x86_64 compat-gcc-34-g77.x86_64 compat-glibc.i386 compat-glibc.x86_64 compat-glibc-headers.x86_64 compat-libf2c-34.x86_64 compat-libgcc-296.i386 compat-libstdc++- 296.i386 compat-libstdc++-33.i386 compat-libstdc++-33.x86_64 java-1.4.2-gcj-compat.x86_64 elfutils-libelf.i386 elfutils-libelf-devel.x86_64 elfutils-libelf-devel-static.x86_64 compat-glibc.x86_64 glibc-devel.i386 glibc-devel.x86_64 glibc-headers.x86_64 glibc.x86_64 glibc.i686 kernel-headers.x86_64 libaio.i386 libaio.x86_64 libaio-devel.i386 libaio-devel.x86_64 libstdc++-devel.i386 libxp.i386 libXp.x86_64 sysstat.x86_64 readline-devel.x86_64 openssl-devel-y
2, modifying system version
Vi/etc/redhat-release
redhat-4
#CentOS Release 5.7 (Final)
3, modifying kernel parameters
Cat >>/etc/sysctl.conf<<eof
#for oracle10g
Kernel.shmall = 2097152
Kernel.shmmax = 2147483648
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Fs.file-max = 655360
Net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=1048576
net.core.rmem_max=1048576
net.core.wmem_default=262144
net.core.wmem_max=262144
Eof
Cat >>/etc/security/limits.conf<<eof
#for oracle10g
Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536
Eof
#32位
cat>>/etc/pam.d/login<<eof
#for oracle10g
Session REQUIRED/LIB/SECURITY/PAM_ limits.so
EOF
#64位
cat>>/etc/pam.d/login<<eof
#for oracle10g
Session required/lib64/security/pam_limits.so
EOF
Note: If your operating system is x64, then session required/lib64/security/pam_limits.so
Otherwise the system refuses to log on
and sysctl-p the system parameters.
If it is a C shell, the modified value of the environment variable file/etc/csh.login is as follows (if not determined here, skip):
if (\ $USER = = "Oracle") then
limit maxproc 16384
Li MIT descriptors 65536
umask 022
endif
4, add the following line in/etc/profile
Vim/etc/profile
#for oracle10g
Export Libxcb_allow_sloppy_lock=true
if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Umask 022
Fi
Eof
Use command source profile to make environment variables effective
Source/etc/profile
5, establish the users, groups and directories required to install Oracle
(1) New groups and users:
Groupadd Oinstall
Groupadd dba
USERADD-G oinstall-g dba Oracle
passwd Oracle
Create a table of contents
Mkdir-p/u01/app/oracle/product/10.2.0/db_1
Chown-r oracle.oinstall/u01
Chmod-r 755/u01
Creating Oracle Profile Files
#注意切换 Oracle Users
Su–oracle
Vim/home/oracle/.bash_profile
#Oracle Settings umask 022;
Export oracle_base=/u01/app/oracle;
Export Oracle_home= $ORACLE _base/product/10.2.0/db_1;
Export ORACLE_SID=ORCL;
Export nls_lang= ' simplified Chinese_china. ZHS16GBK '
Export path= $ORACLE _home/bin: $PATH;
Export Lang=en_us. UTF-8
if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-p 16384
Ulimit-p 65536
Else
Ulimit-u 16384-n 65536
Fi
Umask 022
Fi
source. bash_profile
Then set the local character set export Lang=en_us. UTF-8
6, modify Oracle installation files
Vim/home/oracle/database/install/oraparam.ini
oracle10g Silent Installation
Configuring ENTERPRISE.RSP Files
Let's make a copy.
Cp/home/oracle/database/response/enterprise.rsp/home/oracle/database/response/enterprise_new.rsp
Vim/home/oracle/database/response/enterprise_new.rsp
#修改以下值即可
responsefile_version=2.2.1.0.0
Unix_group_name= "Oinstall"
Oracle_home_name= "Oradb10g_home1"
Oracle_home= "/u01/app/oracle/product/10.2.0/db_1"
show_install_progress_page= true
show_end_of_install_msgs= true
component_languages={"ZH_CN"}
s_namefordbagrp= "DBA"
s_nameforopergrp= "DBA"
Install_type= "EE"
N_configurationoption=3
Restart_system=false
Restart_remote_system=false
Description: These items are subject to the circumstances, such as unix_group_name= "Oinstall" and s_namefordbagrp= "DBA" s_nameforopergrp= "DBA" and environment variables have to refer to the previous definition.
The complete reference is as follows
responsefile_version=2.2.1.0.0
Unix_group_name= "Oinstall"
From_location= ". /stage/products.xml "
Next_session_response=<value unspecified>
Oracle_home= "/u01/app/oracle/product/10.2.0/db_1"
Oracle_home_name= "Oradb10g_home1"
toplevel_component={"Oracle.server", "10.2.0.1.0"}
deinstall_list={"Oracle.server", "10.2.0.1.0"}
Show_splash_screen=false
Show_welcome_page=false
Show_node_selection_page=false
Show_summary_page=false
Show_install_progress_page=true
Show_config_tool_page=false
Show_xml_prereq_page=false
Show_rootsh_confirmation=true
Show_end_session_page=false
Show_exit_confirmation=false
Next_session=false
Next_session_on_fail=false
Show_deinstall_confirmation=false
Show_deinstall_progress=false
Restart_system=false
Restart_remote_system=false
Remove_homes=<value unspecified>
Oracle_hostname=<value unspecified>
Show_end_of_install_msgs=true
Cluster_nodes=<value unspecified>
component_languages={"ZH_CN"}
Install_type= "EE"
s_namefordbagrp= "DBA"
s_nameforopergrp= "DBA"
N_configurationoption=3
S_asmsyspassword= ""
S_asmsyspasswordagain= ""
N_dbtype=<value required>
Oracle.assistants.server:s_responsefilename=<value unspecified>
S_globaldbname=<value required>
S_dbsid=<value required>
S_dbretchar= "WE8ISO8859P1"
B_loadexampleschemas=false
B_usedbcontrol=true
B_receiveemailnotification=false
S_dlgemsmtpserver=<value unspecified>
S_dlgememailaddress=<value unspecified>
S_dlgemcentralagentselected=<value unspecified>
N_dbstoragetype=<value unspecified>
S_mountpoint=<value unspecified>
S_rawdevicemapfilelocation=<value unspecified>
B_enableautobackup=false
B_usefilesystemforrecovery=true
S_dlgrborecoverylocation=<value unspecified>
S_dlgrbousername=<value unspecified>
S_dlgrbopassword=<value unspecified>
S_dlgasmcfgdiskgroupname= "DATA"
S_dlgasmcfgdiskdiscoverystring=<value unspecified>
N_dlgasmcfgredundancyselected=<value unspecified>
Sl_dlgasmcfgselectabledisks=<value unspecified>
Sl_dlgasmcfgdiskselections=<value unspecified>
sl_dlgasmdskgrpselectedgroup={"," "," "," "}
B_centrallymanageasminstance=true
B_usesamepassword=true
S_superadminsamepasswd=<value unspecified>
S_superadminsamepasswdagain=<value unspecified>
Sl_superadminpasswds=<value unspecified>
Sl_superadminpasswdsagain=<value unspecified>
N_performupgrade=0
N_upgradedb=0
S_dbohselectedforupgrade= ""
S_dbsidselectedforupgrade= ""
N_upgradeasm=0
S_dbselectedusesasm= "No"
sl_upgradablesidbinstances={}
sl_upgradableracdbinstances={}
N_dbselection=0
B_stateofupgradeasmcheckbox=false
B_stateofupgradedbcheckbox=false
B_oneclick=false
S_dlgasmcfgredundancyvalue= ""
S_dlgasmcfgexistingfreespace= "0"
S_dlgasmcfgnewdiskssize= ""
s_dlgasmcfgadditionalspaceneeded= "0 MB"
Formal Installation
Su-oracle
/home/oracle/database/runinstaller-silent-responsefile/home/oracle/database/response/enterprise_new.rsp
#接下来按提示操作, Root Login
Su Root
sh/u01/app/oracle/orainventory/orainstroot.sh
sh/u01/app/oracle/product/10.2.0/db_1/root.sh
Test under
Sqlplus/as SYSDBA
Update latest patches upgrade to highest version
Upgrade to the latest 10.2.0.5.4
Cp/home/oracle/disk1/response/patchset.rsp/home/oracle/disk1/response/patchset_new.rsp
Vim/home/oracle/disk1/response/patchset_new.rsp
1, edit the upgrade media. /DISK1/RESPONSE/PATCHSET.RSP files, mainly edit the following entries
Unix_group_name= "Oinstall"
Oracle_home= "/u01/app/oracle/product/10.2.0/db_1"
Oracle_home_name= "Oradb10g_home1"
Oracle_home_name can be from. The home name in the/orainventory/contentsxml/inventory.xml file is obtained.
2, upgrade the Oracle software "non-new Installation words"
$./RUNINSTALLER-SILENT-RESPONSEFILE/HOME/ORACLE/DISK1/RESPONSE/PATCHSET_NEW.RSP
3, the implementation of root.sh
4, sql> startup upgrade Database
5, sql> SPOOL Upgrade_info.log
6, Implementation @ $ORACLE _home/rdbms/admin/utlu102i.sql Collection upgrade information
7, sql> SPOOL off save to file
8, start listening: [Oracle@localhost disk1]$ lsnrctl start
9, into the Sqlplus
Sql> Startup upgrade
Sql> SPOOL Patch.log
sql> @ $ORACLE _home/rdbms/admin/catupgrd.sql– upgrade script [Refresh data dictionary]
Sql> SPOOL off
10. Restart Oracle
Sql> SHUTDOWN IMMEDIATE
Sql> STARTUP
11. sql> @ $ORACLE _home/rdbms/admin/utlrp.sql
12, Query Sys.dba_registry view, see the component status is valid
13, Emca-upgrade db– update em database
The complete reference is as follows
responsefile_version=2.2.1.0.0
Unix_group_name= "Oinstall"
From_location=<value required>
Next_session_response=<value unspecified>
Oracle_home= "/u01/app/oracle/product/10.2.0/db_1"
Oracle_home_name= "Oradb10g_home1"
toplevel_component={"Oracle.patchset.db", "10.2.0.5.0"}
Show_splash_screen=false
Show_welcome_page=false
Show_component_locations_page=false
Show_custom_tree_page=false
Show_summary_page=false
Show_install_progress_page=true
Show_required_config_tool_page=false
Show_optional_config_tool_page=false
Show_config_tool_page=false
Show_xml_prereq_page=false
Show_release_notes=false
Show_end_of_install_msgs=true
Show_rootsh_confirmation=true
Show_end_session_page=false
Show_exit_confirmation=false
Next_session=false
Next_session_on_fail=false
Show_deinstall_confirmation=false
Show_deinstall_progress=false
Accept_license_agreement=true
Restart_system=<value unspecified>
Cluster_nodes=<value unspecified>
Oui_hostname=<value unspecified>
Remove_homes=<value unspecified>
component_languages={"en"}
Sl_usernodelist=<value unspecified>
#MYORACLESUPPORT_USERNAME =<value unspecified>
#MYORACLESUPPORT_PASSWORD =<value unspecified>
Proxy_host=<value unspecified>
Proxy_port=<value unspecified>
Proxy_user=<value unspecified>
Proxy_pwd=<value unspecified>
Security_updates_via_myoraclesupport=<value unspecified>
#DECLINE_SECURITY_UPDATES =<value unspecified>
Collector_upgrade=<value unspecified>
Collector_ignore_configuration=<value unspecified>
Collector_ignore_failures=<value unspecified>
Collector_use_obfuscated_passwords=<value unspecified>
Collector_response_file=<value unspecified>
Collector_supporthub_url=<value unspecified>
Myoraclesupport_username=eblisgod@gmail.com
Decline_security_updates=true
Execute the following script with Root when finished
Help
/u01/app/oracle/product/10.2.0/db_1/root.sh
#OPatch
MV $ORACLE _home/opatch $ORACLE _home/opatch_bak
Unzip P6880880_102000_linux-x86-64.zip
CP-RF opatch/$ORACLE _home/
2, decompression p16619894_10205_linux-x86-64.zip to $oracle_home/opatch.
CD $ORACLE _home/opatch/
Unzip P16619894_10205_linux-x86-64.zip
3, the implementation of $oracle_home/opatch./opatch prereq checkconflictagainstohwithdetail-phbasedir./16619894
./opatch prereq Checkconflictagainstohwithdetail-phbasedir./16619894
4, CD 16619894
5 、.. /./opatch Apply
6,
CD $ORACLE _home/rdbms/admin
Sqlplus/nolog
Sql> Connect/as SYSDBA
Sql> STARTUP
sql> @catbundle. SQL PSU Apply
Sql>--Execute The next statement only if it is the "the" the "the" is the "the" is the "the" Since 10.2.0.5.3.
sql> @utlrp. sql
Sql> QUIT
Check for patches:
Command 1. $ORACLE _home/opatch/opatch lsinventory-bugs_fixed | Egrep-i ' psu| DATABASE PATCH SET UPDATE '
2. $ORACLE _home/opatch/opatch lsinventory
3.select * from Registry$history
Three commands optional
#安装监听
Cp/home/oracle/database/response/netca.rsp/home/oracle/database/response/netca_new.rsp
Modify the following values:
Install_type= "" Custom "" #安装的类型
Listener_number=1 #监听器数量
listener_names={"LISTENER"} #监听器的名称列表
listener_protocols={List of communication protocols used by the "tcp;1521"} # Listener
Listener_start= "" LISTENER "" # Listener started name
The complete reference is as follows
[General]
responsefile_version= "10.0"
Create_type= "CUSTOM"
[oracle.net.ca]
installed_components={"Server", "Net8", "JAVAVM"}
Install_type= "" Custom ""
Listener_number=1
listener_names={"LISTENER"}
listener_protocols={"tcp;1521"}
Listener_start= "" LISTENER ""
naming_methods={"TNSNAMES", "Onames", "HOSTNAME"}
Nsn_number=1
nsn_names={"Extproc_connection_data"}
Nsn_service = {"Plsextproc"}
nsn_protocols={"TCP; hostname;1521 "}
#注意 must ensure that/etc/hosts is consistent with hostname when executing the following statement.
Hostname
Orcldata
Cat/etc/hosts
127.0.0.1 orcldata localhost.localdomain localhost
:: 1 localhost6.localdomain6 Localhost6
Su-oracle
$ORACLE _HOME/BIN/NETCA/SILENT/RESPONSEFILE/HOME/ORACLE/DATABASE/RESPONSE/NETCA_NEW.RSP
Modify Dbstart
The
sed-i s/\/ade\/vikrkuma_new\/oracle/\ $ORACLE _home/g $ORACLE _home/bin/dbstart
ensures that the network listener starts at the same time when the database is started.
Add Data instances
CP/HOME/ORACLE/DATABASE/RESPONSE/DBCA.RSP/HOME/ORACLE/DATABASE/RESPONSE/DBCA_NEW.RSP
vim/home/oracle/ DATABASE/RESPONSE/DBCA_NEW.RSP
Edit different database library options based on how the database is built.
For example, the following parameters have been set during this installation: (Note that the following parameters, depending on the situation, do not copy the original file has been described in this option)
Responsefile_version = "10.0.0"
Operation_type = " CreateDatabase "
Gdbname = ORCL" # database global name
SID = "ORCL" #这个sid must be the same as the SID in the previous/home/oracle/.bash_profile file
# Note : Be sure to note that the above two variables set two values are different, but most of the settings are the same, the same value I did not test, interested can try (the same value will be easier to understand)
TemplateName = "NEW_DATABASE.DBT"
Syspassword = "System" # SYS user's initial password
Systempassword = "System" #SYSTEM user's initial password
Datafiledestination = "/u01/app/orac le/oradata/"
recoveryareadestination="/u01/app/oracle/flash_recovery_area
Storagetype=fs
CHARACTERSET = "ZHS16GBK" #数据库字符集 (Chinese as ZHS16GBK)
Memorypercentage = "
Scriptdestination ="/u01/app/oracle/ Admin/ora10g/scripts "
emconfiguration=" local
Sysmanpassword = "System"
Dbsnmppassword = "System"
The complete reference is as follows
[General]
Responsefile_version = "10.0.0"
Operation_type = "CreateDatabase"
[CreateDatabase]
Gdbname = "ORCL"
SID = "ORCL"
templatename = "NEW_DATABASE.DBT"
Syspassword = "System"
Systempassword = "System"
Datafiledestination = "/u01/app/oracle/oradata/"
recoveryareadestination= "/u01/app/oracle/flash_recovery_area"
Storagetype=fs
CHARACTERSET = "ZHS16GBK"
Memorypercentage = "40"
Scriptdestination = "/u01/app/oracle/admin/ora10g/scripts"
emconfiguration= "Local"
Sysmanpassword = "System"
Dbsnmppassword = "System"
Su–oracle
$ORACLE _HOME/BIN/DBCA-SILENT-RESPONSEFILE/HOME/ORACLE/DATABASE/RESPONSE/DBCA_NEW.RSP
After a successful database creation, you need to modify some information:
Vi/etc/oratab
orcl:/u01/app/oracle/product/10.2.0/db_1:n
To
Orcl:/u01/app/oracle/product/10.2.0/db_1:y
Sed-i "S/db_1:n/db_1:y/g"/etc/oratab
Ensure that database instances can be started automatically.
Create a database and listener self-initiated service
Su-root
cd/etc/rc.d/init.d/
Touch Oradbstart
Vim Oradbstart
The script reads as follows:
#!/bin/bash
# chkconfig:345 99 10
# Description:startup Script for Oracle Databases
#/etc/rc.d/init.d/oradbstart
Export oracle_base=/u01/app/oracle/
Export Oracle_home=/u01/app/oracle/product/10.2.0/db_1
Export ORACLE_SID=ORCL
Export path= $ORACLE _home/bin: $PATH
Export nls_lang= ' simplified Chinese_china. ZHS16GBK '
Case "$" in
Start
Su-oracle-c "$ORACLE _home/bin/dbstart $ORACLE _home"
Su-oracle-c "$ORACLE _home/bin/emctl start Dbconsole"
Touch/var/lock/oracle
echo "OK"
;;
Stop
Echo-n "Shutdown Oracle:"
Su-oracle-c "$ORACLE _home/bin/dbshut $ORACLE _home"
Su-oracle-c "$ORACLE _home/bin/lsnrctl Stop"
Su-oracle-c "$ORACLE _home/bin/emctl stop Dbconsole"
Rm-f/var/lock/oracle
echo "OK"
;;
Restart)
$ stop
$ start
echo "Restart ok!!"
;;
*)
echo "Usage: ' basename $ ' start|stop|restart"
Exit 1
Esac
Exit 0
Permissions to modify data scripts
Su-root
Chown Oracle.oinstall/etc/rc.d/init.d/oradbstart
chmod 775/etc/rc.d/init.d/oradbstart
Add the Oradbstart service to the Chkconfig (not executed here)
Chkconfig--add Oradbstart
Chkconfig--list Oradbstart
Starting a database instance
Su-oracle
$ORACLE _home/bin/dbstart
Test:
Su-oracle
Sqlplus/nolog
Sql> Connect/as SYSDBA
Sql> Startup
The test was successful.
Modify two profiles (this is important here, if you do not change, you may have failed to connect to the Plsql remote Connection database connection locally)
modifying Tnsnames.ora files
Vi/u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
ORCL =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = orcldata) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = ORCL)
)
)
Extproc_connection_data =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = HOSTNAME) (PORT = 1521))
)
(Connect_data =
(service_name = Plsextproc)
)
)
To
ORCL =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = 192.168.75.20) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = ORCL)
)
)
Extproc_connection_data =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = 192.168.75.20) (PORT = 1521))
)
(Connect_data =
(service_name = Plsextproc)
)
)
Note: The red part please replace the actual IP
modifying Listener.ora files
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = Plsextproc)
(Oracle_home =/u01/app/oracle/product/10.2.0/db_1)
(program = Extproc)
)
)
LISTENER =
(Description_list =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = orcldata) (PORT = 1521))
(address = (PROTOCOL = IPC) (KEY = EXTPROC0))
)
)
To
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = Plsextproc)
(Oracle_home =/u01/app/oracle/product/10.2.0/db_1)
(program = Extproc)
)
(Sid_desc =
(Global_dbname = ORCL)
(Oracle_home =/u01/app/oracle/product/10.2.0/db_1)
(Sid_name = ORCL)
)
)
LISTENER =
(Description_list =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (host=192.168.75.20) (PORT = 1521))
(address = (PROTOCOL = IPC) (KEY = EXTPROC0))
)
)
Note: The red part is the modified part, please replace the actual IP
Restart Oracle
Su–oracle
-bash-3.2$ sqlplus "/as sysdba"
Sql*plus:release 10.2.0.1.0-production on Sat Dec 7 15:44:19 2013
sql> shutdown Immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
Sql> quit
-bash-3.2$ $ORACLE _home/bin/lsnrctl Stop
-bash-3.2$ $ORACLE _home/bin/lsnrctl Start
-bash-3.2$ sqlplus "/as sysdba"
sql> Startup Open
Sql> quit
Complete.
Up to the above in fact, Oracle installation has been completed, the following code is to create a table space, users, database import, based on integrity, posted out.
Create table spaces, users, etc. with system users
Su-oracle
Sqlplus "/as sysdba"
#创建表空间
Create temporary tablespace afinitor_temp tempfile '/u01/app/oracle/oradata/orcl/afinitor_temp. ORA ' SIZE 32M autoextend on NEXT 32M MAXSIZE 2048M EXTENT MANAGEMENT Local;
#创建临时表空间
Create tablespace afinitor LOGGING datafile '/u01/app/oracle/oradata/orcl/afinitor. DBF ' SIZE 32M autoextend on NEXT 32M MAXSIZE 2048M EXTENT MANAGEMENT Local;
#创建用户
Create user Afinitor identified by afinitor default tablespace afinitor temporary tablespace;
#给用户授权
Grant Resource,connect,exp_full_database,imp_full_database,create session to Afinitor;
Grant DBA to Afinitor;
#授权导入导出
GRANT CREATE user,drop user,alter USER, create any VIEW, DROP any view,exp_full_database,imp_full_database,dba,connect, Resource,create session to Afinitor;
Data import
Cd/home
(Here is the database DMP file that you need to download on another server)
Su–oracle
Imp sys/111111@orcl file=/home/database.dmp full=y ignore=y #导入命令
Or the following statement is faster
IMPDP sys/111111 Directory=dump_dir dumpfile=database.dmp full=y
Related Posts:
Oracle_10g_rac detailed configuration OCFS2 + raw RAW equipment
CentOS 5 VPS configured pptpd as VPN server
VPS Automatic daily backup files and database upload ftp space and email [practical]
CentOS 6.3 Kickstart _DHCP+HTTPD Implement server bulk unattended installation
Deployment of CentOS VPN (PPTPD)