In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Yum install libaio* to install the Libaio package
Then extract the installation package
Unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
Enter the Disk1 folder
Install the decompressed rpm package
Rpm-ivh oracle-xe-11.2.0-1.0.x86_64.rpm
When the installation is successful, you will be prompted for success, and then run the following script as super user to configure:
# / etc/init.d/oracle-xe configure
Including the port of http, if you have tomcat running on your server and have not changed the port configuration, change the default port 8080 to avoid conflicts.
In addition, the program will ask you to set a password for the default administrator account sys. Then we will wait for some time. Please be patient.
When the installation is complete, the system automatically establishes a user named oracle, with the home dir location in / u01/app/oracle, the location where the database is installed.
For ease of use, we can copy .bashrc and .bash _ profile from the individual user's home directory to this directory, and then use chown to change the file ownership:
# chown oracle .bash _ profile
# chown oracle .bashrc
# chmod 755 .bash _ profile
# chmod 755 .bashrc
After that, we will set the environment variable:
Modify the / etc/profile file to add the following:
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe; export ORACLE_HOME
ORACLE_SID=XE; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
TNS_ADMIN=$ORACLE_HOME/network/admin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
If [$USER = "oracle"]; then
If [$SHELL = "/ bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
Note: the following points:
There can only be one instance in the XE version. After I modify the SID, it looks like an error will be reported, so there is no need to modify the SID.
Try not to add slash'/ 'after BASE and HOME variables, it is possible to report an error, although I don't know why. At the same time, the variable TNS_ADMIN must have.
After modification, use the command # source / etc/profile to reload the modified file.
Enter echo $ORACLE_BASE whether the modification was successful.
Initialize the database:
# su Oracle
If you don't know the password, you can use # passwd oracle to reset it.
Modify init.ora:
Cd / u01/app/oracle/product/11.2.0/xe/dbs/
Cp init.ora initXE.ora
Vi initXE.ora
Modify the file to read as follows:
Db_name='XE'
Memory_target=1G
Processes = 150
Audit_file_dest='/u01/app/oracle/admin/orcl/adump'
Audit_trail = 'db'
Db_block_size=8192
Db_domain=''
Db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
Db_recovery_file_dest_size=2G
Diagnostic_dest='/u01/app/oracle'
Dispatchers=' (PROTOCOL=TCP) (SERVICE=ORCLXDB)'
Open_cursors=300
Remote_login_passwordfile='EXCLUSIVE'
Undo_tablespace='UNDOTBS1'
# You may want to ensure that control files are created on separate physical
# devices
Control_files = ('/ u01scarlet oradataplains','/ u01scarplecharacedoradataplains')
Compatible = '11.2.0'
Switch only oracle users to use sqlplus to link to the database
Sqlplus / nolog
Enter the sqlplus console
SQL > connect as sysdba
Prompt for username and password: log in using sys/password
Start and load the database
SQL > startup mount
The 11g xe version already comes with a set database XE, so you are not allowed to create the database manually, but you need to initialize the database structure
Run two lines of code:
SQL > @? / rdbms/admin/catalog.sql
SQL > @? / rdbms/admin/catproc.sql
After waiting for the prompt complete, proceed to the next step.
If database didn't open occurs during operation, you need to restart and mount the database. [Linux Commune http://www.linuxidc.com]
Next, create the user, and the users table should already exist in the initial database, so just insert the data:
SQL > create user myaccount
2 identified by "mypassword"
3 default tablespace users
Authorized users:
SQL > grant dba to myaccount
You can then exit and log in with that user.
Insert table test:
SQL > create table test_table (txt varchar2 (100) not null)
SQL > insert into test_table values ('Hello world!')
Query after successfully inserting data
SQL > select * from test_table
If the query is successful, then congratulations, it's done!
I am also a novice. If there is anything wrong with the article, please correct it.
-
Some questions:
If an error occurs:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Generally, because the database is not started, you need to log in to the database as DBA and enter startup
Make sure that the init.orc file exists in the / u01/app/oracle/product/11.2.0/xe/dbs/ folder before you do it.
ORA-00845:MEMORY_TARGET not supported on this system
Please check whether the value in the memory_target entry in your init.orc file is less than tmpfs, otherwise please expand the tmpfs capacity.
ORA-44410:XE edition single instance violation error
There can be only one instance in the XE version. When the author installs, the program automatically generates an instance called XE and the path has been set. As for how to add a new instance, please indicate.
Or
Make sure that your environment variable does not end with'/ 'and that the TNS_ADMIN variable is set. As for why it is so changed.. I hope some talented people can also tell me.
ORA-01261:Parameter db_recovery_file_dest destination string connot be translated
ORA-01262:Stat failed on a file destination directory
There is nothing to say about this error. In init.orc, the initial value of the db_recovery_file_dest destination entry is "/ flash_recovery_area".
If you only modify it, you will get this error, because there is only one file called fast_recovery_area under $ORACLE_BASE. After changing the following file name to match, the problem is solved.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.