Di saat yang bersamaan, web serve, php ini harus pula mendukung tool yang bernama json. menurut situs officialnya, json itu adalah ...
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.
Lengkapnya mengenai json, bisa dilihat di link berikut :
http://www.json.org/
untuk install nya, langkah-langkah install apache saya rasa tidak perlu lagi di bahas. Namun untuk install php dan oracle yang akan dibahas kali ini.
1 Menyiapkan instalasi oracle
Download paket oraclenya, di
.
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
Jika sudah mempunyai oracle server, maka yang kita butuhkan adalah oracleclientnya saja, sehingga tidak perlu install oracle server.
adapun paket oracle yang dibutuhkan antara lain :
oracle-instantclient-basic-11.1.0.1-1.i386.rpm
oracle-instantclient-devel-11.1.0.1-1.i386.rpm
oracle-instantclient-sqlplus-11.1.0.1-1.i386.rpm
2. Ketiga paket itu kita install terlebih dulu
yum install oracle-instantclient-*
3. Edit /etc/profile tujuannya agar informasi oracle dapat diambil oleh system
#for Oracle Client
export ORACLE_HOME=/usr/lib/oracle/11.1.0.1/client
export LD_LIBRARY_PATH=$ORACLE_HOME:$ORACLE_HOME/lib:${LD_LIBRARY_PATH}
export TNS_ADMIN=$ORACLE_HOME
export PATH=$PATH:$SQLPATH
4. Setelah itu kita kompile ulang lagi aja php nya
./configure --prefix=/server/php --bindir=/usr/bin/ --sbindir=/usr/sbin/ --sysconfdir=/etc/php --with-apxs2=/usr/sbin/apxs --with-mod_charset --enable-force-cgi-redirect --with-config-file-path=/etc/php --with-config-file-scan-dir=/etc/php --enable-safe-mode --enable-magic-quotes --enable-libgcc --with-libxml-dir=/usr --enable-bcmath --with-bz2 --enable-calendar --with-jpeg-dir=/ --with-tiff-dir=/ --with-curlwrappers --enable-dio --enable-exif --with-fam --enable-filepro --enable-ftp --with-gd=/usr/ --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-gettext --enable-mbstring --disable-mbregex --with-mime-magic --with-ncurses=/ --with-pspell --enable-shmop --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-yp --enable-maintainer-zts --enable-memory-limit --enable-zend-multibyte --enable-shared --with-gnu-ld --with-pic -with-oci8=shared,instantclient
make && make install
5. Panggil oci8.so di /etc/php/php.ini selain itu, jika kita belum membuat extension directory, kita buat juga, dengan menambahkan baris berikut
extension_dir="/server/php/lib/php/extensions"
extension=oci8.so
6. Restart apache
7. cek di php info , oci sudah terload atau belum
8. Install json
pecl install json
9. Tambahkan extensionnya di php.ini, kemudian restart apache
extension=json.so
10. Cek apakah json sudah terinstall atau belum




0 comments:
Poskan Komentar