Ubuntu telnet port 23 預設不開放 , 需使用 SSH telnet port 22(PuTTY or PieTTY)
如果Server環境無法連Internet , 則建立 proxy 讓 apt-get 可由Internet安裝及更新程式.
- Proxy server
- 申請proxy to internet服務
- 或-自行安裝 freeproxy for Windows
- edit Ubuntu /etc/apt/apt.conf
- cd /etc/apt
- sudo vim apt.conf
- press INS key
- Acquire::Http::Proxy "http://serverxx:x8080";
- ESC :wq
- sudo apt-get update <=執行看是否可成功自 Internet 取得資料更新
放大 swap file for Oracle-XE
- $ cd /
- $ sudo mkdir swap
- $ cd /swap
- $ sudo dd if=/dev/zero of=swapfile bs=1024 count=1048000
- $ sudo mkswap /swap/swapfile
- $ sudo swapon /swap/swapfile
- $ sudo vim /etc/fstab
/swap/swapfile swap swap defaults 0 0
So next time Linux comes up after reboot, it enables the new swap file for you automatically.
verify swap is activated or not? Simply use free command:
- $ free -m
Install FTP daemon
- $ sudo apt-get install vsftpd
- $ sudo vim /etc/vsftpd.conf <= 需修改後才能 upload
- write_enable=YES
- local_umask=022
- $ sudo /etc/init.d/vsftpd restart
- $ netstat -tul|grep ftp <= check ftp status
Install Oracle 10g XE
- ref: Installing Oracle Database XE on Debian, Ubuntu, and Kubuntu link
- $ sudo vim /etc/apt/sources.list 修改文字檔
- append string :
- deb http://oss.oracle.com/debian unstable main non-free
- < esc > : wq <= vim save & quit
- append string :
- $ cd /home/myaccount <= 需切回自己 home 目錄, 以存Key檔
- $ wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle
- 如 Ubuntu linux 經 proxy 無法正常存檔, 請用PC存檔再 ftp 上 Ubuntu server
- $ sudo apt-key add RPM-GPG-KEY-oracle
- $ sudo aptitude update
- $ sudo apt-get update
- $ wget -c http://oss.oracle.com/debian/dists/unstable/main/binary-i386/libaio_0.3.104-1_i386.deb http://oss.oracle.com/debian/dists/unstable/non-free/binary-i386/oracle-xe-universal_10.2.0.1-1.1_i386.deb <= 速度太慢, 另使用internet PC download
- if use ftp get file then use FTP send from PC to Ubuntu server
- $ sudo apt-get install bc
- $ sudo dpkg -i --force-architecture libaio_0.3.104-1_i386.deb
- $ sudo dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.1_i386.deb
- OR <= please check download file name
- sudo dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.0_i386.deb
- OR <= please check download file name
- $ sudo /etc/init.d/oracle-xe configure
- port: 8080 <=建議勿更動
- pwd for SYS and SYSTEM
修改 /etc/oratab
- $ vim /etc/oratab
安裝成功之後,還需要在設置相關的環境變量。
編輯 /etc/environment,添加如下幾行:
- ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
- LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
- TNS_ADMIN=/usr/lib/oracle
- PATH=$PATH:$ORACLE_HOME
- PATH=$PATH:$ORACLE_HOME/bin
- export PATH
Expand disk space on Ubuntu 10.04 (VMWare Guest) link
存檔後執行 $ source /etc/environment
- $ dpkg -l|grep oracle <= debiean package list & filter
- $ dpkg -r oracle-xe-universal <= remove package
Uninstall Oracle-Xe 包含 configre file
- $ apt-get remove --purge oracle-xe-universal
- $ sudo -i <= switch to root
- $ sudo reboot
- $ df <= 目錄使用率
- $ sudo du -hs <== check 目錄檔案size
- $ mount <== 查看 mount device
- $ more /etc/fstab <== The contains descriptions of filesystems that you mount often
Making Oracle Database XE Server Available to Remote Clients
- Click the Application menu (on Gnome) or the K menu (on KDE), then point to Oracle Database 10g Express Edition, and then Go To Database Home Page.
- In the Database Login page, log in as SYSTEM, enter the password, and then click Login.
- In the Oracle Database XE home page, click Administration.
- Under Tasks, click Manage HTTP Access.
- Under Manage HTTP Access, select Available from local server and remote clients.
- Click Apply Changes.
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
安裝 x-window desktop management GUI
- apt-get install x-window-system-core <= 安裝 X windows系統
- sudo apt-get install gdm <= 安裝 GNOME desktop
- sudo /etc/init.d/gdm start <= 啟動 GNOME desktop (只在Console看得到)
- $ /etc/init.d/oracle-xe start
- $ /etc/init.d/oracle-xe status
- $ $ORACLE_HOME/bin/sqlplus / as sysdba
- Enter user-name: SYS as sysdba
- Enter password:
- SQL> shutdown abort
- ORACLE instance shut down.
- SQL> startup
- ORACLE instance started.
- /etc/profile: 系統 all users 設置環境信息,當用戶第一次登錄時,該文件被執行.並從/etc/profile.d目錄的配置文件中蒐集shell的設置.
- /etc/bashrc:為每一個運行bash shell的用戶執行此文件.當bash shell被打開時,該文件被讀取.
- ~/.bash_profile:user專用於自己使用的shell信息,當用戶登錄時執行一次.
- ~/.bashrc:user bash shell的bash信息,當登錄時以及每次打開新的shell時,該文件被讀取.
- ~/.bash_logout:當每次退出系統(退出bash shell)時,執行該文件.
- ~/.bash_profile 是交互式、login 方式進入 bash 運行的
- ~/.bashrc 是交互式 non-login 方式進入 bash 運行的
APEX 4.0 升級完畢, 建立 schema XOZ 後, 需使用 sysdba 授權才能建 database link
- Grant create database link to XOZ ;
- select user from dual ;
- select * from user_role_privs;
- select * from user_sys_privs;
重裝 Oracle XE with APEX 2.1 , 再 upgrade to APEX 4.0.1
Remove Oracle-XE
- $ dpkg --list|grep oracle <= 查詢安裝套件名稱
- $ sudo dpkg --remove oracle-xe-universal
- $ sudo vim /etc/oratab <=將XE整行delete
- $ sudo dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.0_i386.deb
- $ sudo /etc/init.d/oracle-xe configure
- port: 8080 <=建議勿更動
- pwd for SYS and SYSTEM
- $ vim /etc/oratab <=find你的SID,将该行最后的N改为Y
- ftp & unzip to /home/somebody/apex401/apex
- cd /home/somebody/apex401/apex
- Run SQLPLUS
- SYS as sysdba
- $passwd$
- sql> @owa/owainst.sql <= run upgrate sql owa to 10.1.2.0.6
- sql> @apexins.sql SYSAUX SYSAUX TEMP /i/ <= run update sql
- Run sqlplus
- sql> @apxldimg.sql /home/somebody/apex401 <=run sql for images
- sql> @apxchpwd.sql <= run sql for initial ADMIN password
Starting use APEX 4.0.1
- Create Workspace 'XO'
- schema: ozdb/....
- admin: ADMIN/....
- Use SQLPLUS logon as SYSDBA
- SQL> grant create database link to ozdb; <=允許 schema ozdb 權限
* SQL> alter system set job_queue_processes=20; <= minimum 20 * SQL> alter system set shared_servers=5 scope=both;
PL/SQL API for LDAP ( DBMS_LDAP package )
* load the DBMS_LDAP package:
** SQL> CONNECT / AS SYSDBA
** SQL> @?/rdbms/admin/catldap.sql
沒有留言:
張貼留言