C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 11 C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 11 reinstalling or upgrading, you’ll simply be asked to confirm the previous password you created. You can also enter your e-mail address if you’d like to receive the Zend newsletter. CAUTION If you will be forwarding HTTP requests from the Internet to your server (not recommended permanently but useful for granting a colleague temporary access to a project in progress), then it’s particularly important that you choose a very secure password. Now you are set up and ready to go, and the screen shown in Figure 1-15 will display in your browser. From this screen you can control various aspects of your Zend Server CE installation. You can verify that everything is working correctly by entering http://localhost into your web browser. The result should look like Figure 1-16. Uninstalling To uninstall Zend Server CE, from the Start Menu select All Programs | Zend Server Community Edition | Uninstall Zend Server. FIGURE 1-15 After installation, your browser will open up a control window for Zend Server CE. 12 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s 12 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s Document Root By default, your document root (the place where all your HTML and PHP files should be stored) is c:\Program Files\Zend\Apache2\htdocs. If you find that you cannot edit or save files into it, you will need to modify the folder’s permission settings. You may find it convenient to create a shortcut to this folder by navigating to it, right clicking (and holding) on the htdocs folder, and dragging it to the Desktop. Once you release the mouse button, you can then select Create Shortcuts Here. Ubuntu and Debian Linux On Ubuntu or Debian Linux, you will need to install the MySQL program separately if you don’t have it already. It’s very easy to do because it uses Aptitude, a front end to the Advanced Packaging Tool (APT) system. FIGURE 1-16 Everything installed correctly if you can see this page when you enter http://localhost. C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 13 C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 13 Just open up the Terminal by selecting Applications | Accessories | Terminal and entering the following two commands, the first of which ensures you are running as root, while the second installs the server. If you are prompted for your password, enter it. At the end of the installation, you may be prompted to enter a root password as in Figure 1-17, which, like all the following Linux screen grabs, is from Ubuntu Linux. sudo -i apt-get install mysql-server You are now ready to install Zend Server CE itself. The process takes a few commands to set up because you must follow several steps. First, staying in the Terminal window , you need to change to the /etc/apt folder and then edit the file sources.list by typing the following (assuming you are still logged in as root after installing MySQL): cd /etc/apt nano sources.list TIP If you are using Debian Linux rather than Ubuntu, and Nano is not your default text editor, you should alter the second line of the preceding code according to the editor you use. Or you can install Nano first by entering the command: apt-get install nano. FIGURE 1-17 It’s recommended you enter a password for the MySQL root user. 14 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s 14 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s Once the file is open, scroll down and add the following line to the end of the file so it looks like Figure 1-18. When done, press CTRL-X, followed by Y and then press RETURN to save the modified file: deb http://repos.zend.com/zend-server/deb server non-free Now you must fetch Zend’s repository public key so the installation file can be verified once downloaded and, having set up these various items, you should also update Aptitude. So, enter the following two commands, noting that the option in the middle, which looks like -O-, is an uppercase letter O sandwiched between two minus signs, or dashes: wget http://repos.zend.com/deb/zend.key -O- |apt-key add - aptitude update Finally, you are ready to install Zend Server CE itself with the following command (see Figure 1-19): aptitude install zend-server-ce-php-5.2 Uninstalling Should you encounter any problems, or decide for any other reason to uninstall the program, you can issue the following command: aptitude remove '~nzend.*-ce' FIGURE 1-18 Using Nano to add a new line to sources.list C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 15 C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 15 After Installation The last thing you need to do in order to verify whether Zend Server CE has actually installed correctly is to test out the web server by entering the URL http://localhost into your browser. If everything is correct, you should get a terse message similar to the one in Figure 1-20. You can now enter the Admin interface by entering http://localhost:10081 into your browser. FIGURE 1-19 The installation of Zend Server CE is successful. FIGURE 1-20 Enter http://localhost into your browser to ensure that the web server is running. . file sources.list by typing the following (assuming you are still logged in as root after installing MySQL): cd /etc/apt nano sources.list TIP If you are using Debian Linux rather than Ubuntu,. up the Terminal by selecting Applications | Accessories | Terminal and entering the following two commands, the first of which ensures you are running as root, while the second installs the. browser. If everything is correct, you should get a terse message similar to the one in Figure 1-20. You can now enter the Admin interface by entering http://localhost :1008 1 into your browser. FIGURE