This article is a mirror article of machine translation, please click here to jump to the original article.

View: 21960|Reply: 0

[Source] centos6.5 installation oraclexe11g full tutorial sharing

[Copy link]
Posted on 3/29/2015 9:15:27 AM | | |
Recently, I was planning to start learning hibernate, because I have been using itoracledatabaseto learn, so I also want to be thereserverInstall oracle on your website.
I installed itoracle-xe-11.2.0-1.0.x86_64.rpm.zip
Because of my serverdispositionNot very good, so I chose to install the oracle-xe version, which is only 301M in size, but its features are exactly what I wanted.
# in this article indicates root users, and $ indicates normal users
Take a look at my server firstInformationLet's go
#uname -a
Linux  2.6.32-431.23.3.el6.x86_64 #1 SMP Thu Jul 31 17:20:51 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
#cat  /etc/redhat-release
CentOS release 6.5 (Final)
#redhat 4
#uname -r
2.6.32-431.23.3.el6.x86_64
Memory: 1g hard disk (20+8)g
Let's start installing it below, because I am also referring to it through the Internet, plusFromhas been processed, so the following work may be similar to the network:
1. ViewoperationThe system knows if it can be installed
Linux5, linux6 (x86-64) and Red Hat linux5, Red Hat linux6 (x86-64) kernels support 2.6.32-xxxxxx and above versions can be installed, and this system can be installed. If you don't support the installation, just skip it
2. Install some necessary packages, this step can be found in the online method.
Install directly in yum
# yum install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat unixODBC unixODBC-devel -y
Note: The yum source points directly to the 163 source and does not use the systemMirroringMake local yum.
3. Create users and user groups
Create a group
# groupadd oinstall
# groupadd dba

Add user oracles to the group
# useradd -m -g oinstall -G dba oracle
Set upPasswords
# passwd oracle
After using the useradd command to create a user, a folder named Oracle is created in the home directory.
We need to use oraclea later
Add sudo permissions for Oracle users
# vim /etc/sudoers

4. Create an oracle installation directory
Note that the first line below is /u01/11g on the Internet is wrong, because in this installation directory, oralce does not have an 11g directory, and his top-level directory is app
# mkdir -p /u01/app
# chown -R oracle:oinstall /u01/
# chmod -R 775 /u01/
5. Set the kernel parameters
For more information on kernel parameters, please refer to this page
# vim /etc/sysctl.conf  
fs.aio-max-nr = 1048576   
fs.file-max = 6815744   
kernel.shmall = 2097152   
kernel.shmmax = 4294967295   
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500   
net.core.rmem_default = 262144   
net.core.rmem_max = 4194304   
net.core.wmem_default = 262144  
net.core.wmem_max = 1048586
# sysctl -p #重新载入立即生效
6. Set environment variables
Environment variables are important, and most of them are not clearly stated or wrong on the Internet. See Environment Variable Settings below.
Since Oracle-XE-11.2.0 is a single-instance version, please do not modify the ORACLE_SID in the environment variables. There will be an error after modification.
# vim ~oracle/.bash_profile   
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe
export ORACLE_SID=XE
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
# source ~oracle/.bash_profile        
#加载dispositionor Oracle users log out and log back in
8. Set the switching partition
Follow the steps below
a,# free -m to see if there is a swap partition, and the transaction sets the size of the swap partition to 2 times the memory, my memory is 1g, so I set it to 2g, if not, add it, if there is, modify it accordingly. You can remove and then recreate it
b,# dd if=/dev/zero of=/var/swap bs=1024 count=2048000
Set up the swap partition
c. Set the exchange conditions
# mkswap /var/swap
d, Activate the Enable Swap Partition immediately
# swapon /var/swap
e, self-start operation when adding system boot
# vi /etc/fstab to add a line
/var/swap               swap                    swap    defaults        0    0 中间的空格可以是tab建
f, reclaim swap space
# swapoff /var/swap
g, reclaim from the file system
# rm /var/swap

9. Set the modify shm
ORA-00845: MEMORY_TARGET not supported on this system error may occur when starting the database (startup) at a later stage
Meaning that the size of oracle SGA exceeds the size of the system shm, there are two solutions: 1. Modify the size of the shm .2. Modify the size of the SGA_MAX_SIZE
We modify the shm
$ vi /etc/fstab
none /dev/shm tmpfs defaults 0 0
Modified to:
none /dev/shm tmpfs defaults,size=2G 0 0
Here I modified it to 2g, when you modify, please set it according to your own system
Then save and exit, remount shm
$ umount /dev/shm
$ mount /dev/shm
See the shm size
$ df -h |grep shm
10. Download oracle-xe-11.2.0-1.0.x86_64.rpm.zip
Go to Oracle official download.
Since Oracle has increased the permissions, direct downloads are not allowed, and downloads need to be downloaded after logging in, so the usual practice is to download after logging in, and then downloadUpload, will be troublesome. Fortunately, we have powerful wget commands. Below I will teach you how to download it.
First log in to oracle, and click oracle-xe-11.2.0-1.0.x86_64.rpm.zip download connection, but we don't download, remember not downloading, we just want to get this connection, this connection is similar to the link below
http://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip?AuthParam=1427515409_83d3d2e012923ee15b4b815e45bc5660
We can't download it directly with the wget command under centos, and it may not be possible to download it under Windows, because the parameters behind it can only be used once.
To save time, we should use the wget command like this under centos
# wget -c –http-user=Oracle username–http-password=User password–output-document=The output file name Download URL
Pay attention to the download URL, it must be the latest download URL command above, I believe everyone should understand it.
11. Start the installation.
First, go to Oracle Users
# su oracle
Go to the Oracle installation directory
$ cd /u01
$ sudo rpm -ivh –replacefiles  oracle-xe-11.2.0-1.0.x86_64.rpm
Note that sudo must be added in front, otherwise the permission error will be prompted.
The installation below is simple
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.
Run #/etc/init.d/oracle-xe configure as root
Set ports 8080 and 1521 according to the prompts, as well as sys and system passwords, whether to boot or not, etc
When you see Installation Completed successfully. Calculate the installation successful.
Since then, we can test it
Go to Oracle user su Oracle
$sqlplus /nolog
The first time I installed, if there are any errors, I hope to correct them


The following content is relatively small, but I think you will like to read it,ORACLE-XE-11.2.0 How to get inAPEXManage
This article describes how to manage apex with a browser after successfully installing oracle-xe-11.2.0-1.0.x86_64.rpm
First we open the http://www.abc.com:8088/apex/apex_admin
The username is admin
The password is the password we set when we install oracle-xe-11.2.0, and the password needs to be changed for the first time to log in, and the password needs to meet his requirements (both uppercase and lowercase numbers and symbols).

Also, APEX may not support some browsers, i.e. entering the wrong username and password will prompt an error message.
Entering the correct username and password will lead to a direct jump to the login page.

You can refer to the following tips.
Modify nginx www.abc.com.conf. The content is as follows
server {
listen 80;
server_name www.abc.com www.abc.com;
locatio to remove n / {
proxy_pass http://127.0.0.1:8088;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
In this way we can access www.abc.com/apex directly without having to add a port to access our apex





Previous:There is a difference between OAuth 1.0 and OAuth 2.0
Next:Alipay credit card Huabei function is finally here? Test how much you can overdraw?
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com