Installing Apache, MySQL, PHP and JSP on Windows XP

You can use the following article for a guide who wants to learn PHP + JSP from scratch. Of course, before learning coding, you must install this and that. So I hope this article is useful.

Tool Requirements:

  1. Apache Server + PHP + MySQL Server
    In this case, you can make AppServ 2.5.10, you can download it at http://www.AppServNetwork.com.
    I purposely suggested using this, because to make it easy to configure, and at the same time in this installer there are Apache, PHP, and MySQL packages.
  2. J2SE
    As I explained in the previous Java Introduction, J2SE is a floating Java Edition, supports database connectivity, user interface design, input / output, and network programming and is included as the basic packages of the Java language. J2SE na you can donglod at http://java.sun.com/javase/downloads/index.jsp You can choose whichever package. The packages currently available are JDK 6 + Java EE, JDK 6 + JavaFX and JDK 6 + NetBeans 6.1.7. Everyone already has J2SE inside. But I advise you to just one bundle, not the separate ones (for example, JRE, or JDK). The problem is that someday you will definitely need it, unless your company has been installed previously.
  3. Apache TomCat
    In the future, JSP serper na, you can download it at http://tomcat.apache.org/index.html You can use the latest edition na.
  4. Apache-TomCat Connector
    Intention to connect Apache Serper and TomCat which you will install. Donglod Module na at http://tomcat.apache.org/download-connectors.cgi. Scroll down your browser, look for Tomcat Connectors JK 1.2> Binary Release, click the win32> jk-1.2.28 folder, where there are many SO module files, select nyang mod_jk-1.2.28-httpd-2.2.3.so
  5. MySQL Connector / ODBC
    This connector helps in connecting mysql database using ODBC, it can be for desktop / web based applications. Donglod connector at http://dev.mysql.com/downloads/connector/odbc/, take nyang bwat Windows 32 na.
  6. MySQL Connector JAVA / JDBC
    Konektor ini khusus digunakan oleh JAVA dalam mengakses database MySQL, baik Desktop based maupun web based. Silahkan donlod file mysql-connector-java-5.1.7-bin.jar di http://dev.mysql.com/downloads/connector/j/5.1.html

Installation stage

  1. Instalasi Apache Server + PHP + MySQL Server
    Double click appserv-win32-2.5.10.exe which you already donglod, follow the na installation instructions.



    Specify the address of the apache server drive and storage folder. In this case I make D: dreserv

    Check all the services that we will need later.
    Fill in the server name and email na
    Type in MySQL Server password na, check InnoDB if needed.
    The installation process starts …
    Run Apache and MySQL services na. Then click Finish.
    Type url> http: // localhost / in the browser, if it appears like this, it means your server is active
  2. Install J2SE, Apache TomCat + JSP
    Double click the JDK package that you already donglod, ntu ….. the logon coffee brewed: D … Follow the installation instructions.






    Instalasi sukses! Klik finish.

    To ensure that java is installed correctly, open your Windows CMD, then type java-version, if the java version gets a response, it means that java is successfully installed on your system.


    Now, when we install Apache TomCat, so we can run JSP
    Double click the apache tomcat na installation package, follow the instructions.



    Use the Full Installation option.
    Here the location of the tomcat guide is under the previous apache server folder.
    Fill in the default port, username and password. For the port, I recommend using the 8080 port.
    JRE detection, because we have previously installed the JDK with the JRE inside, the installation will automatically detect the location of the JRE path.

    Installation process …
    Check Run Apache Tomcat to immediately run Apache Tomcat na service

    A moment later. the apache tomcta service is started. and you will see there is a try icon bwar monitor apache tomcat na.

    Please open url> http: // localhost: 8080 if you open it like this, it means your Apache Tomcat installation was successful, and we can already run web applications using JSP.
  3. Configuration Apache-TomCat Connector
    • Rename the mod_jk-1.2.28-httpd-2.2.3.so file to mod_jk.so, and copy it into the D: dreservApache2.2modules folder (adjust the location of your apache server folder earlier).
    • Open file D: /dreserv/Apache2.2/conf/httpd.conf (configuration apache server) and add the following line:
    • Include "D:/dreserv/Tomcat5.5/conf/auto/mod_jk.conf"
      
    • Open file D: /dreserv/Tomcat5.5/conf/server.xml and add the following line before the line:
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
      <Listener className="org.apache.jk.config.ApacheConfig"  modJk="D:/dreserv/Apache2.2/modules/mod_jk.so" />
      
    • Create a file called workers.properties in the folder D: /dreserv/Apache2.2/conf. Type the code below and save it.
      [logger]
      level=DEBUG
      file=D:/dreserv/Apache2.2/logs/jk2.log
      [config]
      file=D:/dreserv/Apache2.2/conf/workers.properties
      debug=0
      debugEnv=0
      [shm]
      file=D:/dreserv/Apache2.2/logs/jk2.shm
      size=1048576
      # socket channel
      [channel.socket:localhost:8009]
      port=8009
      host=127.0.0.1
      # worker for the connector
      [ajp13:localhost:8009]
      channel=channel.socket:localhost:8009
      [status:status]
      [uri:/status/*]
      worker=status:status
      [uri:/jsp-examples/*]
      worker=ajp13:localhost:8009
      [uri:/*.jsp]
      worker=ajp13:localhost:8009
      
    • Restart Tomcat na by right clicking on the tomcat monitor in the try icon, then selecting stop server, and selecting again by right clicking start server.
    • Automatically, after restarting tomcat, two new directories named auto and jk will be created in the D: dreservTomcat5.5conf folder. Where there will be a mod_jk.conf file in the auto na folder.
    • Finally, restart the apacher server, by clicking Start menu> AppServ> Control Server by Services> Apache Restart
    • When testing whether the connector is working, open again http: // localhost: 8080 and http: // locahost
      If two or two na appears, congratulations apache connector with tomcat is successful. To view na report, type http: //localhost/phpinfo.php
      There you can search for mod_jk.so, now is the module active right?
  4. Instalasi MySQL Connector / ODBC
    Double click na installer package, follow instructions.



  5. Configuration MySQL Connector JAVA / JDBC
    Copy mysql-connector-java-5.1.7-bin.jar into the JRE Library folder. In this case, my JRE is in the H: / dreserv / jre6 / lib / ext folder (keep it according to your previous JDK installation folder.
    Create CLASS PATH in My Computer – System – Data Environment:
    H: /dreserv/jre6/lib/ext/mysql-connector-java-5.0.4-bin.jar;% CLASSPATH%;
    Then click OK, until the window closes. Basically, you don’t need to restart, but if you want additional work: D just restart it then: D.
  6. All installation is complete … happy working with Apache server that supports PHP, JSP and MySQL.

37 thoughts on “Installing Apache, MySQL, PHP and JSP on Windows XP”

  1. thxsss banget pak…
    pak.. aku masih bingung…mw pilih java / .net
    katanya java becoming new cobol ???
    lalu kelemahan java itu banyak ???
    pilih yg mn ya??
    mohon pencerahanna….

    1. @dedy
      kalo dibandingkan antara java dengan .NET, guwe pasti pilih Java. Karena:
      1. Front End bagus menggunakan PHP, sdkgn backend bagus menggunakan Java
      2. Java memiliki kesamaan dalam konsep per-class an dengan PHP
      3. Java adalah opensource yang CrossPlatform (bisa di OS mana aja)
      4. Java memiliki banyak tim support sedunia, apa aja dan dimana aja bisa ditemukan solusi2 seperti thread, forum, dan tutorialnya banyak

  2. owh gtu ya..makasih ya
    kapan nhe tutorial photoshop yand baru dr.emi
    ku tunggu
    btw…
    aku masih 16 tahun,
    blom bsa di panggil mas-mas..
    hehe…

  3. jadi pingin nih blajar web dr.emi klau bisa downloadnya disini aja webnya dr.emi aplikasinya jadiin satu , bingung klau ambil satu2 saya masih blm paham .thx

    1. @gats
      mohon maaf download an nya ga bisa disimpen di hosting web dremi.info.
      selain size file2nya gede, juga ada baiknya download an diperoleh langsung dari vendor nya saja.
      siapa tau ada yang update/info baru tentang file2 download an nya 🙂
      terimakasih, selamat belajar 🙂

  4. thx doc, tutornya sangat membantu. btw, banner yg 125×125 dah saya buat. ada di side bar tukar link di sebelah kanan. mohon di cek. thx before….

  5. mas, saya tinggal 1 langkah saja, bikinnya CLASS PATH gmn? maksudnya my computer – system – data environmen gmn?
    gw binggung disini

  6. mas yang ini D:/dreserv/Tomcat5.5/conf/auto/mod_jk.conf kok g ada ya ?
    yang ada cman
    catalina folder
    dan yang lainnya adalah file (file mod_jk.conf g ad mas)

  7. Aku sama Santoz mas,
    ” Buat CLASS PATH di My Computer – System – Data Environment ” itu apa yg diclick ato apa kita lakukan?? Di My Computer mana ada System ama Data Environment??

  8. Thx b4..
    Trus klo aku mau masuk ke phpmyadmin lwt localhost koq dimintain user ama password ya?? itu diisi apa?? aku isi admin, itu koq gak isa ya??
    Makasih..

  9. @Otniel hehe, dulu emang yang nginstalnya siapa?
    kalo kamu pasti tau dong user+pass nya
    Tapi untuk defaultnya, saat menginstall:
    user: root
    pass: (kosong)

  10. mister saya sudah coba tutorialnya. tetapi saya instal dengan cara saya sendiri tidak seperti tutorial (d:/dserve) namun saya instal di C: dan beda folder antara appserv dan tomcat. ketika saya cek di phpinfo.php tidak muncul keterangan mod_jk nya. semua setting di tutorial sudah saya lakukan hanya saja berbeda folder. apakah pengaruh ya. sesungguhnya sangat membutuhkan tutorial ini hingga bisa konek database nya dan mampu menjalankan kedua server web nya

  11. @kangmas
    betul sekali, folder sangat mempengaruhi jalanna masing masing configurasi apache/tomcatnya. Khususnya pada Point No.3 Konfigurasi Apache-TomCat Connector
    Double check lokasi mod_jk, dll. Sesuiakan path path yang menghubungkan file2 confignya, dalam tutorial, perhatikan path utamanya yang perlu diganti/disesuaikan dengan path di komputer sndiri, yakni “D:/dreserv/”
    Selamat mencoba

  12. oh ya mister. satu lagi nih. tentang koneksi database nya. kalo di appserv nya mudah diketahui dan otomatis konek ke databasenya hanya dengan lihat http://localhost/phpmyadmin. nah masalahnya yang di tomcat bagaimana? bagaimana cara melihat mysql nya bisa konek dengan JSP na, ketika semua configurasi sudah dilakukan. mohon berikan penjelasana koneksi jsp dan mysql di lihat dari tomcat na. biar lebih lega lagi nih perasaan.. tetu mister

  13. @kangmas
    dengan konfigurasi diatas, database yang terlihat di PHPMYADMIN adalah database yang sama jika diakses oleh aplikasi JSP nya. jadi sebetulnya database MySQL nya satu, dan dipake oleh aplikasi PHP dan JSP. Yang membedakan adalah, perintah koneksi dari masing2 bahasa. Perintah koneksi di PHP tentu saja berbeda dengan di JSP.

  14. hatur nuhun sadayana mister.ternyata menarik sekali pengalaman configurasi dua server satu database. sebetulnya sudah lama saya coba instal dari versi lama dan hasilnya nihil. databasenya tidak bisa terkoneksi sama sekali dengan JSP. ternyata saya instal dua mysql dan gak jelas yang mana yang harus dijalankan. dengan tutorial ini jadi semakin mengerti dan mudah implemenstasina. lain waktu boleh maen ke tubagus ismail ya mister. pernah lima bulan kos disitu lo mister. hehehe. kiranya satu lagi mungkin bisa dijelaskan apa bedanya kalau pakai java J2SDK 1.4.2 dengan makai JSE versi yang baru ada di tutorial ?

  15. Mas,,
    kalo databasenya pake Ms Access, konfigurasinya gmn lagi ya???
    Tolong Mas,,
    ini bwat tugas bso slasa c… T~T
    HELP…HELP…

  16. mas terima kasih buat tutorialnya, dah aq coba tp bingung di tahap yang ke 3, yang ngerubah file httpd.conf dan server.xml..bisa tolong di perjelas lg ga mas?aq pake tomcat 7.0. kirim ke email jg ya mas cara2 nya..terima kasih..

Leave a Reply

Your email address will not be published. Required fields are marked *