開機啓動安裝
html
固然此處能夠用WMware Workstation鏈接虛擬機進行安裝
java
Next
linux
Next apex18.oracle11g
c++
Next 192.168.75.1 255.255.255.0 192.168.75.254 DNS:202.194.40.1
web
-Next
sql
-Next root密碼:apex18.1
數據庫
-Next
express
Next
apache
Next
vim
Next
安裝OracleLinux成功
service network restart
[root@apex18 ~]# cd /
[root@apex18 /]# ls
[root@apex18 /]# mkdir /u01
[root@apex18 /]# mkdir /u01/media
[root@apex18 /]# chmod -Rf 777 /u01
# 檢查當前swap文件
[root@apex18 /]# swapon -s
# 檢查當前磁盤空間
[root@apex18 /]# df
# 建立一個2GB的swap文件
[root@apex18 /]# dd if=/dev/zero of=/swapfile bs=1024 count=2048k
記錄了2097152+0 的讀入
記錄了2097152+0 的寫出
2147483648字節(2.1 GB)已複製,91.2087 秒,23.5 MB/秒
[root@apex18 /]# mkswap /swapfile
[root@apex18 /]# swapon /swapfile
# 再次檢查swap文件
[root@apex18 /]# swapon -s
# 將新的swap文件加入到啓用項
[root@apex18 /]# echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
# 賦予適當權限
[root@apex18 /]# chown root:root /swapfile
[root@apex18 /]# chmod 0600 /swapfile
# 設置yum下載後不刪除安裝包
[root@apex18 etc]# vi /etc/yum.conf
keepcache=1
#
yum -y install \
binutils \
compat-libcap1 \
compat-libstdc++-33 \
compat-libstdc++-33*.i686 \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc*.i686 \
glibc \
glibc-devel \
glibc-devel*.i686 \
ksh \
libgcc*.i686 \
libgcc \
libstdc++ \
libstdc++*.i686 \
libstdc++-devel \
libstdc++-devel*.i686 \
libaio \
libaio*.i686 \
libaio-devel \
libaio-devel*.i686 \
make \
sysstat \
unixODBC \
unixODBC*.i686 \
unixODBC-devel \
unixODBC-devel*.i686 \
libXp
安裝結束後報錯以下:
Total 635 kB/s | 149 MB 03:59
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Retrieving key from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
Importing GPG key 0xEC551F03:
Userid: "Oracle OSS group (Open Source Software group) "
From : http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
Running rpm_check_debug
ERROR with rpm_check_debug vs depsolve:
libkadm5clnt_mit.so.8()(64bit) is needed by krb5-workstation-1.10.3-65.el6.x86_64
libkadm5clnt_mit.so.8(kadm5clnt_mit_8_MIT)(64bit) is needed by krb5-workstation-1.10.3-65.el6.x86_64
libkadm5srv_mit.so.8()(64bit) is needed by krb5-workstation-1.10.3-65.el6.x86_64
libkadm5srv_mit.so.8(kadm5srv_mit_8_MIT)(64bit) is needed by krb5-workstation-1.10.3-65.el6.x86_64
You could try running: rpm -Va --nofiles --nodigest
Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx-2018-07-26-15-04Mfo_sa.yumtx
使用命令安裝好libkadm5便可
[root@apex18 ~]# yum install libkadm5
[root@apex18 ~]# groupadd oinstall
[root@apex18 ~]# groupadd dba
[root@apex18 ~]# useradd -g oinstall -G dba oracle
[root@apex18 ~]# passwd oracle
更改用戶 oracle 的密碼 。
新的 密碼:apex18.1
從新輸入新的 密碼:apex18.1
passwd: 全部的身份驗證令牌已經成功更新。
[root@apex18 ~]# mkdir -p /u01/app/
[root@apex18 ~]# chown -R oracle:oinstall /u01/app/
[root@apex18 ~]# chmod -R 775 /u01/app/
建立用戶環境變量
[root@apex18 ~]# sudo mkdir /u01/tmp
[root@apex18 ~]# sudo chmod a+wr /u01/tmp
安裝中易宋體
[root@apex18 ~]# env | grep -i lang
LANG=zh_CN.UTF-8
[root@apex18 ~]# mkdir -p /usr/share/fonts/zh_CN/TrueType
[root@apex18 ~]# cd /usr/share/fonts/zh_CN/TrueType
[root@apex18 TrueType]# mkfontscale
[root@apex18 TrueType]# mkfontdir
[root@apex18 TrueType]# fc-cache
[root@apex18 TrueType]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.75.1 apex18 apex18.oracle11g
[root@apex18 ~]# cd /u01/media/
[root@apex18 ~]# chmod -R 777 database11g/
[root@apex18 ~]# su - oracle
[oracle@apex18 ~]$ vi .bash_profile
export PATH=$PATH:$HOME/bin
export TMP=/u01/tmp
export TMPDIR=/u01/tmp
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl
>
[oracle@apex18 ~]$ source .bash_profile
用oracle用戶登陸linux桌面
啓動安裝
cd /u01/media/database11g/
./runInstaller
一路Next
Next
Next
Next
Next apex18.1
Next
Next
[root@apex18 ~]# cd /tmp/CVU_11.2.0.1.0_oracle/
[root@apex18 CVU_11.2.0.1.0_oracle]# ./runfixup.sh
依然檢查不經過
再運行一邊依賴包的安裝(以前yum clean all了一次)
再檢查,仍是有這個最大用戶進程數的檢查沒過。
這個地方,我重啓了一下linux,而後檢查一遍.bash_profile,發現編輯時有點問題,修改過來,從新再來一遍安裝
再[修補並再次檢查],此次 ./runfixup.sh的運行結果也和上次報錯的不同了。
[root@apex18 ~]# cd /tmp/CVU_11.2.0.1.0_oracle/
[root@apex18 CVU_11.2.0.1.0_oracle]# ./runfixup.sh
Response file being used is :./fixup.response
Enable file being used is :./fixup.enable
Log file location: ./orarun.log
Setting Kernel Parameters...
kernel.sem = 250 32000 100 128
進到下面的界面,說明檢查經過了,這8個包實際上已經安裝了,點[所有忽略][下一步]便可。
點擊[完成],慢慢等待便可。
好慢長…
又踩坑了 ORA-00922
本身嘗試解決查看日誌
[root@apex18 CVU_11.2.0.1.0_oracle]# cd /u01/app/oracle/cfgtoollogs/dbca/orcl
[root@apex18 orcl]# ls
cloneDBCreation.log postScripts.log tts_example_imp.log
CloneRmanRestore.log rmanRestoreDatafiles.sql
mkplug_v3_orcl.log trace.log
[root@apex18 orcl]# tail trace.log
[Thread-10] [ 2018-07-26 17:52:54.057 CST ] [StepErrorHandler.setIgnorableErrors:250] setting Ignorable Error: ORA-01952
[Thread-10] [ 2018-07-26 17:52:54.057 CST ] [StepErrorHandler.setIgnorableErrors:250] setting Ignorable Error: ORA-01927
[Thread-10] [ 2018-07-26 17:52:54.057 CST ] [BasicStep.configureSettings:304] messageHandler being set=null
[Thread-10] [ 2018-07-26 17:52:54.082 CST ] [SQLEngine.setSpool:1940] old Spool = null
[Thread-10] [ 2018-07-26 17:52:54.082 CST ] [SQLEngine.setSpool:1941] Setting Spool = /u01/app/oracle/cfgtoollogs/dbca/orcl/postScripts.log
[Thread-10] [ 2018-07-26 17:52:54.082 CST ] [SQLEngine.setSpool:1942] Is spool appendable? --> true
[Thread-10] [ 2018-07-26 17:52:54.872 CST ] [ClonePostCreateScripts.executeImpl:274] OraNLSLanguage: SIMPLIFIED CHINESE
[Thread-16] [ 2018-07-26 17:52:54.905 CST ] [BasicStep.handleNonIgnorableError:430] oracle.sysman.assistants.util.UIMessageHandler@49f10a67:messageHandler
[Thread-16] [ 2018-07-26 17:52:54.906 CST ] [BasicStep.handleNonIgnorableError:431] ORA-00922: 選項缺失或無效
:msg
[root@apex18 orcl]#
解決不了 參閱這裏
[root@apex18 orcl]# su - oracle
[oracle@apex18 ~]$ /u01/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
[oracle@apex18 ~]$ vi .bash_profile
[oracle@apex18 ~]$ source .bash_profile
[oracle@apex18 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 26 19:11:51 2018
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> select username,account_status from dba_users;
SP2-0640: Not connected
SQL> conn as sysdba ;
Enter user-name: sys
Enter password:
Connected.
SQL> select username,account_status from dba_users;
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
SYS OPEN
SYSTEM OPEN
SCOTT OPEN
BI OPEN
PM OPEN
IX OPEN
SH OPEN
OE OPEN
HR OPEN
OUTLN EXPIRED & LOCKED
MGMT_VIEW EXPIRED & LOCKED
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
FLOWS_FILES EXPIRED & LOCKED
MDSYS EXPIRED & LOCKED
ORDSYS EXPIRED & LOCKED
EXFSYS EXPIRED & LOCKED
DBSNMP EXPIRED & LOCKED
WMSYS EXPIRED & LOCKED
APPQOSSYS EXPIRED & LOCKED
APEX_030200 EXPIRED & LOCKED
OWBSYS_AUDIT EXPIRED & LOCKED
ORDDATA EXPIRED & LOCKED
CTXSYS EXPIRED & LOCKED
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
ANONYMOUS EXPIRED & LOCKED
SYSMAN EXPIRED & LOCKED
XDB EXPIRED & LOCKED
ORDPLUGINS EXPIRED & LOCKED
OWBSYS EXPIRED & LOCKED
SI_INFORMTN_SCHEMA EXPIRED & LOCKED
OLAPSYS EXPIRED & LOCKED
ORACLE_OCM EXPIRED & LOCKED
XS$NULL EXPIRED & LOCKED
MDDATA EXPIRED & LOCKED
DIP EXPIRED & LOCKED
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
APEX_PUBLIC_USER EXPIRED & LOCKED
SPATIAL_CSW_ADMIN_USR EXPIRED & LOCKED
SPATIAL_WFS_ADMIN_USR EXPIRED & LOCKED
36 rows selected.
SQL>
索性,點擊[忽略],又報ORA-28000
因而又看了一邊trace裏的報錯:oracle.sysman.assistants,目測和sysman這個帳號有關,
原本想先修改一下密碼,到網上一查,說sysman和dbsnmp的密碼修改比較特殊,不然會致使EM沒法啓動。
索性直接解鎖,不改密碼(密碼是多少我也知道),繼續點擊[忽略],後面發現EM能夠正常訪問。
alter user sysman account unlock ;
數據庫建立成功。
執行兩段配置腳本,數據庫安裝完畢。
[root@apex18 orcl]# cd /u01/app/oraInventory/
[root@apex18 oraInventory]# ./orainstRoot.sh
[root@apex18 oraInventory]# cd /u01/app/oracle/product/11.2.0/dbhome_1/
[root@apex18 dbhome_1]# ./root.sh
[root@apex18 dbhome_1]# su - oracle
[oracle@apex18 apex]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/apex
[oracle@apex18 apex]$ sqlplus /nolog
SQL> connect sys as sysdba
Connected.
SQL> @apxremov.sql
PL/SQL procedure successfully completed.
...Application Express Removed
SQL> exit
上傳apex_18.1.zip至/u01/media
[oracle@apex18 media]cd/u01/media/[oracle@apex18media]cd/u01/media/[oracle@apex18media] mkdir -p /u01/apex
[oracle@apex18 media]unzipapex18.1.zip−d/u01/[oracle@apex18media]unzipapex18.1.zip−d/u01/[oracle@apex18media]chown -R oracle:dba /u01/apex
安裝新APEX
[oracle@apex18 media]cd/u01/apex[oracle@apex18apex]cd/u01/apex[oracle@apex18apex] sqlplus /nolog
SQL> connect sys as sysdba;
安裝apex18.1
SQL> @apexins.sql SYSAUX SYSAUX TEMP /i/
PL/SQL procedure successfully completed.
Thank you for installing Oracle Application Express 18.1.0.00.45
Oracle Application Express is installed in the APEX_180100 schema.
The structure of the link to the Application Express administration services is as follows:
http://host:port/pls/apex/apex_admin (Oracle HTTP Server with mod_plsql)
http://host:port/apex/apex_admin (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)
http://host:port/apex/apex_admin (Oracle REST Data Services)
The structure of the link to the Application Express development interface is as follows:
http://host:port/pls/apex (Oracle HTTP Server with mod_plsql)
http://host:port/apex (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)
http://host:port/apex (Oracle REST Data Services)
timing for: Phase 3 (Switch)
Elapsed: 00:01:52.94
timing for: Complete Installation
Elapsed: 00:10:27.19
PL/SQL procedure successfully completed.
1 row selected.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
建立APEX實例管理員(Instance Administration)及密碼,這個密碼必須包含特殊符號,不然設置不上。這個密碼很重要,是管理APEX平臺的帳號密碼,之後建立新的應用schema、解鎖帳號等都靠它,第一次登陸APEX時也要用到。
SQL> @apxchpwd.sql
ADMIN/!!11AAaa
作了以下嘗試仍是報錯果斷放棄
[root@apex18 ~]# vi /etc/profile
unset i
unset pathmunge
PATH=PATH:/sbinPATH=PATH:/sbinPATH=PATH:/usr/java1.8/bin:/usr/java1.8/jre/bin
:wq
關閉SELinux
[root@apex18 ~]# vi /etc/sysconfig/selinux
SELINUX=disabled
[root@apex18 ~]# setenforce 0
卸載Tomcat
[root@apex18 ~]# yum -y remove tomcat*
添加Tomcat用戶和組
[root@apex18 ~]# mkdir -p /u01/tomcat
[root@apex18 ~]# groupadd tomcat
[root@apex18 ~]# useradd -s /bin/false -g tomcat -d /u01/tomcat tomcat
useradd:警告:此主目錄已經存在。
不從 skel 目錄裏向其中複製任何文件。
下載Tomcat
[root@apex18 ~]# cd /u01/media
[root@apex18 ~]# wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.5.32/bin/apache-tomcat-8.5.32.zip
安裝 Tomcat 8.5
** 先將下載的zip文件解壓縮
[root@apex18 media]# unzip apache-tomcat-8.5.32.zip
** 將解壓縮後的文件挪到安裝目錄中
[root@apex18 media]# mv apache-tomcat-8.5.32/* /u01/tomcat
** 受權
[root@apex18 media]# chmod -Rf 755 /u01/tomcat/bin/
[root@apex18 media]# chown -hR tomcat:tomcat /u01/tomcat
新增一個tomcat.service文件
沒有/etc/systemd/system/目錄,囧
設置 tomcat 啓動目錄權限
[root@apex18 ~]# chmod 755 /u01/tomcat/bin
將 tomcat 服務設置成自啓動。
沒有systemctl命令,囧
檢查 tomcat 服務是否正常啓動
沒有systemctl命令,囧
測試Tomcat
[root@apex18 ~]# cd /u01/tomcat/bin
[root@apex18 bin]# ./catalina.sh run
爲tomcat帳號受權
[root@apex18 ~]# chown -R tomcat:tomcat /u01/ords/config
將 ords.war 部署到 Tomcat 如今咱們能夠將剛纔生成的ords.war文件部署到Tomcat上了。
[root@apex18 ~]# cp -a /u01/ords/ords.war /u01/tomcat/webapps/
重啓Tomcat服務
[root@apex18 ~]# cd /u01/tomcat/bin
[root@apex18 bin]# ./catalina.sh run
訪問ords 報錯
複製APEX靜態文件到Tomcat目錄
** 在Tomcat的webapps目錄下新建一個名爲i
的文件夾
[root@apex18 bin]# mkdir -p /u01/tomcat/webapps/i/
** 將APEX靜態文件複製過去
[root@apex18 bin]# cp -a /u01/apex/images/* /u01/tomcat/webapps/i/
訪問ords 仍是報錯
去(https://community.oracle.com/community/database/developer-tools/application_express)(https://www.thatjeffsmith.com/archive/2017/06/how-to-update-the-ords_public_user-password/)上查資料,媽的又踩坑,把密碼改爲不帶!的,從新安裝ords,從新部署到tomcat
alter user APEX_PUBLIC_USER identified by apu account unlock;
alter user APEX_REST_PUBLIC_USER identified by apu account unlock;
alter user ORDS_PUBLIC_USER identified by apu account unlock;
alter user APEX_LISTENER identified by apu account unlock;
此次報警告了,訪問ords時,頁面顯示不完整
索性重啓Linux
啓動數據庫,又踩坑
參考(https://blog.csdn.net/benson_xi/article/details/7356499)
修改kernel.sem = 250 32000 100 128以後,數據庫正常啓動
啓動監聽
root下啓動tomcat,發現仍是ORDS頁面沒法正常顯示
索性配置一下linux防火牆,在虛擬機外面訪問
終於成功了