Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.92 KB | None | 0 0
  1. ● oracle-xe.service - LSB: Oracle 11g Express Edition
  2. Loaded: loaded (/etc/init.d/oracle-xe)
  3. Active: failed (Result: exit-code) since lun 2015-08-24 22:24:32 CEST; 18min ago
  4. Docs: man:systemd-sysv-generator(8)
  5. Process: 12274 ExecStart=/etc/init.d/oracle-xe start (code=exited, status=1/FAILURE)
  6.  
  7. ... systemd[1]: Starting LSB: Oracle 11g Express Edition...
  8. ... oracle-xe[12274]: Starting Oracle Net Listener.
  9. ... su[12282]: No passwd entry for user 'oracle'
  10. ... oracle-xe[12274]: Starting Oracle Database 11g Express Edition instance.
  11. ... su[12288]: No passwd entry for user 'oracle'
  12. ... oracle-xe[12274]: Failed to start Oracle Net Listener using /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr and Oracle Express Database using /u01/app/oracle/product/11.2.0/xe/bin/sqlplus.
  13. ... systemd[1]: oracle-xe.service: control process exited, code=exited status=1
  14. ... systemd[1]: Failed to start LSB: Oracle 11g Express Edition.
  15. ... systemd[1]: Unit oracle-xe.service entered failed state.
  16. ... systemd[1]: oracle-xe.service failed.
  17.  
  18. ...
  19. .. polkitd(authority=local)[641]: Registered Authentication Agent for unix-process:12249:680724 (system bus name :1.73 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale es_ES.UTF-8)
  20. ... systemd[1]: Starting LSB: Oracle 11g Express Edition...
  21. -- Subject: Unit oracle-xe.service has begun start-up
  22. -- Defined-By: systemd
  23. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  24. --
  25. -- Unit oracle-xe.service has begun starting up.
  26. ... oracle-xe[12274]: Starting Oracle Net Listener.
  27. ... su[12282]: No passwd entry for user 'oracle'
  28. ... su[12282]: FAILED su for oracle by root
  29. ... su[12282]: - ??? root:oracle
  30. ... oracle-xe[12274]: Starting Oracle Database 11g Express Edition instance.
  31. ... su[12288]: No passwd entry for user 'oracle'
  32. ... su[12288]: FAILED su for oracle by root
  33. ... su[12288]: - ??? root:oracle
  34. ... oracle-xe[12274]: Failed to start Oracle Net Listener using /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr and Oracle Express Database using /u01/app/oracle/product/11.2.0/xe/bin/sqlplus.
  35. ... systemd[1]: oracle-xe.service: control process exited, code=exited status=1
  36. ... systemd[1]: Failed to start LSB: Oracle 11g Express Edition.
  37. -- Subject: Unit oracle-xe.service has failed
  38. -- Defined-By: systemd
  39. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  40. --
  41. -- Unit oracle-xe.service has failed.
  42. --
  43. -- The result is failed.
  44. ... systemd[1]: Unit oracle-xe.service entered failed state.
  45. ... systemd[1]: oracle-xe.service failed.
  46. ... polkitd(authority=local)[641]: Unregistered Authentication Agent for unix-process:12249:680724 (system bus name :1.73, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale es_ES.UTF-8) (disconnected from bus)
  47. ... sudo[12248]: pam_unix(sudo:session): session closed for user root
  48. ... pkexec[12404]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
  49. ... pkexec[12404]: jose: Executing command [USER=root] [TTY=unknown] [CWD=/home/jose] [COMMAND=/usr/lib/update-notifier/package-system-locked]
  50. ... kernel: toshiba_acpi: Unknown key 120
  51.  
  52. unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
  53.  
  54. unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
  55.  
  56. sudo apt-get install alien libaio1 unixodbc vim
  57.  
  58. sudo vim /sbin/chkconfig
  59.  
  60. #!/bin/bash
  61. # Oracle 11gR2 XE installer chkconfig hack for Ubuntu
  62. file=/etc/init.d/oracle-xe
  63. if [[ ! `tail -n1 $file | grep INIT` ]]; then
  64. echo >> $file
  65. echo '### BEGIN INIT INFO' >> $file
  66. echo '# Provides: OracleXE' >> $file
  67. echo '# Required-Start: $remote_fs $syslog' >> $file
  68. echo '# Required-Stop: $remote_fs $syslog' >> $file
  69. echo '# Default-Start: 2 3 4 5' >> $file
  70. echo '# Default-Stop: 0 1 6' >> $file
  71. echo '# Short-Description: Oracle 11g Express Edition' >> $file
  72. echo '### END INIT INFO' >> $file
  73. fi
  74. update-rc.d oracle-xe defaults 80 01
  75.  
  76. chmod 755 /sbin/chkconfig
  77.  
  78. sudo vim /etc/sysctl.d/60-oracle.conf
  79.  
  80. # Oracle 11g XE kernel parameters
  81. fs.file-max=6815744
  82. net.ipv4.ip_local_port_range=9000 65000
  83. kernel.sem=250 32000 100 128
  84. kernel.shmmax=536870912
  85. (Save the file)
  86. Note: kernel.shmmax = max possible value , e.g. size of physical RAM ( in bytes e.g. 512MB RAM == 512*1024*1024 == 536870912 bytes )
  87. Verify the change :
  88. sudo cat /etc/sysctl.d/60-oracle.conf
  89.  
  90. sudo service procps start
  91.  
  92. free -m
  93.  
  94. i) `ln -s /usr/bin/awk /bin/awk`
  95.  
  96. ii) `mkdir /var/lock/subsys`
  97.  
  98. iii) `touch /var/lock/subsys/listener`
  99.  
  100. A valid HTTP port for the Oracle Application Express (the default is 8080)
  101. A valid port for the Oracle database listener (the default is 1521)
  102. A password for the SYS and SYSTEM administrative user accounts
  103. Confirm password for SYS and SYSTEM administrative user accounts
  104. Whether you want the database to start automatically when the computer starts (next reboot).
  105.  
  106. export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
  107. export ORACLE_SID=XE
  108. export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
  109. export ORACLE_BASE=/u01/app/oracle
  110. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
  111. export PATH=$ORACLE_HOME/bin:$PATH
  112.  
  113. . ./.profile
  114.  
  115. sudo service oracle-xe start
  116.  
  117. The output should be similar to following :
  118. user@machine:~$ sudo service oracle-xe start
  119. Starting Oracle Net Listener.
  120. Starting Oracle Database 11g Express Edition instance.
  121. user@machine:~$
  122.  
  123. sqlplus sys as sysdba
  124.  
  125. SQL*Plus: Release 11.2.0.2.0 Production on Wed May 9 12:12:16 2012
  126.  
  127. Copyright (c) 1982, 2011, Oracle. All rights reserved.
  128.  
  129. Enter password:
  130.  
  131. Connected to:
  132. Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
  133.  
  134. SQL>
  135.  
  136. SQL> create user username identified by password;
  137.  
  138. User created.
  139.  
  140. SQL> grant connect,resource to username;
  141.  
  142. Grant succeeded.
  143.  
  144. user@machine:~$ sqlplus
  145.  
  146. SQL*Plus: Release 11.2.0.2.0 Production on Wed May 9 12:28:48 2012
  147.  
  148. Copyright (c) 1982, 2011, Oracle. All rights reserved.
  149.  
  150. Enter user-name: temp
  151. Enter password:
  152.  
  153. Connected to:
  154. Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
  155.  
  156. SQL> select 2+2 from dual;
  157. 2+2
  158. ----------
  159. 4
  160. SQL>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement