Installing Apache, Mysql, PHP, and PECL on Windows

Installing Apache, Mysql, PHP, and PECL on Windows

A P P E N D I X A ■ ■ ■ Installing Apache, MySQL, PHP, and PECL on Windows Throughout the book, we outlined methods of improving different web servers and database configurations but stopped short of outlining a step-by-step guide to installing these tools. This appendix will act as a reference to help you install the main technologies shown here: • Apache 2.2 • MySQL 5.0 • PHP 5.0 • PECL Installing Apache As of this writing, Apache has released version 2.2.x of its free web server. Using the web site http://httpd.apache.org, click the “Download! from a mirror” link on the left-hand side, as shown in Figure A–1. 209 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Figure A–1. Apache HTTP Server Project home page Select from one of the mirror sites shown in Figure A–2. Figure A–2. Apache Server Windows and Unix download links Windows users should download the Windows installer file, apache_2.2.x-win32-x86- no_ssl-r2.msi. Once the file has completely downloaded, open the installer. The initial window will be a security warning, and depending on your version of Windows, ignore it and click the Run button to get into the installation. The next window is the Apache setup window. For those of you that have a previous version of Apache installed, you might receive another pop-up asking you to remove the previous installation before you begin with the new one. If you do not want to upgrade, skip these steps dealing with Apache. For everyone else, click the Next button in the initial window, shown in Figure A–3. 210 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Figure A–3. Apache Installation Welcome window Now select “I accept the terms in the license agreement,” and click Next in the window shown in Figure A–4. Once you reach the next window, click the Next button again. Figure A–4. Apache Server Terms and Conditions window 211 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Soon we come to the window shown in Figure A–5. Here, we need to fill in all the fields. Since this will be a web server operating on our desktop, we can add in any network domain and server names into the “Network Domain” and “Server Name” fields respectively. I chose to enter “localhost” for both of those fields. For the “Administrator’s Email Address” field, enter your e-mail address, and click Next. Figure A–5. Apache Server Information Setup window Next we’re going to start installing the software, but we need to tell the Apache installation wizard where to install it. The window shown in Figure A–6 allows us to do just that. Click the Custom radio button, and then click Next. 212 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Figure A–6. Apache Setup Type window In this screen, shown in Figure A–7, we click the Change button. Figure A–7. Apache Custom Setup window 213 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS For ease of use throughout this book, I recommend you change the location of the installation directory to C:\Apache; of course, if you wish to save Apache in an alternative location, that’s fine, too. For future reference, remember that C:\Apache will be referred to as APACHE_HOME from here on out. Click OK and then click Next (see Figure A–8). Figure A–8. Apache Change Current Destination window Finally you’re at the last window. Click Install and watch it go. That’s all there is to it. We have successfully installed a web server on our computer. 214 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Post–Apache Installation If there were no errors during the installation of Apache, you should now see the Apache Monitor icon in your task bar, as shown in Figure A–9. Right-click it and click “Open Apache Monitor”. This is the tool that allows us to start and stop our web server. Figure A–9. Windows task icon for the Apache Monitor Let’s now make sure Apache is running on our computer. In order to do this, we need to call Apache from our web browser, so pull up your favorite web browser and type in the URL http://localhost. You should now see the Apache welcome home page, as shown in Figure A–10. If you have any issues and can’t see the page, look in the Apache error logs, located at APACHE_HOME/logs/error.log. Many times the problem can be found here and be easily taken care of by simply reading the errors saved to these files 215 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Figure A–10. Apache Server welcome web page Installing MySQL Installing MySQL is also straightforward. Head to the web site www.mysql.com, and download the latest software by clicking the Downloads(GA) link on the top menu bar. Once you reach the screen shown in Figure A–11, click the “MySQL Server” link in the left-hand menu bar. Figure A–11. MySQL Downloads home page You should be taken further down the page and should now scroll down until you reach a portion of the page that looks like Figure A–12. 216 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Figure A–12. Mysql Windows download links MySQL, like Apache, has given us the option to install the software in either Windows or Unix. Windows users should download the Windows installer, Windows ZIP/Setup.EXE (x86), and Unix users should download the appropriate installer for their Unix flavor by selecting “UNIX OS” from the drop-down menu. Once you select a package, you will be asked to log into your account. Click “No thanks, just take me to the downloads!” shown in Figure A–13, and a list of mirror links will be displayed. Select one of the mirror links, and start downloading. 217 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Figure A–13. Mysql Download Installer login window As soon as the download has completed, open the .zip file and run the setup file to start installing MySQL. On the initial welcome window, simply click Next. In the Setup Type window, we’re presented with the option of setting up a typical installation or a custom installation. Click the Custom radio button, and then click Next. This will allow us to install MySQL in a directory of our choice. As soon as the Custom Setup window is displayed, click Change and type in your MYSQL_HOME directory. For simplicity we will install our MySQL files under the location C:\mysql. Going forward in subsequent chapters, we will refer to this path as MYSQL_HOME. Click OK and then click Next. Once you reach the “Ready to Install the Program” window (Figure A–14), click Install and watch MySQL install. If you are prompted with additional screens, click Next. 218 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Figure A–14. MySQL Ready to Install window If there were no errors during the MySQL installation process, MySQL has been installed on our computer and a configuration window will pop up. Let’s go through the steps of configuring our instance of MySQL now. Configuring MySQL Configuring MySQL will only take a minute. On the initial first window, we click Next to start the configuration process (Figure A–15). 219 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Figure A–15. MySQL Config Welcome window In the window shown in Figure A–16, we will click the “Standard Configuration” button to speed up the process of configuration and then click Next. Figure A–16. MySQL Config Type window 220 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS In the next screen, we need to accept the default setting, “Install as Windows Service,” which is already selected for us (shown in Figure A–17), and click Next. Figure A–17. MySQL Config Windows Options window In one of the last windows we need to go through before completing the MySQL configuration process, we set up a password for our setup. Enter a password for all two of the fields, leaving “Modify Security Settings” checked, and then click Next (Figure A–18). Figure A–18. MySQL Config Security Options window 221 APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS Finally, click the Execute button, and watch the check marks come up. If the installation and configuration completed successfully, you will see a MySQL window with four check marks in the small bubbles, indicating there were no errors, as shown in Figure A–19. Congratulations—we’re done with the setup. Click Finish and relax. Figure A–19. MySQL Processing Config window Installing PHP The PHP installer can be downloaded at www.php.net. Again, like most of the downloads thus far, we have an option to download either a Unix installer or a Windows executable. In this case, if you are using a Windows environment, download the .zip file, not the Windows .exe installer. To find the .zip file, click the link for “Current PHP 5 Stable” on the right of the page under the Stable Releases header, and look for the .zip package under the Windows Binaries heading. Once you click that link, you will be presented with a list of mirrors to download from. Click the link for a mirror in your country to begin the download.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    35 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us