First, install the JDK1. See if the Linux-brought JDK is installed
Java–version
If OpenJDK appears, it is best to uninstall OPENJDK first, installing Sun's jdk.
2. View JDK Information
Rpm-qa|grep Java
3. Uninstall OPENJDK and do the following:
Rpm-e--nodeps tzdata-java-2012c-1.el6.noarchrpm-e--nodeps java-1.7.0-openjdk-1.7.0.45-1.45.1.11.1.el6.x86_64
4. Create a new Java installation directory
Mkdir/usr/java
5. Unzip and install the previously downloaded JDK
TAR-ZXVF jdk-7u71-linux-i586.tar.gz
6. Adding Java environment variables to the profile
Vi/etc/profileexport Java_home=/usr/java/jdk1.7.0_71export classpath=.:%java_home%/lib/dt.jar:%java_home%/lib/ Tools.jarexport path= $PATH: $JAVA _home/bin
7. Immediate entry into force of the document
Source/etc/profile //or reboot
8. Check if the installation is successful
Java-version
Second, install the TOMCAT1. Upload the downloaded tomcat.tar.gz to/var/local below (the path can be selected by yourself), then unzip
TAR-ZXVF apache-tomcat-7.0.57.tar.gz
2. Move the uploaded tomcat to a directory and change the name
MV APACHE-TOMCAT-7.0.57/MV apache-tomcat-7.0.57 TOMCAT7
3. Start Tomcat
./startup.sh
Direct access to the Tomcat default address after startup
4. Turn off the firewall when you cannot access it
Service Iptables Stop
5. Set up boot from boot
First method: Increase the Tomcat and JAVA_HOME environment variables under/etc/rs.local
Vi/etc/rs.localjava_home=/usr/java/jdk1.7.0_71export java_home/tomcat7/bin/startup.sh
Here is a bit to explain, rc.local before/etc/profile execution, so will not get the Java environment variable, so before startup.sh to add code java_home
III. Installation of Oracle
Official Installation Guide: https://docs.oracle.com/cd/E11882_01/install.112/e24323/toc.htm#i1011296
Reference article: http://blog.csdn.net/attagain/article/details/38331433
1, hardware requirements (this is not the focus, crossing network) 2, software Requirements 2.1 view dependent packages
Rpm-q binutils compat-libcap1 compat-libstdc++-33-3.2.3 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-deve L Libaio Libaio-devel make Sysstat
In addition to the packages mentioned on the official website, the following packages are also indicated when installing:
unixODBC-2.2.11
unixodbc-devel-2.2.11
elfutils-libelf-devel-0.97
pdksh-5.2.14
2.2 Install the required packages in Yum mode
Yum-y install binutils compat-libcap1 compat-libstdc++-33-3.2.3 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstd C++-devel Libaio Libaio-devel Make Sysstat
2.3 Installing LIBXP
This library, this must be installed, otherwise the installation of Oracle will appear Java Exception.
Yum-y Install LIBXP
3. Environment Configuration 3.1 Turn off firewall, disable SELinux
Chkconfig iptables off
# vi/etc/selinux/configselinux=disabled
and then reboot.
3.2 Modifying machine names (typically default equals)
Here/etc/sysconfig/network in the hostname to be consistent with the/etc/hosts, if the same will not be modified
3.3 Setting up Users and Groups
The user names and groups created here will help you choose when you install Oracle. Otherwise, no users and groups are installed.
Set up a group Oinstall
Groupadd Oinstall
Set up a group DBA
Groupadd dba
Add user Oracle and add it to Oinstall and DBA groups
USERADD-G oinstall-g dba Oracle
Test if Oracle account is established
ID Oracle
Create a new password for Oracle
passwd Oracle
3.4 Creating an Oracle installation folder and a data storage folder
Mkdir-p/opt/oracle/mkdir-p/opt/oracle/orainventorychown-r oracle:oinstall/opt/oraclechmod-r 775/opt/oracle
3.5 Configuring System Kernel Parameters
Vi/etc/sysctl.conf
Add the following parameters:
FS.AIO-MAX-NR = 1048576fs.file-max = 6815744kernel.shmmni = 4096kernel.sem = 32000 E = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576
Enable the changes you just made
# sysctl-p
3.6 Modifying the number of processes and the maximum number of sessions
Edit/etc/security/limits.conf
Vi/etc/security/limits.conforacle Soft nproc 2047oracle hard nproc 16384oracle Soft nofile 1024oracle hard nofile 65536
3.7 Set the association information, execute the following command, modify the associated file/etc/pam.d/login
Vi/etc/pam.d/login
Join:
Session Required/lib/security/pam_limits.sosession Required Pam_limits.so
3.8 Modify the system boot environment parameters, execute the following command, modify the system boot environment parameter file
Vi/etc/profile
Add after Pathmunge:
if [$USER = "Oracle"]; Then if [$SHELL = "/bin/ksh"], then ulimit-p 16384 ulimit-n 65536 else ulimit-u 16384-n 65536
fifi
3.9 Switching users, configuring Oracle User Environment variables
Vi. bash_profileoracle_base=/opt/oracleoracle_home= $ORACLE _base/product/11.2.0/dbhome_1/bin/ (Different versions of the ORACLE installation directory may not be the same, here is 11.2.0) Oracle_sid=sims (db instance, own definition) ld_library_path= $ORACLE _home/libpath= $PATH: $ORACLE _ Home/bin: $HOME/bin export oracle_base oracle_home oracle_sid ld_library_path PATH
The official website recommends not to set up the installation folder that is $oracle_home, but I suggest that it is established here, because not set up good words, the back of the DBCA, NETCA and other commands can not find
Make settings effective
Source/home/oracle/.bash_profile
3.10 Installation
Put the downloaded Oracle file under/opt/oracle
su-oracle$ cd/opt/oracle$ Unzip linux.11gr2_database_1of2.zip$ unzip Linux.11gr2_database_2of2.zip
3.11 Fix Chinese garbled before installation
Echo $LANG If it's not English, set it up as follows
Export Lang=en_us
3.12 Switch to graphical interface installation
If remote, you need to install remote software, otherwise you will not be able to enter the graphical installation interface;
If the operation is directly on the server, it is not necessary, so that when installing CentOS, you need to choose Desktop installation
cd/opt/oracle/databse$./runinstaller
The graphical interface installation process can refer to: http://www.21ops.com/linux/7296.html/comment-page-1
Note the points:
The first step of the mailbox can not be written; installation mode I selected the single database installation, only the software body installed, no database and monitoring, so installation needs to create a database and configuration monitoring.
Here to pay attention, I see a lot of information on the Internet is to create a database and then configure the monitoring, I do not know how this is done, but I in the actual operation of the time,
Create a database first is impossible to create, be sure to configure monitoring first!
4 after the installation is complete, Oracle User Login 4.1 configures the listener:
Step by step, next.
4.2 Create a database:
Dbca
Note the character set that piece remember to choose Chinese
(if Oracle_home is not specified, you will not be able to use these commands, so you can first look at your current oracle_home, echo $ORACLE _home)
4.3 Testing Whether the installation was successful
To view the listening status:
Lsnrctl status
Database connection:
Sqlplus/as sysdbaconn System/[email protected] (here I changed all the user's passwords to 123456 when I created the database)
in this case, the Oracle one-CentOS6 database was successfully installed.
Four, CentOS6 start ORACLE1. Start the database manually
Log in with an Oracle user
$lsnrctl Start$sqlplus/as Sysdbasql>startup
Then we can manipulate the database.
2. Start the database automatically 2.1 root user login
Modify Oratab
#vi/etc/oratabsims:/opt/oracle/product/11.2.0/dbhome_1:y (n to Y) esc:wq!
Save
2.2 Modifying Dbstart,dbshut
#vi/opt/oracle/11.2.0/bin/dbstartoracle_home_listner= $ORACLE _home (formerly $ $) esc:wq!
#vi/opt/oracle/11.2.0/bin/dbshutoracle_home_listner= $ORACLE _home (formerly $ $) esc:wq!
2.3 Adding content to rc.local
#vi/etc/rc.d/rc.local
Add the following to the file
Su oracle-lc "/opt/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start" su oracle-lc "/opt/oracle/product/11.2.0/dbhome _1/bin/dbstart "esc:wq!
Done!
Centos6.5 Building a Java development environment