![]()
| 2010年6月 | ||||||
|---|---|---|---|---|---|---|
| 日 | 月 | 火 | 水 | 木 | 金 | 土 |
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||
![]()
![]()
![]()
![]()
![]()
![]()
ubuntu 2010.02.01 [ Mon ] 15:15
root@ubuntu:~# mkdir -p /opt/oracle
root@ubuntu:~# unzip \*.zip -d /opt/oracle
...
root@ubuntu:~# cd /opt/oracle
root@ubuntu:/opt/oracle# ln -s instantclient_10_2/ instantclient
root@ubuntu:/opt/oracle# cd instantclient
root@ubuntu:/opt/oracle/instantclient# ln -s libclntsh.so.10.1 libclntsh.so
root@ubuntu:/opt/oracle/instantclient# ln -s libocci.so.10.1 libocci.so
root@ubuntu:~# aptitude install php5 php5-cli php5-dev php-pear libaio1
root@ubuntu:~# pecl install oci8
downloading oci8-1.3.5.tgz ...
Starting to download oci8-1.3.5.tgz (137,987 bytes)
.............................done: 137,987 bytes
10 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
1. Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client : autodetect
>A> 1-1, 'all', 'abort', or Enter to continue: all
>B> Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] : instantclient,/opt/oracle/instantclient
1. Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client : instantclient,/opt/oracle/instantclient
1-1, 'all', 'abort', or Enter to continue:
building in /var/tmp/pear-build-root/oci8-1.3.5
running: /tmp/pear/cache/oci8-1.3.5/configure --with-oci8=instantclient,/opt/oracle/instantclient
...
(中略)
...
Build process completed successfully
Installing '/usr/lib/php5/20060613+lfs/oci8.so'
install ok: channel://pecl.php.net/oci8-1.3.5
configuration option "php_ini" is not set to php.ini location
You should add "extension=oci8.so" to php.ini
>A>の行で「all」root@ubuntu:~# echo extension=oci8.so >> /etc/php5/apache2/conf.d/oci8.ini
root@ubuntu:~# echo "export NLS_LANG=JAPANESE_JAPAN.AL32UTF8" >> /etc/apache2/envvars
※Oracle Database 10g Express Editionのデフォルトの文字コードはUTF-8です。root@ubuntu:/var/www# service apache2 restart
* Restarting web server apache2
...done.
root@ubuntu:~# echo '<?php phpinfo();?>' >> /var/www/phpinfo.php
ブラウザで /phpinfo.php にアクセスして oci8 の項目が表示されていればOKです。
トラックバック(0) コメント(0)
このブログ記事を参照しているブログ一覧: [ubuntu][apache][php][oracle]サーバー構築のメモ
このブログ記事に対するトラックバックURL:
http://www.sorich.jp/blog/mt-tb.cgi/603

コメントする