Home > Backend Development > PHP Tutorial > Installation and configuration of Apache+PHP+Zend_PHP tutorial

Installation and configuration of Apache+PHP+Zend_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:19:10
Original
992 people have browsed it

我的桌面平台是Leopard,使用Linux也只是限于使用服务器。第一篇文章不知道写什么好,搜索了一下LDCN好像没有APZ[apache + PHP + Zend]的配置文章,今天就写这个吧。希望对服务器搭建初学者有用!

Apache是一种开放源码的Http服务器,可以在大多数计算机操作系统中运行,由于其多平台性与安全性使其非常流行。它快速、可靠、安全,并可以通过简单的API进行扩展。它的地址是http://httpd.apache.org/

PHP的全名为Hypertext Preprocessor,它是被广泛运用在网页程序开发的语言,尤其是它能适用于网页程序的开发以及能够嵌入HTML文件之中,它的语法和C、Java以及Perl等语法相似,使得它学习起来更容易上手。它的地址是http://www.php.net/

Zend是一个类似于编译器的PHP编译器,用它写的程序必须通过服务器上的Zend模块进行翻译。这样做有两个好处,一是编译过程中对程序代码进行优化处理,使得PHP的运行效率更高。二是通过Zend可以简单的将你编写的PHP代码进行加密如果你不打算与人分享的话)。它的服务器模块是Zend Optimizer,它的地址是http://www.zend.com/en/products/guard/downloads

首先上它们各自的网站下载最新版本并将它们上传到服务器上,然后通过Terminal登陆到服务器上传文件的目录下按以下方法进行安装:

tar zxvf httpd-x.x.xx.tar.gz

[这条命令是用来解压缩Apache,解压之后会生成httpd-x.x.xxx目录]

cd httpd-x.x.xx

[这条命令是进入httpd-x.x.xx目录]

./configure --prefix=安装目录 --enable-so --enable-rewrite

[--enable-rewrite是可选参数,不需要可去掉]

make

[编译代码]

make install

[开始安装]

完成之后继续安装PHP5

tar zxvf php-x.x.x.tar.gz

[这条命令是用来解压缩PHP,解压之后会生成php-x.x.x目录]

cd php-x.x.x

[这条命令是进入php-x.x.x目录]

./configure --with-apxs2=apache的安装目录/bin/apxs --with-mysql --with-gd --with-jpeg-dir --with-zlib --enable-track-vars --enable-memory-limit=yes --enable-debug=no --enable-ftp=yes --with-config-file-path=php.ini文件所在的目录 --with-iconv --enable-mbstring=cn --enable-gd-native-ttf --with-ttf --with-freetype-dir --with-tidy

[这是配置编译参数,Apache安装目录可以自定义,php.ini可以放置在任何目录,如果不做选择的话默认会在/etc目录下。iconv、mbstring和ttf是必选项,否则将不能使用iNewS4的部分功能!]

make
make install

[After configuring the compilation parameters, you can execute these two commands to install. After the installation is complete, copy php.ini-dist to the directory you just entered when configuring the parameters, and rename it to php.ini ]

Finally let’s install Zend

tar zxvf ZendOptimizer-xx.x.x-linux-glibc21-i386.tar.gz

[Unzip Zend and the ZendOptimizer directory will be generated]

cd ZendOptimizer-xx.x.x-linux-glibc21-i386

[Enter ZendOptimizer directory]

./install

[Perform the installation. The installation process will ask you to enter the locations of Apache and php.ini. After the installation is complete, Zend will automatically restart Apache to start the Zend module]

Now the APZ installation is complete!

Due to limited space, and there are too many places to write about Apache2 and MySQL. So I plan to write the configurations of Apache2 and MySQL separately! These two articles are expected to be completed within a week:)

Thanks for the contribution from Linux Desktop Chinese Network: Apache + PHP + Zend installation and configuration .

  1. LAMP website development golden combination Linux+Apache+MySQL+PHP
  1. Record of the whole process of PHP project development
  1. New installation of Apache2, PHP5, MYSQL5, Zend under Win XP

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/589413.htmlTechArticleMy desktop platform is Leopard, and the use of Linux is limited to the server. I don’t know what to write in this first article. I searched LDCN and it seems that there is no configuration article for APZ [apache + PHP + Zend]...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template