安装weblogic
1、检查是否关闭防火墙
1 [root@gaosheng ~]# service iptables status 2 Firewall is stopped.
如果防火墙没有关闭,最好关闭;生产环境下,视具体情况而定.
2、上传weblogic安装包wls1036_generic.jar
此步骤略
3、安装JDK
1 [root@gaosheng oracle]# rpm -qa | grepjdk 2 [root@gaosheng oracle]# rpm -qa | grepgcj 3 libgcj-4.1.2-48.el5 4 libgcj-devel-4.1.2-48.el5 5 libgcj-4.1.2-48.el5 6 java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
1 [root@gaosheng oracle]# yum -y remove java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 2 Loaded plugins: rhnplugin, security 3 This system is not registered with RHN. 4 RHN support will be disabled. 5 Setting up Remove Process 6 Resolving Dependencies 7 --> Running transaction check 8 ---> Package java-1.4.2-gcj-compat.x86_64 0:1.4.2.0-40jpp.115 set to be erased 9 --> Processing Dependency: java-gcj-compat>= 1.0.64 for package: gjdoc 10 --> Processing Dependency: java-gcj-compat>= 1.0.64 for package: gjdoc 11 --> Processing Dependency: java-gcj-compat for package: antlr 12 --> Processing Dependency: java-gcj-compat for package: antlr 13 --> Running transaction check 14 ---> Package antlr.x86_64 0:2.7.6-4jpp.2 set to be erased 15 ---> Package gjdoc.x86_64 0:0.7.7-12.el5 set to be erased 16 --> Finished Dependency Resolution 17 18 Dependencies Resolved 19 20 ====================================================================================================================================== 21 Package Arch Version Repository Size 22 ====================================================================================================================================== 23 Removing: 24 java-1.4.2-gcj-compat x86_64 1.4.2.0-40jpp.115 installed 441 25 Removing for dependencies: 26 antlr x86_64 2.7.6-4jpp.2 installed 3.2 M 27 gjdoc x86_64 0.7.7-12.el5 installed 2.2 M 28 29 Transaction Summary 30 ====================================================================================================================================== 31 Remove 3 Package(s) 32 Reinstall 0 Package(s) 33 Downgrade 0 Package(s) 34 35 Downloading Packages: 36 Running rpm_check_debug 37 Running Transaction Test 38 Finished Transaction Test 39 Transaction Test Succeeded 40 Running Transaction 41 Erasing : java-1.4.2-gcj-compat 1/3 42 Erasing : antlr 2/3 43 Erasing : gjdoc 3/3 44 45 Removed: 46 java-1.4.2-gcj-compat.x86_64 0:1.4.2.0-40jpp.115 47 48 Dependency Removed: 49 antlr.x86_64 0:2.7.6-4jpp.2 gjdoc.x86_64 0:0.7.7-12.el5 50 51 Complete!
--手工创建JDK安装目录 [root@gaosheng oracle]# mkdir -p /opt/jdk [root@gaosheng oracle]# ls -l /opt/ total 8 drwxr-xr-x 2 root root 4096 Feb 26 13:46 jdk drwxr-xr-x 3 root root 4096 Feb 25 08:41 ORCLfmap --将JDK安装文件拷贝至/opt/jdk目录 此步骤略 --授予JDK安装文件可执行权限 [root@gaosheng oracle]# chmod +x jdk-6u38-ea-bin-b04-linux-amd64-31_oct_2012-rpm.bin [root@gaosheng oracle]# ll total 1111804 drwxr-xr-x 2 root root 4096 Feb 24 17:55 install_scripts -rwxr-xr-x 1 root root 68852176 Feb 26 09:34 jdk-6u38-ea-bin-b04-linux-amd64-31_oct_2012-rpm.bin -rw-r--r-- 1 root root 1068506707 Jul 19 2013 wls1036_generic.jar --执行JDK安装操作 [root@gaoshengjdk]# ./jdk-6u38-ea-bin-b04-linux-amd64-31_oct_2012-rpm.bin Unpacking... Checksumming... Extracting... UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu). inflating: jdk-6u38-ea-linux-amd64.rpm inflating: sun-javadb-common-10.6.2-1.1.i386.rpm inflating: sun-javadb-core-10.6.2-1.1.i386.rpm inflating: sun-javadb-client-10.6.2-1.1.i386.rpm inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm Preparing... ########################################### [100%] 1:jdk ########################################### [100%] Unpacking JAR files... rt.jar... jsse.jar... charsets.jar... tools.jar... localedata.jar... plugin.jar... javaws.jar... deploy.jar... Installing JavaDB Preparing... ########################################### [100%] 1:sun-javadb-common ########################################### [ 17%] 2:sun-javadb-core ########################################### [ 33%] 3:sun-javadb-client ########################################### [ 50%] 4:sun-javadb-demo ########################################### [ 67%] 5:sun-javadb-docs ########################################### [ 83%] 6:sun-javadb-javadoc ########################################### [100%] Java(TM) SE Development Kit 6 successfully installed. Product Registration is FREE and includes many benefits: * Notification of new versions, patches, and updates * Special offers on Oracle products, services and training * Access to early releases and documentation Product and system data will be collected. If your configuration supports a browser, the JDK Product Registration form will be presented. If you do not register, none of this information will be saved. You may also register your JDK later by opening the register.html file (located in the JDK installation directory) in a browser. For more information on what data Registration collects and how it is managed and used, see: http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html Press Enter to continue..... 3.3、开始安装JDK
--编辑/etc/profile文件,在export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC这一句之前添加如下语句. export JAVA_HOME=/usr/java/jdk1.6.0_38/ export JAVA_BIN=/usr/java/jdk1.6.0_38/bin/ export PATH=$PATH:$JAVA_HOME/bin export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export JAVA_HOME JAVA_BIN CLASSPATH
--执行java命令 [root@gaosheng ~]# java Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -server to select the "server" VM The default VM is server. -cp<class search path of directories and zip/jar files> -classpath<class search path of directories and zip/jar files> A : separated list of directories, JAR archives, and ZIP archives to search for class files. -D<name>=<value> set a system property -verbose[:class|gc|jni] enable verbose output -version print product version and exit -version:<value> require the specified version to run -showversion print product version and continue -jre-restrict-search | -jre-no-restrict-search include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:<packagename>...|:<classname>] -enableassertions[:<packagename>...|:<classname>] enable assertions -da[:<packagename>...|:<classname>] -disableassertions[:<packagename>...|:<classname>] disable assertions -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions -agentlib:<libname>[=<options>] load native agent library <libname>, e.g. -agentlib:hprof see also, -agentlib:jdwp=help and -agentlib:hprof=help -agentpath:<pathname>[=<options>] load native agent library by full pathname -javaagent:<jarpath>[=<options>] load Java programming language agent, see java.lang.instrument -splash:<imagepath> show splash screen with specified image --执行javac命令 [root@gaosheng ~]# javac Usage: javac<options><source files> where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath<path> Specify where to find user class files and annotation processors -cp<path> Specify where to find user class files and annotation processors -sourcepath<path> Specify where to find input source files -bootclasspath<path> Override location of bootstrap class files -extdirs<dirs> Override location of installed extensions -endorseddirs<dirs> Override location of endorsed standards path -proc:{none,only} Control whether annotation processing and/or compilation is done. -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process -processorpath<path> Specify where to find annotation processors -d <directory> Specify where to place generated class files -s <directory> Specify where to place generated source files -implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files -encoding <encoding> Specify character encoding used by source files -source <release> Provide source compatibility with specified release -target <release> Generate class files for specific VM version -version Version information -help Print a synopsis of standard options -Akey[=value] Options to pass to annotation processors -X Print a synopsis of nonstandard options -J<flag> Pass <flag> directly to the runtime system --执行java -version命令 [root@gaosheng java]# java -version java version "1.6.0_38-ea" Java(TM) SE Runtime Environment (build 1.6.0_38-ea-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
4、安装weblogic
#创建weblogic用户所属组 [root@gaosheng ~]# groupaddweblogic #创建用户weblogic,并设置其主组为weblogic [root@gaosheng ~]# useradd -g weblogicweblogic #设置weblogic用户的登陆密码arcerzhang0759 [root@gaosheng ~]# passwdweblogic Changing password for user weblogic. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. #创建weblogic的默认安装目录 [root@gaosheng ~]# mkdir -p /usr/local/webogic/ #修改weblogic的默认安装目录所有者、所属组 [root@gaosheng ~]# chown -Rfweblogic:weblogic /usr/local/webogic/
1 #创建weblogic用户所属组 2 [root@gaosheng ~]# groupaddweblogic 3 #创建用户weblogic,并设置其主组为weblogic 4 [root@gaosheng ~]# useradd -g weblogicweblogic 5 #设置weblogic用户的登陆密码arcerzhang0759 6 [root@gaosheng ~]# passwdweblogic 7 Changing password for user weblogic. 8 New UNIX password: 9 Retype new UNIX password: 10 passwd: all authentication tokens updated successfully. 11 #创建weblogic的默认安装目录 12 [root@gaosheng ~]# mkdir -p /usr/local/webogic/ 13 #修改weblogic的默认安装目录所有者、所属组 14 [root@gaosheng ~]# chown -Rfweblogic:weblogic /usr/local/webogic/