免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 859 | 回复: 0
打印 上一主题 下一主题

“老婆”安装记 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-12-20 21:39 |只看该作者 |倒序浏览
呵呵,纯粹玩笑,仅供自己备忘。“老婆”是指LAOP,也就是Linux+Apache+Oracle+PHP,我们公司的开发应用环境。

因为接触后觉得比别的Linux配置和使用起来更简洁方便,所以Linux我选了Ubuntu 6.10 Server,用于公司已经有现成的Oracle数据库服务器了,所以只安装了Oracle XE client。下面是实战过程记录:

一、基本安装

进行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
存盘退出并执行下面命令:
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用户还需配置一下各种环境参数,可以利用
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh
进行设置或者直接把环境参数添加到自己的.bash_profile文件中去。
在安装完client后,应运行sqlplus连接Oracle数据库来验证一下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] :
在系统编译安装好以后,应该在/usr/lib/php5/20051025(我的php是5.1.6版本的)目录下有一个oci8.so文件。之后执行命令:
sudo vi /etc/php5/apache2/php.ini
在相应位置加上
extension=oci8.so
存盘退出后重启apache2
sudo /etc/init.d/apache2 restart
现在,我们的“老婆”就大功告成了!用浏览器来验证一下吧!


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/3577/showart_218815.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP