Artikel ini memuat cara membuat instalasi otomatis PHP5 for Win32 dengan webserver Apache2.2 untuk menyambung artikel sebelumnya, Unattended Apache 2.2 Installer for Win32
Requirements:
- PHP5 for Win32, dalam contoh ini php-5.2.5-win32-installer.msi
- Apache2.2 yang sudah terinstall dengan benar
- Teks editor
Install
1. Buat file teks dengan nama “install.bat”
2. Edit dengan teks editor, tambahkan baris berikut:
@echo off
msiexec /i php-5.2.5-win32-installer.msi /passive INSTALLDIR="C:\Program Files\PHP\" WEBSERVERPICKER="apache22" ADDLOCAL="MainExecutable,MainProgram,Complete,WebServers,apache22,PEAR,extras,Manual,Extensions,ext_php_gd2,ext_php_mbstring,ext_php_mssql,ext_php_mysql,ext_php_pgsql,ext_php_sqlite,ext_php_timezonedb,ext_php_xmlrpc" REMOVE="apache13,apache20,apacheCGI,iis4ISAPI,iis4CGI,nsapi,xitami,sambar,cgi,noconfig" APACHEDIR="C:\Program Files\Apache Software Foundation\Apache2.2\conf\" SECONDSEQUENCE="1"
3. Simpan, kemudian jalankan file batch tersebut.
Uninstall
1. Buat file teks dengan nama “uninstall.bat”
2. Edit dengan teks editor, tambahkan baris berikut:
@echo off
msiexec /uninstall php-5.2.5-win32-installer.msi /passive
3. Simpan, kemudian jalankan file batch tersebut.
Catatan:
- Modul yang ikut diinstall: GD2, MBSTRING, MSSQL, MYSQL, PGSQL, SQLITE, TIMEZONEDB, XMLRPC
- Untuk menambah modul lain, silakan baca dokumentasi PHP5
Technorati Tags: php5, apache2, unattended
