Install oracle10g in Centos
Install Oracle10g silently in Centos6/7
Remote Installation of oracle10g, through online materials, and constantly explore the successful installation. First, experiment on the local virtual machine, snapshot recovery, after dozens of successful installation, and then install on the server, encountered various problems in the middle of the special records to share.
Install oracle in linux:
1. disable unnecessary services
2. install necessary dependency packages
3. select an appropriate oracle installation package based on the system version.
4. Add users and user groups and create installation folders
5. Configure the system environment (create and modify various files)
6. Install software and create a database
Check hardware requirements (Omitted) Disable Firewall
1. Disable firewall:
Systemctl stop firewalld. service # stop firewallsystemctl disable firewalld. service # disable firewall to start firewall-cmd -- state # view the default firewall Status (notrunning is displayed after the firewall is disabled, and running is displayed after the firewall is enabled)
2. iptables firewall (iptables has been installed and is configured below)
** Vi/etc/sysconfig/iptables ** # edit the firewall configuration file # sampleconfiguration for iptables service # you can edit thismanually or use system-config-firewall # please do not askus to add additional ports/services to this default configuration * filter: input accept [0: 0]: forward accept [0: 0]: output accept [0: 0]-a input-m state -- state RELATED, ESTABLISHED-j ACCEPT-A INPUT-p icmp-jACCEPT-a input-I lo-jACCEPT-A INPUT- P tcp-mstate -- state NEW-m tcp -- dport 22-j ACCEPT-A INPUT-p tcp-m state -- state NEW-m tcp -- dport 80-jACCEPT-a input-p tcp -m state -- state NEW-m tcp -- dport 8080-j ACCEPT-A INPUT-j REJECT -- reject-with icmp-host-prohibited-a forward-jREJECT -- reject-with icmp-host-prohibitedCOMMIT: ** wq! ** # Save and exit
Note: Port 80 and port 8080 are used as examples. * ** It is generally added to the top or bottom of the line "-a input-p tcp-m state -- state NEW-m tcp -- dport 22-j ACCEPT, do not add it to the last line; otherwise, it will not take effect after the firewall is restarted. Systemctlrestart iptables. service # restart the firewall to make the configuration take effect. systemctlenable iptables. service # Set the firewall to start upon startup.
3. Write a script to close the service (as needed)
** # Vi serverstop. sh ** chkconfig iptables off chkconfig ip6tables off chkconfig cups off chkconfig firstboot off chkconfig success off chkconfig postfix off sed-I's/SELINUX = enforcing/SELINUX = disabled/'/etc/selinux /config sed-I's/^ GSSAPIAuthentication yes $/GSSAPIAuthentication no/'/etc/ssh/sshd_config sed-I's/# UseDNS yes/UseDNS no/'/etc/ ssh/sshd_config -- execute the Close service script ** # sh serverstop. sh **
Prepare the Oracle10G File
1 ). copy the 10__database_linux32.zip file to the/oracle directory (which can be created without it); 2 ). decompress the package (right-click the package to decompress it, or use the password cd/oracle) [root @ lym oracle] # unzip 10201_database_linux32.zip
If the format is cpio.gz, there are several decompression methods.. # zcat XXXX.cpio.gz | cpio-idmv B. # gunzip XXXX.cpio.gz decompress XXXX. cpio file and then> # cpio-idvm & lt; XXXX. after cpio is decompressed, set the oracle account to operate on the chown-R oracle: directory where the oinstall Installation File is located
Add User Groups and users and Set passwords for oracle users
[root@lym Server]# groupadd oinstall[root@lym Server]# groupadd dba[root@lym Server]# groupadd oper[root@lym Server]# useradd -g oinstall -G dba oracle[root@lym Server]# passwd oracleChanging password for user oracle.New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully.
Create a folder for installing Oracle and set its permissions to Oracle users.
[root@lym Server]# mkdir -p /u01/app/oracle/product/10.2.0/db_1[root@lym Server]# chown -R oracle.oinstall /u01[root@lym Server]# chmod 775 /u01
OraInst. loc
Create an oraInst. loc file, the content of the file (two lines of code) is as follows: inventory_loc =/u01/app/oracle/oraInventoryinst_group = oinstall enter the following command in oraInst. set the appropriate owner, group, and permissions on the loc file: [root @ lym oracle] # chown oracle: oinstall oraInst. loc [root @ lym oracle] # chmod 664 oraInst. loc
Install common software and necessary software
The packages collected from the Internet may have repeated packages, which are not affected. During yum installation, the installation has been skipped.
Common Installation
yum -y install autoconf automake binutils-devel bison cpp dos2unix ftp gcc gcc-c++ lrzsz python-devel
Install required Oracle software:
yum -y install compat-db compat-gcc-34 compat-gcc-34-c++ compat-libstdc++-33 glibc-* glibc-*.i686 libXpm-*.i686 libXp.so.6 libXt.so.6 libXtst.so.6 libgcc_s.so.1 ksh libXp libaio-devel numactl numactl-devel unixODBC unixODBC-devel
Or
yum -y 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
The following problems are encountered:
Ctrl + c exit command
Rm-f/var/run/yum. pid
Configure the kernel and other parameters
Vi/etc/sysctl. conf1 ). -- Add the following 11 lines of code (and change the original # kernel. shmmax and kernel. the two lines of shmall are blocked by parameters) kernel. shmall = 2097152kernel. shmmax = 2147483648kernel. shmmni = 4096 # semaphores: semmsl, semmns, semopm, semmnikernel. sem = 250 32000 100 FS. file-max = 65536net. ipv4.ip _ local_port_range = 1024 65000net. core. rmem_default = 262144net. core. rmem_max = 262144net. core. wmem_default = 262144net. core. wmem_max = 2621442 ). run the following command to make the preceding parameter modification take effect [root @ lym Server] #/sbin/sysctl-p3 ). vi/etc/security/limits. conf -- Add the following four lines of code: oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 4 ). vi/etc/pam. d/login -- add it to the last line. The following code is session required/lib64/security/pam_limits.so session required pam_limits.so5 ). vi/etc/selinux/config -- (disable SELINUX and restore it to the original value after installation) set SELINUX to SELINUX = disabled
### Disguised operating system version
Vi/etc/redhat-release -- (you can save a copy of this file in a location to restore the file after the installation is complete) -- replace content in this file (Red Hat Enterprise Linux Server release 5 (Tikanga) with the following code: vi/etc/centos-releaseredhat-4
Oracle 10g does not support Chinese characters by default
Change LANG in/etc/sysconfig/i18n to en during installation to export LANG = en_US.
Set Oracle environment variables (which can be changed as needed)
[Root @ lym Server] # vi/home/oracle /. bash_profile -- Add the following comments to the original PATH and export # Oracle SettingsTMP =/tmp; export TMPTMPDIR = $ TMP; export TMPDIRORACLE_BASE =/u01/app/oracle; export ORACLE_BASEORACLE_HOME = $ ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOMEORACLE_SID = TSH1; export ORACLE_SIDORACLE_TERM = xterm; export ORACLE_TERMPATH =/usr/sbin: $ PATH; export PATHPATH = $ ORACLE_HOME/bin: $ PATH; export PATHLD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH = $ ORACLE_HOME/jre: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib; export classpatvf [$ USER = "oracle"]; thenif [$ SHELL = "/bin/ksh"]; thenulimit-p 16384 ulimit-n 65536 elseulimit-u 16384-n 65536 fifi
Log out of the root user, log on to the oracle user, and create a file named iseise01.rsp in the/home/oracle directory,
The specific content is as follows (see enterprise under the/oracle/database/response directory. rsp file, which contains three files: enterprise. rsp (Enterprise Edition Silent Installation File), standard. rsp (Standard Silent Installation File) and custom. rsp (customer version Silent Installation File), and three other silent installation files ).
RESPONSEFILE_VERSION=2.2.1.0.0FROM_LOCATION="../stage/products.xml"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=falseSHOW_WELCOME_PAGE=falseSHOW_COMPONENT_LOCATIONS_PAGE=falseSHOW_CUSTOM_TREE_PAGE=falseSHOW_SUMMARY_PAGE=falseSHOW_INSTALL_PROGRESS_PAGE=falseSHOW_REQUIRED_CONFIG_TOOL_PAGE=falseSHOW_CONFIG_TOOL_PAGE=falseSHOW_RELEASE_NOTES=falseSHOW_ROOTSH_CONFIRMATION=falseSHOW_END_SESSION_PAGE=falseSHOW_EXIT_CONFIRMATION=falseNEXT_SESSION=falseNEXT_SESSION_ON_FAIL=falseSHOW_DEINSTALL_CONFIRMATION=falseSHOW_DEINSTALL_PROGRESS=falseACCEPT_LICENSE_AGREEMENT=trueCOMPONENT_LANGUAGES={"en"}CLUSTER_NODES=INSTALL_TYPE="EE"s_nameForDBAGrp=dbas_nameForOPERGrp=dbab_oneClick=falseSHOW_DATABASE_CONFIGURATION_PAGE=falseb_createStarterDB=false
Start Installation
[oracle@lym ~]$ cd /oracle/database[oracle@lym database]$ ./runInstaller -silent -responseFile /home/oracle/enterprise01.rsp
View logs after installation
If you only have the following questions, ignore them.
Run the scripts required for the environment after installation as the root user (never mind: Run these two scripts as the root user, and press enter to execute the last script)
[Root @ lym ~] # Sh/u01/app/oracle/oraInventory/orainstRoot. sh (not the first installation, but none) [root @ lym ~] # Sh/u01/app/oracle/product/10.2.0/db_1/root. sh
Test whether SQL plus can be entered --
Take a rest first, and then complete the work ....