Monster Oasis
覺得累就是進步的開始!

2009/09/02

debian / ubuntu 裝 oracle instant client / sqlplus / oci8 / apache2 config / steps by steps

2010.0630 : 今天又再 debian 裝一次 發現, 這個版本沒辦法裝 oracle-instantclient11.2.* , 所以繼續用 instantclient11.1.*

Ubuntu 安裝 RPM 要用 alien …
sudo apt-get install alien

Ref. https://help.ubuntu.com/community/HowToBuildToraWithOracle

先去 http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html

download 這幾個 files (rpm)

Instant Client Package – Basic Lite
oracle-instantclient11.1-basiclite-11.1.0.7.0-1.i386.rpm

Instant Client Package – SQL*Plus
oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm

Instant Client Package – SDK
oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm

下 alien 指令安裝 rpm

alien -i oracle-instantclient11.1-basiclite-11.1.0.7.0-1.i386.rpm
alien -i oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
alien -i oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm

裝好後用 sqlplus 聯看看 , 因為我得到一個 lib error

所以我要裝 apt-get install libaio1

在 /etc/ld.so.conf.d 加一個檔 cat > /etc/ld.so.conf.d/oracle.conf

內容是 oracle lib 的 path /usr/lib/oracle/11.1/client/lib

然後

apt-get install php5

apt-get install php5-dev

因為 oci8 是由 pecl 來安裝的, 所以要 apt-get install php-pear

再來裝 oci8 : pecl install oci8

在 /etc/php5/conf.d 下建一個 oci8.ini 檔 , cat > /etc/php5/conf.d/oci8.ini 內容是

extension=oci8.so

重新啟動 apache2 :

service apache2 restart

看看 phpinfo 有沒有出現 oci8 等字樣就 ok 了

53420fcc8f6596bc2b6cd3511eae7d84
cebcda336140c38e51b889ec7f9319c3

加一個 virtual host :

在 /etc/apache2/sites-enabled 增加一個 xxx.conf 檔

CodeIgniter 需要用 rewrite module :

ls -sf /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled

Related URL:
  1. Protected: 觀察 22:40 – 23:15 apache log 的變化
  2. 解決用 NFS 當 documentroot 時會當掉的方法
  3. [ubuntu] apache server module 的 enable / disable
  4. apache Custom Log Formats – 好用的參數
  5. Simple Monster Tracking System – step by step
  6. Protected: apache mod_rewrite , rewrite , rewriterule 真難搞
  7. 好用的 iptables rules – 限制 client 連 http port 的次數
  8. Monster LAMP Pack Lite – ver.317
  9. 安裝 apache / mod_memcache
  10. Hypertext Transfer Protocol — HTTP/1.1 – 這可是現今最偉大的 protocol 呀!

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.


www.monster.com.tw , © Copyright 2008