国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 服務(wù)器 > Web服務(wù)器 > 正文

LAOP 安裝全過程

2024-09-01 13:42:33
字體:
供稿:網(wǎng)友
呵呵,純粹玩笑,僅供自己備忘。“老婆”是指LAOP,也就是Linux+Apache+Oracle+PHP,我們公司的開發(fā)應(yīng)用環(huán)境。
 
因為接觸后覺得比別的Linux配置和使用起來更簡潔方便,所以Linux我選了Ubuntu 6.10 Server,用于公司已經(jīng)有現(xiàn)成的Oracle數(shù)據(jù)庫服務(wù)器了,所以只安裝了Oracle XE client。下面是實戰(zhàn)過程記錄:
 
一、基本安裝
 
進(jìn)行Ubuntu 6.10 server和Apache、PHP等的安裝,懶點的可以在安裝Ubuntu時候選擇裝好LAMP。具體安裝過程可以參考http://www.ubuntu.org.cn上的文檔,這里我也不再嘮叨了。
 
二、安裝Oracle XE client
 
以能夠使用sudo的普通用戶登陸并編輯apt源列表文件
 

sudo vi /etc/apt/sources.list

在sources.list文件中加入下面行

deb http://oss.oracle.com/debian unstable main non-free

存盤退出并執(zhí)行下面命令:

sudo groupadd oracle; sudo groupadd dba

sudo useradd -d /home/oracle -g oracle -G dba -m -s /bin/bash oracle

sudo apt-get update

sudo apt-get install bc libaio

sudo apt-get install oracle-xe-client

安裝好oracle-xe-client后,oracle用戶還需配置一下各種環(huán)境參數(shù),可以利用

/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh

進(jìn)行設(shè)置或者直接把環(huán)境參數(shù)添加到自己的.bash_profile文件中去。

在安裝完client后,應(yīng)運行sqlplus連接Oracle數(shù)據(jù)庫來驗證一下client安裝的正確與否。

三、安裝PHP oci8 extension

還是以能夠使用sudo的普通用戶身份運行下面命令:

sudo apt-get install build-essential

sudo apt-get install php5-dev php-pear

sudo pecl install oci8

在下列提示后輸入$ORACLE_HOME的實際路徑(我自己的是/usr/lib/oracle/xe/app/oracle/product/10.2.0/client):

sail@ubuntu:~$ sudo pecl install oci8

downloading oci8-1.2.2.tgz ...

Starting to download oci8-1.2.2.tgz (71,806 bytes) .................done: 71,806 bytes

10 source files, building

running: phpize

Configuring for:

PHP Api Version: 20041225

Zend Module Api No: 20050922

Zend Extension Api No: 220051025

Please provide the path to ORACLE_HOME dir. Use 'instantclient,/path/to/instant/client/lib' if you're compiling against Oracle Instant Client [autodetect] :

在系統(tǒng)編譯安裝好以后,應(yīng)該在/usr/lib/php5/20051025(我的php是5.1.6版本的)目錄下有一個oci8.so文件。之后執(zhí)行命令:

sudo vi /etc/php5/apache2/php.ini

在相應(yīng)位置加上

extension=oci8.so

存盤退出后重啟apache2

sudo /etc/init.d/apache2 restart

現(xiàn)在,我們的“老婆”就大功告成了!用瀏覽器來驗證一下吧!

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 闽清县| 扎囊县| 南昌县| 中卫市| 卢湾区| 龙井市| 惠安县| 尉氏县| 盐亭县| 黔西县| 宁强县| 鹤庆县| 景洪市| 峨眉山市| 陇川县| 德化县| 仁寿县| 平舆县| 澎湖县| 宜城市| 徐汇区| 桓台县| 托里县| 大安市| 北流市| 上思县| 壶关县| 黑山县| 高密市| 阿巴嘎旗| 郎溪县| 四子王旗| 万年县| 孝感市| 武川县| 泸西县| 文昌市| 昂仁县| 行唐县| 汉沽区| 静乐县|