{"id":169,"date":"2013-04-29T08:01:18","date_gmt":"2013-04-29T08:01:18","guid":{"rendered":"http:\/\/www.einaweb.es\/develop\/?p=169"},"modified":"2013-04-29T08:01:54","modified_gmt":"2013-04-29T08:01:54","slug":"oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server","status":"publish","type":"post","link":"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/","title":{"rendered":"Oracle XE  oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server"},"content":{"rendered":"<p>Pasos a seguir par conseguir instalar el Oracle XE en un ubuntu Server a traves de la consola.<\/p>\n<p><strong>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Bajamos los siguientes paquetes que se utilizaran.<\/strong><\/p>\n<blockquote><p>~$ sudo apt-get install openssh-server<br \/>\n~$ sudo apt-get install alien libaio1 unixodbc unzip<\/p><\/blockquote>\n<p><strong>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Aumentamos el tama\u00f1o de swap.<\/strong><\/p>\n<blockquote><p>~$ cat \/proc\/meminfo | grep -i swap<br \/>\n~$ sudo su &#8211;<br \/>\n~$ dd if=\/dev\/zero of=\/home\/swapfile bs=1024 count=1048576<br \/>\n~$ mkswap \/home\/swapfile<br \/>\n~$ swapon \/home\/swapfile<br \/>\n~$ swapon -a<br \/>\n~$ cp \/etc\/fstab \/etc\/fstab.backup_`date +%N`<br \/>\n~$ echo &#8216;\/home\/swapfile swap swap defaults 0 0&#8217; &gt;&gt; \/etc\/fstab<br \/>\n~$ exit<br \/>\n~$ swapon -s<\/p><\/blockquote>\n<p><strong>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Modificamos los par\u00e1metros del kernel<\/strong><\/p>\n<blockquote><p>~$ sudo su &#8211;<br \/>\n~$ cat &gt; \/etc\/sysctl.d\/60-oracle.conf &lt;&lt;-EOF<br \/>\n# Oracle 11g XE kernel parameters<br \/>\nfs.file-max=6815744<br \/>\nnet.ipv4.ip_local_port_range=9000 65500<br \/>\nkernel.sem=250 32000 100 128<br \/>\n# kernel.shmmax=429496729<br \/>\nkernel.shmmax=107374183<br \/>\nEOF<br \/>\n~$ service procps start<br \/>\n~$ sudo sysctl -q fs.file-max<br \/>\n~$ sudo sysctl -q kernel.shmmax<br \/>\n~$ sudo sysctl -q net.ipv4.ip_local_port_range<br \/>\n~$ sudo sysctl -q kernel.sem<\/p><\/blockquote>\n<p><strong>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ORA-00845: MEMORY_TARGET<\/strong><\/p>\n<blockquote><p>~$ sudo su &#8211;<br \/>\n~$ cat &gt; \/etc\/init.d\/oracle-shm &lt;&lt;-EOF<br \/>\n#! \/bin\/sh<br \/>\n# \/etc\/init.d\/oracle-shm<br \/>\n#<br \/>\n#<br \/>\ncase \u00ab\\$1\u00bb in<br \/>\nstart)<br \/>\necho \u00abStarting script \/etc\/init.d\/oracle-shm\u00bb<br \/>\n# Run only once at system startup<br \/>\nif [ -e \/dev\/shm\/.oracle-shm ]; then<br \/>\necho \u00ab\/dev\/shm is already mounted, nothing to do\u00bb<br \/>\nelse<br \/>\nrm -f \/dev\/shm<br \/>\nmkdir \/dev\/shm<br \/>\nmount -t tmpfs shmfs -o size=2048m \/dev\/shm<br \/>\ntouch \/dev\/shm\/.oracle-shm<br \/>\nfi<br \/>\n;;<br \/>\nstop)<br \/>\necho \u00abStopping script \/etc\/init.d\/oracle-shm\u00bb<br \/>\necho \u00abNothing to do\u00bb<br \/>\n;;<br \/>\n*)<br \/>\necho \u00abUsage: \/etc\/init.d\/oracle-shm {start|stop}\u00bb<br \/>\nexit 1<br \/>\n;;<br \/>\nesac<br \/>\n#<br \/>\n### BEGIN INIT INFO<br \/>\n# Provides:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 oracle-shm<br \/>\n# Required-Start:\u00a0\u00a0\u00a0 $remote_fs $syslog<br \/>\n# Required-Stop:\u00a0\u00a0\u00a0\u00a0 $remote_fs $syslog<br \/>\n# Default-Start:\u00a0\u00a0\u00a0\u00a0 2 3 4 5<br \/>\n# Default-Stop:\u00a0\u00a0\u00a0\u00a0\u00a0 0 1 6<br \/>\n# Short-Description: Bind \/run\/shm to \/dev\/shm at system startup.<br \/>\n# Description:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Fix to allow Oracle 11g use AMM.<br \/>\n### END INIT INFO<br \/>\nEOF<br \/>\n~$ chmod 755 \/etc\/init.d\/oracle-shm<br \/>\n~$ update-rc.d oracle-shm defaults 01 99<br \/>\n~$ reboot<br \/>\n~$ sudo cat \/etc\/mtab | grep shm<br \/>\n~$ sudo df -h \/run\/shm<\/p><\/blockquote>\n<p><strong>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Instalamos el Oracle 11gR2 Express Edition<\/strong><\/p>\n<blockquote><p>~$ unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip<br \/>\n~$ cd Disk1<br \/>\n~$ sudo alien &#8211;to-deb &#8211;scripts oracle-xe-11.2.0-1.0.x86_64.rpm<br \/>\n~$ sudo ln -s \/usr\/bin\/awk \/bin\/awk<br \/>\n~$ sudo mkdir \/var\/lock\/subsys<br \/>\n~$ sudo su &#8211;<br \/>\n~$ cat &gt; \/sbin\/chkconfig &lt;&lt;-EOF<br \/>\n#!\/bin\/bash<br \/>\n# Oracle 11gR2 XE installer chkconfig hack for Debian based Linux (by dude)<br \/>\n# Only run once.<br \/>\necho \u00abSimulating \/sbin\/chkconfig&#8230;\u00bb<br \/>\nif [[ ! \\`tail -n1 \/etc\/init.d\/oracle-xe | grep INIT\\` ]]; then<br \/>\ncat &gt;&gt; \/etc\/init.d\/oracle-xe &lt;&lt;-EOM<br \/>\n#<br \/>\n### BEGIN INIT INFO<br \/>\n# Provides:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 OracleXE<br \/>\n# Required-Start:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \\\\\\$remote_fs \\\\\\$syslog<br \/>\n# Required-Stop:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \\\\\\$remote_fs \\\\\\$syslog<br \/>\n# Default-Start:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2 3 4 5<br \/>\n# Default-Stop:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 1 6<br \/>\n# Short-Description:\u00a0\u00a0 Oracle 11g Express Edition<br \/>\n### END INIT INFO<br \/>\nEOM<br \/>\nfi<br \/>\nupdate-rc.d oracle-xe defaults 80 01<br \/>\nEOF<br \/>\n~$ exit<br \/>\n~$ sudo chmod 755 \/sbin\/chkconfig<br \/>\n~$ sudo dpkg &#8211;install .\/oracle-xe_11.2.0-2_amd64.deb<br \/>\n~$ sudo \/etc\/init.d\/oracle-xe configure<br \/>\n~$ sudo passwd oracle<\/p><\/blockquote>\n<p><strong>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Despu\u00e9s de la instalaci\u00f3n<\/strong><\/p>\n<blockquote><p>~$ su &#8211; oracle<br \/>\n~$ cp \/etc\/skel\/.bash_logout .\/<br \/>\n~$ cp \/etc\/skel\/.bashrc .\/<br \/>\n~$ cp \/etc\/skel\/.profile .\/<br \/>\n~$ echo \u00ab\u00bb &gt;&gt;.\/.profile<br \/>\n~$ echo &#8216;. \/u01\/app\/oracle\/product\/11.2.0\/xe\/bin\/oracle_env.sh&#8217; &gt;&gt;.\/.profile<br \/>\n~$ su &#8211; oracle<br \/>\n~$ sqlplus \/ as sysdba<br \/>\nSQL&gt; EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);<br \/>\nexit<\/p><\/blockquote>\n<p>Fuente recogida de esta direccion:<a href=\"https:\/\/forums.oracle.com\/forums\/thread.jspa?threadID=2301639&amp;start=0&amp;tstart=0\" target=\"_blank\"> https:\/\/forums.oracle.com\/forums\/thread.jspa?threadID=2301639&amp;start=0&amp;tstart=0<\/a><\/p>\n<p>En ubuntu tuve problemas siguiendo el tutorial del link anterior por esta razon que esta modificado en la explicaci\u00f3n que se detalla anteriormente:<\/p>\n<blockquote><p><em>Debes cambiar del fichero \/etc\/init.d\/oracle-shm la linea esta \u00abmount -B \/run\/shm \/dev\/shm\u00bb por esta \u00abmount -t tmpfs shmfs -o size=2048m \/dev\/shm\u00bb, sino no podras configurar la base de datos y no la instanciara.<\/em><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pasos a seguir par conseguir instalar el Oracle XE en un ubuntu Server a traves de la consola. &#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Bajamos los siguientes paquetes que se utilizaran. ~$ sudo apt-get install openssh-server ~$ sudo apt-get install alien libaio1 unixodbc unzip &#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Aumentamos el tama\u00f1o de swap. ~$ cat \/proc\/meminfo | grep -i swap ~$ sudo su [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-169","post","type-post","status-publish","format-standard","hentry","category-oracle"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador<\/title>\n<meta name=\"description\" content=\"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador\" \/>\n<meta property=\"og:description\" content=\"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Desarrollador\" \/>\n<meta property=\"article:published_time\" content=\"2013-04-29T08:01:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-04-29T08:01:54+00:00\" \/>\n<meta name=\"author\" content=\"Angel Fernandez Gutierrez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@afernandezg76\" \/>\n<meta name=\"twitter:site\" content=\"@afernandezg76\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Angel Fernandez Gutierrez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/\",\"url\":\"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/\",\"name\":\"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador\",\"isPartOf\":{\"@id\":\"http:\/\/www.einaweb.es\/develop\/#website\"},\"datePublished\":\"2013-04-29T08:01:18+00:00\",\"dateModified\":\"2013-04-29T08:01:54+00:00\",\"author\":{\"@id\":\"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c\"},\"description\":\"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador\",\"breadcrumb\":{\"@id\":\"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"http:\/\/www.einaweb.es\/develop\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/#website\",\"url\":\"http:\/\/www.einaweb.es\/develop\/\",\"name\":\"Blog Desarrollador\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.einaweb.es\/develop\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"es\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c\",\"name\":\"Angel Fernandez Gutierrez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g\",\"caption\":\"Angel Fernandez Gutierrez\"},\"url\":\"http:\/\/www.einaweb.es\/develop\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador","description":"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/","og_locale":"es_ES","og_type":"article","og_title":"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador","og_description":"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador","og_url":"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/","og_site_name":"Blog Desarrollador","article_published_time":"2013-04-29T08:01:18+00:00","article_modified_time":"2013-04-29T08:01:54+00:00","author":"Angel Fernandez Gutierrez","twitter_card":"summary_large_image","twitter_creator":"@afernandezg76","twitter_site":"@afernandezg76","twitter_misc":{"Escrito por":"Angel Fernandez Gutierrez","Tiempo de lectura":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/","url":"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/","name":"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador","isPartOf":{"@id":"http:\/\/www.einaweb.es\/develop\/#website"},"datePublished":"2013-04-29T08:01:18+00:00","dateModified":"2013-04-29T08:01:54+00:00","author":{"@id":"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c"},"description":"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server - Blog Desarrollador","breadcrumb":{"@id":"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.einaweb.es\/develop\/oracle-xe-oracle-xe-11-2-0-1-0-x86_64-in-ubuntu-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"http:\/\/www.einaweb.es\/develop\/"},{"@type":"ListItem","position":2,"name":"Oracle XE oracle-xe-11.2.0-1.0.x86_64 in Ubuntu Server"}]},{"@type":"WebSite","@id":"http:\/\/www.einaweb.es\/develop\/#website","url":"http:\/\/www.einaweb.es\/develop\/","name":"Blog Desarrollador","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.einaweb.es\/develop\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"es"},{"@type":"Person","@id":"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c","name":"Angel Fernandez Gutierrez","image":{"@type":"ImageObject","inLanguage":"es","@id":"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g","caption":"Angel Fernandez Gutierrez"},"url":"http:\/\/www.einaweb.es\/develop\/author\/admin\/"}]}},"_links":{"self":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts\/169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/comments?post=169"}],"version-history":[{"count":2,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":171,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts\/169\/revisions\/171"}],"wp:attachment":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}