In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to deploy Oracle in linux environment", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to deploy Oracle in linux environment" this article.
1. Environment and related software
Virtual machine: VMwore Workstation
Linux system: CentOSORACLE:
ORACLE_112030_Linux-x86-64
Xmanger software
2. Install virtual machine and Linux system
1. Install a virtual machine
two。 Install Centos
2.1 New virtual machine
2.2 next, choose to install the operating system later.
2.3Select operating system, linux, version centos 64-bit
2.4 naming of virtual machines and selection of file locations
2.6 Select the hard disk size. You can choose the default 20g when practicing.
2.7 the next step is to prepare for the creation of a virtual machine
2.8 Edit virtual machine related configuration
1g or more of memory is recommended (not less than 512m is recommended):
Select system path
The network adapter chooses the bridging mode (each mode can be learned and compared by itself)
Other parameters can be adjusted as needed.
2.9 enable the virtual machine
2.10 install the system
2.11 Skip detection
2.12 all the way to this point (disk partition is selected by default, no custom partition is defined), select format data
2.13 rename the hostname, you can fill in any legal name, suggested English and numbers
2.14 Select time zone
2.15 set the root password
2.16 the next step is to select the desktop type, which can be selected for beginners.
2.17 Select the next step to enter the system installation
2.18 reboot after completion
2.19 after boot, all execute the next step 3. Network and Firewall Settings 3.1 Network Settings
You can refer to the relevant settings of this machine to view the relevant configuration of this machine: cmdroomipconfig-all
Modify it in ifcfg-eth0 under the / etc/sysconfig/network-scripts folder
3.2 Firewall settings: turn off the firewall
[root@ORACLE1 ~] # service iptables stop / / temporarily close the firewall [root@ORACLE1 ~] # chkconfig-- level 35 iptables off / / permanently close the firewall [root@ORACLE1 ~] # chkconfig-- list iptables / / check whether the changes take effect
III. Oracle installation
1. Hardware detection
[root@oracle1 ~] # cat / etc/issue / / (version) [root@ORACLE1 ~] # uname-r / / (version) [root@ORACLE1 ~] # grep MemTotal / proc/meminfo / / (memory size) [root@ORACLE1 ~] # grep SwapTotal / proc/meminfo / / (swap area size) [root@ORACLE1 ~] # grep "model name" / proc/cpuinfo / / (CPU Information) [root@ORACLE1 ~] # free / / (available memory)
Note:
Physical memory not less than 1G hard disk space not less than 15Gswap partition space not less than 1G support more than 256color graphics card cpu main frequency is not less than 550mHZ2. Close SELinux
[root@ORACLE1] # / usr/sbin/sestatus-v / / check SELinux status. If the parameter is enabled, it will be enabled.
[root@ORACLE1 ~] # vi / etc/selinux/config / / close SELinux
Change SELINUX=enforcing to SELINUX=disabled
Just restart the machine (if you don't want to restart the system, use the command setenforce 0)
3. Modify the hosts file
[root@oracle1 ~] # hostname / / View hostname
[root@oracle1 ~] # vi / etc/hosts / / modify the hosts file
[root@oracle1 ~] # vi / etc/sysconfig/network
4. Check the installation of dependent system packages
[root@ORACLE1 ~] # yum install gcc make binutils gcc-c++ compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf-devel-static ksh libaio libaio-devel numactl-devel sysstat unixODBC unixODBC-devel pcre-devel
/ / during installation, click y to confirm that if yum fails, you need to check the network
[root@oracle1 ~] # rpm-q gcc make binutils gcc-c++ compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf-devel-static ksh libaio libaio-devel numactl-devel sysstat unixODBC unixODBC-devel pcre-devel | grep "not installed" / / Note: check whether the dependency package is fully installed. If the installation package shows is not installed (not installed) (e.g. package gcc is not installed), install it with the yum install command, such as [root@ORACLE1 ~] # yum install gcc
5. Copy ORACLE softwar
[root@ORACLE1 ~] # mkdir-p / sharedisk/11G / / create the software folder. Here, in order to place the software separately, create it or not, and put it in the appropriate location.
Use xftp software to copy p10404530_112030_Linux-x86-64_1of7.zip and
P10404530_112030_Linux-x86-64_2of7.zip to the / sharedisk/11G directory.
[root@ORACLE1 ~] # cd / sharedisk/11G
[root@ORACLE1 11G] # unzip p10404530_112030_Linux-x86-64_1of7.zip / / decompress
[root@ORACLE1 11G] # unzip p10404530_112030_Linux-x86-64_2of7.zip / / decompress
Note: if unzip is not installed, execute the command yum install unzip, and a new / sharedisk/11G/database directory will be added after decompression, which contains all the unzipped oracle installation files.
6. Create operating system groups and users
[root@ORACLE1 11G] # id oracle / / confirm whether there is an oracle user [root@ORACLE1 11G] # groupadd oinstall [root@ORACLE1 11G] # groupadd dba [root@ORACLE1 11G] # useradd-g oinstall-G dba-d / home/oracle oracle
Note: oinstall is the main group. Make sure the / home/oracle directory does not exist.
[root@ORACLE1 11G] # passwd oracle / / set the user's oracle password to oracle
7. Modify OS kernel parameters
[root@ORACLE1 11G] # vi / etc/sysctl.conf / / added at the end of the file
Fs.aio-max-nr = 1048576fs.file-max = 6553600kernel.shmall = 2097152kernel.shmmax = 1073741824kernel.shmmni = 4096kernel.sem = 25032000 100 128net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586
Note: add at the end of the / etc/sysctl.conf file (according to the document requirements kernel.shmmax set to half of the physical memory is the most reasonable) setting principle: kernel.shmmax is 4GB-1byte or half of the physical memory, which value is lower which is used.
[root@ORACLE1 home] # / sbin/sysctl-p / / let the parameter take effect
Note: if there is any error reported below, please refer to the solution below
Error resolution:
[root@ORACLE1 11G] # modprobe bridge
[root@ORACLE1 11G] # lsmod | grep bridge
[root@ORACLE1 11G] # / sbin/sysctl-p
8. Modify user restriction file
[root@ORACLE1 11G] # vi / etc/security/limits.conf / / add oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240 [root@ORACLE1 11G] # vi / etc/pam.d/login / / after the file. [root @ ORACLE1 11G] # vi / etc/profile / / add if [$USER = "oracle"] at the end of the file; then if [$SHELL = "/ bin/ksh"] Then ulimit-p 16384 ulimit-n 65536 else ulimit-u 16384-n 65536 fifi [root@ORACLE1 11G] # source / etc/profile / / to make the setting effective
9. Create installation directory and set file permissions
[root@ORACLE1 11G] # mkdir-p / u01/app/oracle/product/11.2.0 / / installation directory of database system [root@ORACLE1 11G] # mkdir / u01/app/oracle/oradata / / installation directory of database data [root@ORACLE1 11G] # mkdir / u01/app/oraInventory [root@ORACLE1 11G] # mkdir / u01/app/oracle/oraInventory [root@ORACLE1 11G] # mkdir / u01Acceleron _ area [root @ ORACLE1 11G] # chown -R oracle:oinstall / u01/app/oracle [root@ORACLE1 11G] # chown-R oracle:oinstall / u01/app/oraInventory [root@ORACLE1 11G] # chown-R oracle:oinstall / u01/app/oracle/oraInventory [root@ORACLE1 11G] # chmod-R 775 / u01/app/oracle [root@ORACLE1 11G] # chmod-R 775 / u01/app/oraInventory [root@ORACLE1 11G] # chmod-R 11G / u01/app/oracle/oraInventory
10. Set the oracle environment variable
[root@ORACLE1 11G] # su-oracle / / enter oracle users
[oracle@ORACLE1] $vi / home/oracle/.bash_profile / / or vi ~ / .bash_profile is added at the end of the file
ORACLE_BASE=/u01/app/oracleORACLE_HOME=$ORACLE_BASE/product/11.2.0ORACLE_SID=gtadb21PATH=$PATH:$ORACLE_HOME/binexport ORACLE_BASE ORACLE_HOME ORACLE_SID PAT
Note: pay attention to the SID setting
[oracle@ORACLE1 ~] $source / home/oracle/.bash_profile / / to make the setting effective
[oracle@ORACLE1 ~] $env / / check environment variables
11. Install oracle software (login with oracle user)
[oracle@oracle1 ~] $cd / sharedisk/11G/database
[oracle@oracle1 database] $ll
[oracle@oracle1 database] $. / runInstaller
Note: if you cannot call up the graphical interface here, you need to make corresponding settings.
[root@oracle1 ~] # xhost + / / users using root
[root@oracle1 ~] # su-oracle
[oracle@oracle1 ~] $export DISPLAY=10.10.18.27:0.0 / / set native IP
After setting up, continue to run the above steps.
Enter the graphical interface to install the software:
Install the software first
When the following dialog box pops up, log in with the root user to execute the script to be prompted
After the execution of the script, click OK to complete the software installation!
twelve。 Configure snooping
[oracle@oracle1 database] $netca
After that, the next step will be completed.
13. Create a database
Note: here the SID is the same as in the environment variable
Be careful that characters such as the @ character do not appear in the password
Pay attention to selecting character set
Run the next step until it is created.
4. Simple operation
1. Daily operation
1.1 Database opening and closing
Enable:
[root@oracle1 ~] # su-oracle
[oracle@oracle1 ~] $lsnrctl start / / start listening
[oracle@oracle1 ~] $sqlplus / as sysdba
SQL > startup; / / start the database
SQL > exit
Close:
[root@oracle1 ~] # su-oracle
[oracle@oracle1 ~] $lsnrctl stop / / start listening
[oracle@oracle1 ~] $sqlplus / as sysdba
SQL > shutdown immediate; / / start the database
SQL > exit
1.2 create users, empowerment, and tablespaces
[oracle@oracle1 ~] $sqlplus / as sysdba
SQL > create user INPUT identified by INPUT
SQL > grant dba to INPUT; / / weight on demand
SQL > create tablespace GTA_INPUT_DATA datafile'/ u01 size; / / the tablespace size and automatic extension can be set on demand.
SQL > alter user SYSDESIGN default tablespace GTA_SOFTSYS_DATA; / / set the default tablespace
In fact, the deployment of Oracle is not that difficult. If you have any questions in the deployment process, you can leave a message or follow the official Wechat account to communicate.
In addition, please help to follow my Wechat official account: database dry goods store. Books and learning materials will be given away from time to time.
These are all the contents of the article "how to deploy Oracle in linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.