Page 52 - Beginning PHP 5.3
P. 52

Part I: Getting Up and Running with  PHP
                      5.       Click the Apply button in Synaptic ’ s toolbar, then in the Summary dialog box that appears, click
                       Apply. Synaptic grabs all the needed packages from the Web and installs them for you. Along
                       the way, you ’ ll probably be prompted to enter a password for the MySQL  “ root ”  user; simply
                       enter a password, then enter it again when prompted. If all goes well you ’ ll eventually see a
                       Changes Applied dialog box appear; click the Close button in this dialog box to finish the
                       installation.
                      6.       At this point, you need to start the Apache Web server. To do this, choose System     Administra-
                       tion    Services, then click the Unlock button at the bottom of the Services Settings dialog box

                       and enter your password. Now scroll down to the  “ Web server (apache2) ”  option, and select its
                       checkbox to start it, as shown in Figure  2-3 . (If it ’ s already started, it ’ s a good idea to click the
                       checkbox once to stop it, then click it again to restart it.)
























                                       Figure 2-3


                   That ’ s it! You should now have a working Apache Web server with PHP and MySQL installed. Skip to
                 the  “ Testing Your Installation ”  section to make sure everything ’ s working OK.

                      The packages you ’ ve installed give you a basic PHP installation with the functionality needed to follow
                    the contents of this book. However, you can use Synaptic to install extra PHP packages (or remove pack-
                    ages) just as easily at any time.

                   In fact, as of Ubuntu 7.04, there ’ s an even easier way to install Apache, PHP and MySQL in one go.

                 Simply open up a terminal window (Applications   Accessories    Terminal), then type:


                      sudo tasksel install lamp - server
                 and press Enter. This installs all the packages needed to have a fully functioning LAMP (Linux, Apache,
                 MySQL, PHP) Web server. You’ll be prompted to choose a root password for MySQL during the
                 installation, but apart from that, the process is fully automated. Again, you’ll probably need to restart the
                 Web server after installation, as shown in Step 6 in the preceding list. And who said Linux was hard!




              14





                                                                                                      9/21/09   8:50:19 AM
          c02.indd   14                                                                               9/21/09   8:50:19 AM
          c02.indd   14
   47   48   49   50   51   52   53   54   55   56   57