2015年2月26日 星期四
[MEGA LOG]Jenkins安裝
下載Jenkins
下載jenkins.war完成 放到/usr/share/tomcat/webapps
server.xml 在Connector需新增URIEncoding="UTF-8"
catalina.sh
CATALINA_OPTS 增加-DJENKINS_HOME=/usr/share/tomcat/webapps/jenkins/
CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS" -DJENKINS_HOME=/usr/share/tomcat/webapps/jenkins/
2015年2月24日 星期二
[MEGA LOG]Weblogic Silent mode安裝
安裝java server 版本
server-jre-7u76-linux-x64.gz
下載完成,解壓縮到
/usr/java/jdk1.7.0_76設定方式參考reference
vi + /etc/profile加入
JAVA_HOME=/usr/java/jdk1.7.0_76 JRE_HOME=/usr/java/jdk1.7.0_76/jre PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib export JAVA_HOME JRE_HOME PATH CLASSPATH執行後生效
[admin@msigap1]source /etc/profile [admin@msigap1]echo $PATH
[admin@msigap1 etc]$ echo $PATH /usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/java/jdk1.7.0_76/bin:/usr/java/jdk1.7.0_76/jre/bin:/home/admin/.local/bin:/home/admin/bin***開始安裝Weblogic***
[admin@msigap1 ~]$ java -jar -D64 fmw_12.1.3.0.0_wls.jar Launcher log file is /tmp/OraInstall2015-02-24_11-01-50AM/launcher2015-02-24_11-01-50AM.log. Extracting files.............. Starting Oracle Universal Installer Checking if CPU speed is above 300 MHz. Actual 1999.992 MHz Passed Checking monitor: must be configured to display at least 256 colors. DISPLAY environment variable not set. Failed <<<< Checking swap space: must be greater than 512 MB. Actual 4194296 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required) Checking temp space: must be greater than 300 MB. Actual 12547 MB Passed Some system prerequisite checks failed. You must fulfill these requirements before continuing with the installation. Continue? (yes [y] / no [n]) [n] y You have confirmed that the product can be installed on this platform. Continuing with the installation. >>> Ignoring failure(s) of required prerequisite checks. Continuing... Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2015-02-24_11-01-50AM DISPLAY is not set. Please set the DISPLAY environment variable and try again. Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable: - For csh: %% setenv DISPLAY 192.168.1.128:0.0 - For sh, ksh and bash: $ DISPLAY=192.168.1.128:0.0; export DISPLAY Use the following command to see what shell is being used: echo $SHELL Use the following command to view the current DISPLAY environment variable setting: echo $DISPLAY - Make sure that client users are authorized to connect to the X Server. To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command: %% xhost + To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as 'xclock': %%If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance. Typical path for xclock: /usr/X11R6/bin/xclock java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207) at java.awt.Window. (Window.java:535) at java.awt.Frame. (Frame.java:420) at java.awt.Frame. (Frame.java:385) at javax.swing.SwingUtilities$SharedOwnerFrame. (SwingUtilities.java:1757) at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1832) at javax.swing.JDialog. (JDialog.java:271) at javax.swing.JDialog. (JDialog.java:205) at javax.swing.JDialog. (JDialog.java:153) at oracle.as.install.engine.modules.presentation.ui.common.dialogs.SpecifyInventoryDirectoryDialog. (SpecifyInventoryDirectoryDialog.java:235) at oracle.as.install.engine.modules.presentation.ui.common.dialogs.SpecifyInventoryDirectoryDialog.showDialog(SpecifyInventoryDirectoryDialog.java:761) at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:616) Logs are located here: /tmp/OraInstall2015-02-24_11-01-50AM.
[admin@msigap1 ~]$ su - root Password: Last login: Tue Feb 3 09:54:14 CST 2015 on pts/0 [root@msigap1 ~]# groupadd -g 1000 oinstall groupadd: group 'oinstall' already exists [root@msigap1 ~]# useradd -u 1100 -g oinstall oracle useradd: user 'oracle' already exists [root@msigap1 ~]# passwd oracle Changing password for user oracle. New password: BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word Retype new password: passwd: all authentication tokens updated successfully. [root@msigap1 ~]# mkdir -p /u01/app/oracle/middleware [root@msigap1 ~]# chown -R oracle:oinstall /u01 [root@msigap1 ~]# chmod -R 775 /u01/ [root@msigap1 ~]#vi /home/oracle/.bash_profile # User specific environment and startup programs MW_HOME=/u01/app/oracle/middleware; export MW_HOME WLS_HOME=$MW_HOME/12.1.3.0/wlserver; export WLS_HOME JAVA_HOME=/usr/java/jdk1.7.0_76/; export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH; export PATH # JDK 7 Requirement USER_MEM_ARGS="-Xms32m -Xmx200m -XX:MaxPermSize=350m" PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH
[oracle@msigap1 ~]$ java -jar -D64 fmw_12.1.3.0.0_wls.jar -silent -responseFile /home/oracle/response/wls.rsp -invPtrLoc /home/oracle/oraInst.loc Launcher log file is /tmp/OraInstall2015-02-24_11-59-04AM/launcher2015-02-24_11-59-04AM.log. Extracting files......... Starting Oracle Universal Installer Checking if CPU speed is above 300 MHz. Actual 1999.992 MHz Passed Checking swap space: must be greater than 512 MB. Actual 4194296 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required) Checking temp space: must be greater than 300 MB. Actual 7042 MB Passed Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2015-02-24_11-59-04AM Log: /tmp/OraInstall2015-02-24_11-59-04AM/install2015-02-24_11-59-04AM.log Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. Reading response file.. Starting check : CertifiedVersions Expected result: One of enterprise-4,enterprise-5,enterprise-6,redhat-6,redhat-4,redhat-5,SuSE-11 Actual Result: (Unknown Check complete. The overall result of this check is: Failed <<<< Problem: This Oracle software is not certified on the current operating system. Recommendation: Make sure you are installing the software on the correct platform. Warning: Check:CertifiedVersions failed. Starting check : CheckJDKVersion Expected result: 1.7.0_15 Actual Result: 1.7.0_76 Check complete. The overall result of this check is: Passed CheckJDKVersion Check: Success. Validations are enabled for this session. Verifying data...... [ERROR] Data Insufficient to start Install. [ERROR] Rule_VDiskSpace_Error [ERROR] Rule_OHFS_Error [ERROR] Provide a value for variable ORACLE HOME PATH [ERROR] Rule_GetOracleHome_Error [ERROR] Rule_VDiskSpace_Error [ERROR] Select one and only one Install Type. Any one of the variables SOFTWARE ONLY TYPE,BASIC TYPE or ADVANCED TYPE in Section GENERIC must be set to true. [ERROR] Rule_CalculateFreeSpace_Error. Aborting Install Logs are located here: /tmp/OraInstall2015-02-24_11-59-04AM.https://www.centos.org/forums/viewtopic.php?t=41411
[oracle@msigap1 ~]$ java -jar fmw_12.1.3.0.0_wls.jar -silent -responseFile /home/oracle/response/wls.rsp -invPtrLoc /home/oracle/oraInst.loc -ignoreSysPrereqs Launcher log file is /tmp/OraInstall2015-02-24_01-53-40PM/launcher2015-02-24_01-53-40PM.log. Extracting files......... Starting Oracle Universal Installer Checking if CPU speed is above 300 MHz. Actual 1999.992 MHz Passed Checking swap space: must be greater than 512 MB. Actual 4194296 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required) Checking temp space: must be greater than 300 MB. Actual 3356 MB Passed Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2015-02-24_01-53-40PM Log: /tmp/OraInstall2015-02-24_01-53-40PM/install2015-02-24_01-53-40PM.log Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. Reading response file.. Validations are enabled for this session. Verifying data...... [ERROR] Data Insufficient to start Install. [ERROR] Rule_VDiskSpace_Error [ERROR] Rule_OHFS_Error [ERROR] Provide a value for variable ORACLE HOME PATH [ERROR] Rule_GetOracleHome_Error [ERROR] Rule_VDiskSpace_Error [ERROR] Select one and only one Install Type. Any one of the variables SOFTWARE ONLY TYPE,BASIC TYPE or ADVANCED TYPE in Section GENERIC must be set to true. [ERROR] Rule_CalculateFreeSpace_Error. Aborting Install Logs are located here: /tmp/OraInstall2015-02-24_01-53-40PM.http://www.cemdogan.com/2014/10/07/weblogic-12-1-3-silent-mode-installation/ http://middlewaresnippets.blogspot.tw/2013/08/weblogic-12c-starting-and-stopping.html 經過以上的錯誤,整理一下 vi /home/oracle/oraInst.loc
inventory_loc=/home/oracle/oraInventory/ inst_group=oinstall[oracle@msigap1 response]$ vi wls.rsp
[ENGINE] #DO NOT CHANGE THIS. Response File Version=1.0.0.0.0 [GENERIC] #The oracle home location. This can be an existing Oracle Home or a new Oracle Home ORACLE_HOME=/u01/app/oracle/middleware/12.1.3.0 #Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples. INSTALL_TYPE=WebLogic Server #Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name. MYORACLESUPPORT_USERNAME= #Provide the My Oracle Support Password MYORACLESUPPORT_PASSWORD=#Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration DECLINE_SECURITY_UPDATES=true #Set this to true if My Oracle Support Password is specified SECURITY_UPDATES_VIA_MYORACLESUPPORT=false #Provide the Proxy Host PROXY_HOST= #Provide the Proxy Port PROXY_PORT= #Provide the Proxy Username PROXY_USER= #Provide the Proxy Password PROXY_PWD= #Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port] COLLECTOR_SUPPORTHUB_URL=
# User specific environment and startup programs MW_HOME=/u01/app/oracle/middleware/12.1.3.0; export MW_HOME WLS_HOME=$MW_HOME/wlserver; export WLS_HOME export WL_HOME=$MW_HOME/wlserver/ JAVA_HOME=/usr/java/jdk1.7.0_76/; export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH; export PATH # JDK 7 Requirement USER_MEM_ARGS="-Xms32m -Xmx200m -XX:MaxPermSize=350m" export CONFIG_JVM_ARGS="-Djava.security.egd=file:/dev/./urandom" PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH終於成功
[oracle@msigap1 ~]$ java -jar -d64 fmw_12.1.3.0.0_wls.jar -silent -responseFile /home/oracle/response/wls.rsp -invPtrLoc /home/oracle/oraInst.loc -ignoreSysPrereqs Launcher log file is /tmp/OraInstall2015-02-24_02-55-10PM/launcher2015-02-24_02-55-10PM.log. Extracting files......... Starting Oracle Universal Installer Checking if CPU speed is above 300 MHz. Actual 1999.992 MHz Passed Checking swap space: must be greater than 512 MB. Actual 4194296 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required) Checking temp space: must be greater than 300 MB. Actual 1489 MB Passed Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2015-02-24_02-55-10PM Log: /tmp/OraInstall2015-02-24_02-55-10PM/install2015-02-24_02-55-10PM.log Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. Reading response file.. Validations are enabled for this session. Verifying data...... Copying Files... You can find the log of this install session at: /tmp/OraInstall2015-02-24_02-55-10PM/install2015-02-24_02-55-10PM.log -----------20%----------40%----------60%----------80%--------100% The installation of Oracle Fusion Middleware 12c WebLogic Server and Coherence 12.1.3.0.0 completed successfully. Logs successfully copied to /home/oracle/oraInventory/logs.create domain
[oracle@msigap1 bin]$ pwd /u01/app/oracle/middleware/12.1.3.0/wlserver/common/bin [oracle@msigap1 bin] ./commEnv.sh [oracle@msigap1 bin]$ ./wlst.sh Initializing WebLogic Scripting Tool (WLST) ... Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away. Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline> readTemplate('/u01/app/oracle/middleware/12.1.3.0/wlserver/common/templates/wls/wls.jar') wls:/offline/base_domain>cd('Servers/AdminServer') wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','192.168.1.22') wls:/offline/base_domain/Server/AdminServer>set('ListenPort', 7001) wls:/offline/base_domain/Server/AdminServer>create('AdminServer','SSL') Proxy for AdminServer: Name=AdminServer, Type=SSL wls:/offline/base_domain/Server/AdminServer>cd('SSL/AdminServer') wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('Enabled', 'True') wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('ListenPort', 7002) wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>cd('/') wls:/offline/base_domain>cd('Security/base_domain/User/weblogic') wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('weblogic1') wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain', 'true') wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/u01/app/oracle/middleware/12.1.3.0/user_projects/domains/CKI_DEV_DOMAIN') wls:/offline/CKI_DEV_DOMAIN/Security/CKI_DEV_DOMAIN/User/weblogic>closeTemplate() wls:/offline>exit() Exiting WebLogic Scripting Tool. [oracle@msigap1 bin]$
cd /u01/app/oracle/middleware/12.1.3.0/user_projects/domains/CKI_DEV_DOMAIN/bin ./startWebLogic.sh & ./startNodeManager.sh &http://192.168.1.22:7001/console/
su - root iptables -I INPUT 1 -i eth0 -p tcp --dport 7001 -j ACCEPT iptables -I INPUT 1 -i eth0 -p tcp --dport 7002 -j ACCEPT iptables -I INPUT 1 -i eth0 -p tcp --dport 5556 -j ACCEPT
2015年2月16日 星期一
[MEGA LOG]Tomcat 安裝與設定
官網下載
apache-tomcat-5.5.26.zip
Step 1: Install JDK 1.6 reference download
Step 1: Install JDK 1.6 reference download
mkdir /usr/java cd /usr/java cd /home/admin/ download jdk-6u45-linux-x64-rpm.bin chmod a+x jdk-6u45-linux-x64-rpm.bin ./jdk-6u45-linux-x64-rpm.bin cp ~/jdk-6u45-linux-amd64.rpm ./usr/lib/java-1.6.0 chmod a+x jdk-6u45-linux-amd64.rpm sudo rpm -ivh jdk-6u45-linux-amd64.rpm設定給使用者設定環境變數
vi ~/.bash_profile設定給每個使用者設定環境變數
vi /etc/profile內容
JAVA_HOME=/usr/java/jdk1.6.0_45 export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH
echo $JAVA_HOMEStep 2:Download and Unpack Tomcat Download Tomcat 5.5.26
cd /usr/share tar -xzf apache-tomcat-5.5.26.tar.gz設定CATALINA_HOME
vi /etc/profile.d/script.shStep 3: Configure Tomcat to Run as a Service. 在 /etc/init.d新增tomcat檔案
cd /etc/init.d vi tomcat內容
#!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 234 20 80 JAVA_HOME=/usr/java/jdk1.6.0_45 export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH CATALINA_HOME=/usr/share/tomcat case $1 in start) sh $CATALINA_HOME/bin/startup.sh ;; stop) sh $CATALINA_HOME/bin/shutdown.sh ;; restart) sh $CATALINA_HOME/bin/shutdown.sh sh $CATALINA_HOME/bin/startup.sh ;; esac exit 0修改權限
chmod 755 /etc/init.d/tomcat檢查
chkconfig --add tomcat chkconfig --level 234 tomcat on chkconfig --list tomcat啟動/停止/重啟
service tomcat start service tomcat stop service tomcat restartreference:參考
[MEGA LOG]ORACLE Database改成開機啟動
修改/etc/rc.d/rc.local 檔案內容
su - oracle -c "lsnrctl start" sleep 5 su - oracle -c "echo startup |sqlplus \"/as sysdba\" " su - oracle -c "lsnrctl set log_status off"或 修改/etc/rc.d/rc.local 檔案內容
/home/oracle/startdb.sh << /home/oracle/startdb.log 2 <&1/home/oracle/startdb.sh內容
#!/bin/bash echo"######starting oracle##${date +%F\ %H:%M:%S}###" su - oracle <<eom source /home/oracle/.bash_profile lsnrctl start sqlplus /nolog <<eof conn / as sysdba startup exit eof exit eof echo"#########################END####################"
訂閱:
文章 (Atom)