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 镜像
Introduction
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 isAPEX_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.
Preparation
Upload installation media
I uploaded all installation media files to /u02/Media
.
Shut down nginx and tomcat services.1
2
3
4
5## shutdown nginx service
service nginx stop
## shutdown tomcat service
service tomcat stop
Upgrade JDK/JRE 1.8
Use command 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 Installation1
yum install -y java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64
We can update some values in ~/.bash_profile
.
1 | # .bash_profile |
Manually initialize environment variables.1
2
3
4source ~/.bash_profile
## Check java version again
java -version
We find out the version of JDK is 1.8 now.
Upgrade Tomcat Server
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.51
2
3
4
5
6
7
8
9cd /u02/Media
wget http://mirrors.shu.edu.cn/apache/tomcat/tomcat-8/v8.5.31/bin/apache-tomcat-8.5.31.zip
unzip apache-tomcat-8.5.31.zip
mv apache-tomcat-8.5.31/* /u01/tomcat8
chown -Rf tomcat:tomcat /u01/tomcat8
chmod -Rf 755 /u01/tomcat8/bin/*
Since I use CentOS 6, I have to adjust some values of /etc/init.d/tomcat
.1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/u01/java/jdk1.8.0_162
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/u01/tomcat8
case $1 in
start)
/bin/su tomcat $CATALINA_HOME/bin/startup.sh
;;
stop)
/bin/su tomcat $CATALINA_HOME/bin/shutdown.sh
;;
restart)
/bin/su tomcat $CATALINA_HOME/bin/shutdown.sh
/bin/su tomcat $CATALINA_HOME/bin/startup.sh
;;
esac
. /root/firewall.sh
exit 0
start tomcat service and validate it.1
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.
Upgrade APEX 18.1
1 | cd /u02/Media/ |
Execute installation of APEX 18.1
1 | su - oracle |
1 | sqlplus / as sysdba |
copy apex static files to tomcat folder
1 | su - root |
Upgrade ORDS 18.1
1 | mkdir -p /u01/ords |
Execute installation of ORDS
1 | cd /u01/ords |
grant read privilege to make sure tomcat user could read files in folder /u01/ords/conf
1
chown -R tomcat:tomcat /u01/ords/conf
deploy ords.war to Tomcat
1 | cp -a /u01/ords/ords.war /u01/tomcat8/webapps/ |
Validate ORDS deployment
open your web explorer, navigate to http://xxx.xxx.xxx.xxx:8080/ords . If you could see apex page, congratulations!!
Nginx Configiration (optional)
Review your nginx.conf and check if there are something need to be changed,such as path of static file folder i
Test your environment
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 toExisted Workspace
,you will find all existed workspaces.
Login APEX with your workspace, all applications are there. Perfect!!
Conclusion
Now you have successfully upgraded your earlier version of APEX to the latest version 18.1.