{"id":3239,"date":"2013-04-06T06:28:01","date_gmt":"2013-04-06T13:28:01","guid":{"rendered":"http:\/\/blog.networkpresence.co\/?p=3239"},"modified":"2013-04-06T06:28:01","modified_gmt":"2013-04-06T13:28:01","slug":"installing-oracle-xe-database-on-centos","status":"publish","type":"post","link":"http:\/\/blog.networkpresence.co\/?p=3239","title":{"rendered":"Installing Oracle XE Database on CentOS"},"content":{"rendered":"<p>Once you satisfy the login requirements for Oracle&#8217;s site, you can download their &#8220;Express&#8221; Database, which from their <a href=\"http:\/\/www.oracle.com\/technetwork\/licenses\/database-11g-express-license-459621.html\">License Agreement<\/a> for that DB sofware, can only be run\/used in the following manner:<\/p>\n<blockquote><p>Any use of the Oracle Database Express Edition is subject to the following limitations;<br \/>\n1. Express Edition is limited to a single instance on any server;<br \/>\n2. Express Edition may be installed on a multiple CPU server, but may only be executed on one processor in any server;<br \/>\n3. Express Edition may only be used to support up to 11GB of user data (not including Express Edition system data);<br \/>\n4. Express Edition may use up to 1 GB RAM of available memory.<\/p><\/blockquote>\n<p>We <a href=\"http:\/\/networkpresence.com.au\" title=\"Network Presence\" target=\"_blank\">offer a number of 1GB+ RAM VPS Plans<\/a> and once you&#8217;ve downloaded the Oracle Express DB distriubtion .zip file, the following describes getting it installed and running on a CentOS 5.9 64-bit VPS.<\/p>\n<p>1) Install and ensure Prerequisites<\/p>\n<p><code>yum install libaio bc flex<\/code><\/p>\n<p>You also need to have twice as much RAM configured as Swap space to the CentOS system. So if you have a 1GB RAM VPS, then Oracle XE&#8217;s installer requires that you need (at least) 2GB of Swap configured to the system.<\/p>\n<p>A quick way to add Swap space is to use a &#8220;swap file&#8221; in the filesystem, commands like:<\/p>\n<p><code>dd if=\/dev\/zero of=\/var\/swap.file count=2000000 bs=1024<br \/>\nchmod go= \/var\/swap.file<br \/>\nmkswap \/var\/swap.file<br \/>\necho \"\/var\/swap.file swap swap defaults 0 0\" >> \/etc\/fstab<br \/>\nswapon -a<\/code><\/p>\n<p>2) <a href=\"http:\/\/www.oracle.com\/technetwork\/database\/express-edition\/downloads\/index.html\">Download oracle-xe-11.2.0-1.0.x86_64.rpm.zip<\/a> and unzip to \/usr\/local\/src<\/p>\n<p><code>cd \/usr\/local\/src<br \/>\nunzip  oracle-xe-11.2.0-1.0.x86_64.rpm.zip<br \/>\nArchive:  oracle-xe-11.2.0-1.0.x86_64.rpm.zip<br \/>\n   creating: Disk1\/<br \/>\n   creating: Disk1\/upgrade\/<br \/>\n  inflating: Disk1\/upgrade\/gen_inst.sql<br \/>\n   creating: Disk1\/response\/<br \/>\n  inflating: Disk1\/response\/xe.rsp<br \/>\n  inflating: Disk1\/oracle-xe-11.2.0-1.0.x86_64.rpm<br \/>\n<\/code><\/p>\n<p>3) Install the .rpm<\/p>\n<p><code>rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm<\/code><\/p>\n<p>4) After the RPM is installed, you need to run \/etc\/init.d\/oracle-xe configure, during which you need to supply the inital SYS DB User&#8217;s password.<\/p>\n<p><code>\/etc\/init.d\/oracle-xe configure<\/p>\n<p>Oracle Database 11g Express Edition Configuration<br \/>\n-------------------------------------------------<br \/>\nThis will configure on-boot properties of Oracle Database 11g Express<br \/>\nEdition.  The following questions will determine whether the database should<br \/>\nbe starting upon system boot, the ports it will use, and the passwords that<br \/>\nwill be used for database accounts.  Press <Enter> to accept the defaults.<br \/>\nCtrl-C will abort.<\/p>\n<p>Specify the HTTP port that will be used for Oracle Application Express [8080]:<\/p>\n<p>Specify a port that will be used for the database listener [1521]:<\/p>\n<p>Specify a password to be used for database accounts.  Note that the same<br \/>\npassword will be used for SYS and SYSTEM.  Oracle recommends the use of<br \/>\ndifferent passwords for each database account.  This can be done after<br \/>\ninitial configuration: TYPE your Passwd<br \/>\nConfirm the password: TYPE your Passwd Again<\/p>\n<p>Do you want Oracle Database 11g Express Edition to be started on boot (y\/n) [y]:<\/p>\n<p>Starting Oracle Net Listener...Done<br \/>\nConfiguring database...<br \/>\nDone<br \/>\nStarting Oracle Database 11g Express Edition instance...Done<br \/>\nInstallation completed successfully.<\/code><\/p>\n<p>5) After install, configure the Oracle environment for your relevant users on the CentOS system<\/p>\n<p>First, set the required Oracle environment variables, use the oracle_env.sh the script that&#8217;s installed by the RPM to \/u01\/app\/oracle\/product\/11.2.0\/xe\/bin<\/p>\n<p><code>cd \/u01\/app\/oracle\/product\/11.2.0\/xe\/bin<br \/>\n. .\/oracle_env.sh<\/code><\/p>\n<p>To set these environment variables permanently for users, add the following to the .bashrc or .bash_profile of the users you want to access the environment:<\/p>\n<p><code>. \/u01\/app\/oracle\/product\/11.2.0\/xe\/bin\/oracle_env.sh<\/code><\/p>\n<p>6) You can use the Oracle s\/ware (SQL*Plus) from the Linux command line with:<\/p>\n<p><code>sqlplus \/nolog<\/p>\n<p>SQL*Plus: Release 11.2.0.2.0 Production on ....<br \/>\nCopyright (c) 1982, 2011, Oracle.  All rights reserved.<\/p>\n<p>SQL> connect sys\/your-SYS-Password as sysdba<br \/>\nConnected.<br \/>\nSQL><\/code><\/p>\n<p>7) Enable remote access for the DB<\/p>\n<p>To enable and allow remote access to the Oracle XE GUI, run the following command from SQL*Plus, connected as the SYS user:<\/p>\n<p><code>SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);<\/p>\n<p>PL\/SQL procedure successfully completed.<br \/>\n<\/code><\/p>\n<p>You should now be able to access the Oracle 11g XE Home Page GUI at:<\/p>\n<p><code>http:\/\/your-VPS-IP-Address:8080\/apex<\/code><\/p>\n<p>Replace <code>your-VPS-IP-Address<\/code> above with your IP or hostname as required.<\/p>\n<p>Log in as SYSTEM using the password you supplied in the above &#8216;configure&#8217; step.<\/p>\n<p>You now have a running Oracle XE database installed and usable from the command-line (sqlplus) and the Web.<\/p>\n<p>Any customers who&#8217;d like us to install this Database software are welcome to <a href=\"http:\/\/netpr.es\/contactus\">contact us<\/a> to do that for them.<\/p>\n<p>FYI,<br \/>\nRichard.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once you satisfy the login requirements for Oracle&#8217;s site, you can download their &#8220;Express&#8221; Database, which from their License Agreement for that DB sofware, can only be run\/used in the following manner: Any use of the Oracle Database Express Edition &hellip; <a href=\"http:\/\/blog.networkpresence.co\/?p=3239\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,70],"tags":[246,18,157,78],"class_list":["post-3239","post","type-post","status-publish","format-standard","hentry","category-network-presence","category-sales","tag-database","tag-linux","tag-oracle","tag-sysadmin"],"_links":{"self":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/3239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3239"}],"version-history":[{"count":8,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/3239\/revisions"}],"predecessor-version":[{"id":3250,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/3239\/revisions\/3250"}],"wp:attachment":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3239"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}