Plug in PHP 100 POWER SOLUTIONS- P11 ppt

5 325 0
Plug in PHP 100 POWER SOLUTIONS- P11 ppt

Đang tải... (xem toàn văn)

Thông tin tài liệu

16 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 16 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, the document root—the place where all your HTML and PHP files should be saved to make them visible to a web browser—is /var/www. If you find that you cannot edit or save files into it, you will need to modify the folder’s permission settings. Fedora, RHEL, and CentOS Linux To install Zend Server CE on one of these versions of Linux, the first thing you must do is set up the repository for downloading the package by entering the following lines into your favorite text editor, and then save it using the path and filename /etc/yum.repos.d/zend.repo: [Zend] name=Zend Server CE baseurl=http://repos.zend.com/zend-server/rpm/$basearch enabled=1 gpgcheck=0 [Zend_noarch] name=Zend Server CE - noarch baseurl=http://repos.zend.com/zend-server/rpm/noarch enabled=1 gpgcheck=0 Now you can use Yum, or any other tool that supports the RPM packaging format, to handle installations. So, to install the program, run the command: yum install zend-server-ce-php-5.2 Finally, to clean your package’s cache and ensure the retrieval of updates from the Web, run this command: yum clean all Installing MySQL To ensure you also have access to MySQL on the server, use Yum to install both the MySQL command-line tool and the server. You also need to enable and start the MySQL server and set the root password. To do all this, enter the following commands, replacing 'mypassword' with a password of your choice, and making sure you keep the quotation marks, or it won’t work: yum -y install mysql mysql-server /sbin/chkconfig mysqld on /sbin/service mysqld start mysqladmin -u root password 'mypassword' Uninstalling Should you encounter any problems or decide for any other reason to uninstall Zend Server CE, you can issue the following commands: zendctl.sh stop yum -y remove zend-server-ce-php-5.2 && yum -y remove 'rpm -qa|grep zend|xargs' 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 17 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 17 Document Root Your document root (the place to store all HTML and PHP files to make them visible to a web browser) is /var/www/html. You can verify that the install was successful by visiting http://localhost in your web browser and checking for a Zend success message page. Other Versions of Linux For all other versions of Linux, such as SUSE, you will need to download, extract, and install the installation tarball. Visit the following URL in your browser and download either the 32-bit or the 64-bit tarball for your setup: www.zend.com/en/products/server/downloads-all Once downloaded, you should have a file of about 65MB with a name similar to ZendServer-CE-php-5.2.10-4.0.5-linux-glibc23-i386.tar.gz, depending on the version downloaded. So, first you need to make sure you have root privileges and type: tar -xzvf ZendServer-CE-php-5.2.10-4.0.5-linux-glibc23-i386.tar.gz This will create a new folder in which the extracted files are stored. Change to that directory and start the installation by typing the following two lines: cd ZendServer-CE-php-5.2.10-4.0.5-linux-glibc23-i386 ./install.sh When prompted, accept the default of /usr/local for the installation path. Installing MySQL If you also need to install MySQL from a tarball, be aware that the installation has several parts to it, including unpacking and moving files, creating users and groups, configuring, initialization, permissions, and more. Therefore, it is beyond the scope of this book and I would instead refer you to an excellent online guide at www.devside.net/guides/linux/mysql. Uninstalling Should you encounter any problems, or decide for any other reason to uninstall the program, you can issue the following commands: /usr/local/zend/bin/zendctl.sh stop rm -rf /usr/local/zend Document Root Your document root (the place to store all HTML and PHP files to make them visible to a web browser) is /usr/local/zend/Apache2/htdocs. If you find you cannot edit or save files into it, you will need to modify the folder’s permission settings. You can verify that the install was successful by visiting http://localhost in your web browser and checking for a Zend success message page. 18 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 18 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 Mac OS X 10.4 Plus on Intel Chips To install Zend Server CE on a Mac powered by an Intel processor, visit the Zend web site at the following URL: www.zend.com/en/products/server/downloads-all Then select the Mac OS X DMG file for downloading (see Figure 1-21). The file you download will be about 140MB in size and will have a filename similar to ZendServer-CE-php-5.2.10-4.0.5-darwin8.6-i386.dmg, depending on the version. Once it has finished downloading, double-click the file to mount the disk image and you’ll see the ZendServer.pkg icon, which you should also double-click to start the installation (see Figure 1-22). At this point, you will be told a few things (which you should read) and asked a number of simple questions about the installation. Once you’ve responded to them, all you’ll be prompted for is your password (see Figure 1-23). Enter it and the installation will commence. FIGURE 1-21 Download the Zend Server disk image directly from the web site. 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 19 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 19 FIGURE 1-22 Double-click ZendServer.pkg to commence the package installation. FIGURE 1-23 After a series of prompts, questions, and answers, enter your password to begin installation. 20 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 20 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 By default, Zend Server CE Apache runs on port 10088 and is available at http:// localhost:10088/ in order to avoid collisions with any existing web server. To save having to append port numbers to your localhost URLs, I recommend you change this if you can. To do this, you need to call up the Terminal utility and enter the following three commands: sudo -i cd /usr/local/zend/apache2/conf nano httpd.conf If you are asked for your password by the sudo command, enter it. When the httpd.conf file has loaded into the text editor, use the cursor keys to scroll down about 40 lines or so until you get to the one that reads Listen 10088. Replace the 10088 with 80. Afterward, press CTRL-X, followed by Y, and then press RETURN to save the modified file (see Figure 1-24). Bear in mind that if you do this, you must also uninstall or otherwise disable any version of Apache you already have on your Mac. At the very least, turn it off by typing: apachectl stop Having done that, you will then need to restart the Zend Apache server by entering the following command: /usr/local/zend/apache2/bin/apachectl restart Document Root Your document root (the place to store all HTML and PHP files to make them visible to a web browser) is /usr/local/zend/Apache2/htdocs. If you find you cannot edit or save files into it, you will need to modify the folder’s permission settings. You can verify that the installation works correctly and the port used is 80 by entering http://localhost into your web browser. If all worked well, you’ll see the Zend Server Test Page. FIGURE 1-24 To restore its default port, change Apache to listen on port 80. . CentOS Linux To install Zend Server CE on one of these versions of Linux, the first thing you must do is set up the repository for downloading the package by entering the following lines into your. MySQL from a tarball, be aware that the installation has several parts to it, including unpacking and moving files, creating users and groups, configuring, initialization, permissions, and more ZendServer-CE -php- 5.2.10-4.0.5-linux-glibc23-i386 ./install.sh When prompted, accept the default of /usr/local for the installation path. Installing MySQL If you also need to install MySQL from

Ngày đăng: 07/07/2014, 08:20

Từ khóa liên quan

Mục lục

  • Contents

  • Acknowledgments

  • Introduction

  • 1 Building a Development Server

    • Windows XP, Windows Vista, and Windows 7

      • Reinstalling Zend Server CE

      • Upgrading Zend Server CE

      • Windows Security Alerts

      • After Installation

      • Uninstalling

      • Document Root

      • Ubuntu and Debian Linux

        • Uninstalling

        • After Installation

        • Document Root

        • Fedora, RHEL, and CentOS Linux

          • Installing MySQL

          • Uninstalling

          • Document Root

          • Other Versions of Linux

            • Installing MySQL

            • Uninstalling

            • Document Root

            • Mac OS X 10.4 Plus on Intel Chips

              • Document Root

              • Uninstalling

Tài liệu cùng người dùng

Tài liệu liên quan