搭建PHP開發環境,有的是自己安裝Apache、PHP,有的則是使用整合的軟體,最常見的比如AppServ。
而今Zend公司出品了Zend Server(其免費版叫做Zend Server CE),內部整合了Apache、PHP、Java Bridge、Zend Optimizer、Zend Guard Loader(使能夠運行使用Zend Guard加密的PHP程式)、Zend Data Cache、Zend Debugger、Zend Framework等,安裝時還可以選擇安裝phpmyadmin、mysql等,還可以使用它提供的管理工具(WEB形式的)來配置PHP,省得手工配置了。
安裝時可以選擇使用內建的Apache,或者使用現有的IIS,都是使用FastCGI方式來使用PHP。Zend Server同樣有Linux版本。
有了Zend Server (CE),以後安裝配置PHP環境就方便多了,不用再自己安裝配置Zend Optimizer、Zend Framework等東西了,尤其是內建了Java Bridge,這樣就可以方便地在PHP中使用Java類了,十分地方便。
Zend Server CE for Linux 的版本提供了DEB和rpm包的安裝,這樣就能快速的安裝,而不需要去編譯源碼.
眾所周知deb的包是提供給Debian和Ubuntu使用的,而RPM可以在CENTOS,FC,RHAS上使用.
我一直是Ubuntu的粉絲,理所當然的使用DEB包來安裝了.
好了.下邊是Zend Server CE for deb安裝的介紹.
Note:
This procedure requires root privileges.
To acquire root privileges in Ubuntu, run the following command and type your password:
$ sudo -s.
Automatically Installing Zend Server Community Edition
The following procedure describes how to run a script that will automatically create your DEB or RPM repositories and install Zend Server.
Download the package called "Linux x86 Installer (RPM/DEB Setup Script)" from zend.com - http://www.zend.com/products/server-ce/downloads
http://www.linuxidc.com/
Locate and extract the package:
ZendServer-X.X.X-RepositioryInstaller-linux.tar.gz
To change to the directory with the installer scripts run:
cd ZendServer-RepositoryInstaller-linux/
Depending on the PHP version, you want to use, run one of the following commands:
For Zend Server Community Edition with PHP 5.2 Support run:
install_zs.sh 5.2 ce
For Zend Server Community Edition with PHP 5.3 Support run:
install_zs.sh 5.3 ce
After installing, a completion notification will appear, with a notice that the servers have started.
To access the Administration Interface (Web) open your browser at: https://localhost:10082/ZendServer (secure) or http://localhost:10081/ZendServer.
Upon initial log in, you will be prompted to define your password.
Manually Installing Zend Server Community Edition
To install Zend Server Community Edition, the first thing you have to do is to setup the repository for downloading the Zend Server Community Edition package.
To setup the environment:
1.Define a repository by opening the following file: /etc/apt/sources.list and adding the line:
deb http://repos.zend.com/zend-server/deb server non-free
3. Add Zend's repository public key by running:
# wget http://repos.zend.com/zend.key -O- |apt-key add -
If you are using sudo to run each command the next command requires using sudo following the '|' (pipe) symbol as follows:
# wget http://repos.zend.com/zend.key -O- | sudo apt-key add -
4.To synchronize with Zend's repository run:
# aptitude update
Now you can use "aptitude" to handle the installations, upgrades and additional packages.
To install:
1.Once the repository is set up, run the appropriate command according to the product version and PHP support you require:
To install Zend Server Community Edition with PHP 5.2 run:
# aptitude install zend-server-ce-php-5.2
To install Zend Server Community Edition with PHP 5.3 run:
# aptitude install zend-server-ce-php-5.3
2.Each package locates and downloads all relevant packages from the web.
The actual installation will require your conformation.
After installing, a completion notification will appear, with a notice that the servers have started.
To access the Administration Interface (Web) open your browser at: https://localhost:10082/ZendServer (secure) or http://localhost:10081/ZendServer.
Upon initial log in, you will be prompted to define your password.