This is the 8th blog about Oracle APEX, you can find the full series list as below：
- Oracle APEX 系列文章01：Oracle APEX, 让你秒变全栈开发的黑科技
- Oracle APEX 系列文章02：在阿里云上打造属于你自己的APEX完整开发环境 (安装 CentOS)
- Oracle APEX 系列文章03：在阿里云上打造属于你自己的APEX完整开发环境 (安装 Tomcat, Nginx)
- Oracle APEX 系列文章04：在阿里云上打造属于你自己的APEX完整开发环境 (安装XE, ORDS, APEX)
- Oracle APEX 系列文章05：在阿里云上打造属于你自己的APEX完整开发环境 (进一步优化)
- Oracle APEX 系列文章06：Oracle APEX 到底适不适合企业环境？
- Oracle APEX 系列文章07：Oracle APEX 18.1 新特性
- Oracle APEX 系列文章08：如何从 APEX 5.1.4 升级到 最新的 APEX 18.1
- Oracle APEX 系列文章09：为什么选择使用 Oracle APEX
- Oracle APEX 系列文章10：Oracle APEX Evangelion（EVA 补完计划）
- Oracle APEX 系列文章11：全站启用 HTTPS，让你的 APEX 更安全
- Oracle APEX 系列文章12：魔法秀，让你的 H5 页面秒变 APP
- Oracle APEX 系列文章13：Oracle APEX 入门基础资料整理
- Oracle APEX 系列文章14：Oracle APEX 18.1 Docker 镜像
Oracle APEX 18.1 has already been published several days, I believe most of apexers had tried it. The next thing we need to do is how to upgrade Oracle APEX from earlier version (such as 5.1.4) to the latest 18.1.
I quickly go through Oracle APEX 18.1 installation guide but not find a upgrade script I could use (even if there is also a sql named
apxpatch.sql, I didn’t try it yet). Since the new APEX (db) schema is
APEX_180100, I guess I have to reinstall APEX 18.1 this time.
The following upgrade steps are based on CentOS 6, Oracle database is 11gR2 and APEX 5.1.4.
The wonderful part I find out is I don’t have to reinstall my existed APEX applications after I upgrade APEX 18.1. All my data is still there (workspace, application and so on) and I could continue to use them painlessly. Thanks to what Oracle APEX team did!!
Here is a component list we could upgrade:
APEX：we will upgrade from earlier version to the latest 18.1；
ORDS：we will also upgrade it to the latest 18.1, and re-config and deploy to tomcat;
JAVA：ORDS 18.1 requires the lowest version of JDK/JRE is 1.8 or above；
Tomcat：ORDS 18.1 requires the lowest version of tomcat server is 8.5 or above；
Nignx：we need to adjust some configurations in nginx.conf if necessary；
OK, let’s begin the upgrade process.
I uploaded all installation media files to
Shut down nginx and tomcat services.
## shutdown nginx service
java -version to check the current version of JDK. Per below picture, we can see the current version of JDK is 1.7. We have to upgrade to 1.8 or above to meet the requirement of ORDS 18.1.
JDK 1.8 Installation
yum install -y java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64
We can update some values in
Manually initialize environment variables.
We find out the version of JDK is 1.8 now.
I checked my tomcat server and found out it was version 7. I have to upgrade it to version 8.5 or above to meet requirements of ORDS 18.1.
Download installation media of Tomcat server 8.5
Since I use CentOS 6, I have to adjust some values of
start tomcat service and validate it.
service tomcat start
We can see the tomcat 8.5 is started and the JDK we used is 1.8 now.
Open your web explorer and type http://xxx.xxx.xxx.xxx:8080，you should also see the wellcome page of tomcat.
su - oracle
sqlplus / as sysdba
su - root
mkdir -p /u01/ords
grant read privilege to make sure tomcat user could read files in folder
chown -R tomcat:tomcat /u01/ords/conf
cp -a /u01/ords/ords.war /u01/tomcat8/webapps/
open your web explorer, navigate to http://xxx.xxx.xxx.xxx:8080/ords . If you could see apex page, congratulations!!
Review your nginx.conf and check if there are something need to be changed，such as path of static file folder
Open your web explorer again, navigate to http://xxx.xxx.xxx.xxx/ords . If you could see apex page, congratulations again!!
Login APEX Administration and switch to
Existed Workspace，you will find all existed workspaces.
Login APEX with your workspace, all applications are there. Perfect!!
Now you have successfully upgraded your earlier version of APEX to the latest version 18.1.