1.系统环境配置
配置中文支持
rpm -ivh fonts-chinese-3.02-12.el5.noarch.rpm
rpm -ivh fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
修改Hostname
1文件中的HOSTNAME,改为你希望的名字
2,/etc/hosts文件中,把所有原来机器名修改为新的机器名
清除原服务组件
1.kill所有nginx/php/mysql进程
2.删除服务组件所在目录
3.删除启动项,一般位于setup菜单中和/etc/rc.local文件中
2.服务组件安装
安装MySQL和PHP组件,这部分大同小异,参考张宴的文章《Nginx 0.7.x + PHP 5.2.10(FastCGI)搭建胜过Apache十倍的Web服务器(第5版)》
Tips:Screen
配置时。所在网络环境相当不稳定,经常发生掉线的情况。为避免掉线重新登陆,引起的正在编辑的文件被锁死的问题,建议用screen开启一个不掉线的会话。screnn的用法参考:http://www.ibm.com/developerworks/cn/linux/l-cn-screen/
3.服务组件配置调试
·PHP编译配置
PHP编译参数
‘./configure’ ‘–prefix=/usr/local/webserver/php’ ‘–with-config-file-path=/usr/local/webserver/php/etc’ ‘–with-mysql=/usr’ ‘–with-mysqli=/usr/bin/mysql_config’ ‘–with-iconv-dir=/usr/local’ ‘–with-freetype-dir’ ‘–with-jpeg-dir’ ‘–with-png-dir’ ‘–with-zlib’ ‘–with-libxml-dir=/usr’ ‘–enable-xml’ ‘–disable-rpath’ ‘–enable-discard-path’ ‘–enable-safe-mode’ ‘–enable-bcmath’ ‘–enable-shmop’ ‘–enable-sysvsem’ ‘–enable-inline-optimization’ ‘–with-curl’ ‘–with-curlwrappers’ ‘–enable-mbregex’ ‘–enable-fastcgi’ ‘–enable-fpm’ ‘–enable-force-cgi-redirect’ ‘–enable-mbstring’ ‘–with-mcrypt’ ‘–with-gd’ ‘–enable-gd-native-ttf’ ‘–with-openssl’ ‘–with-mhash’ ‘–enable-pcntl’ ‘–enable-sockets’ ‘–with-ldap’ ‘–with-ldap-sasl’ ‘–with-xmlrpc’ ‘–enable-zip’ ‘–enable-soap’ ‘–without-pear’
[PHP]编译过程中发生错误-1
configure: error: Cannot find MySQL header files under /usr
[PHP]缺少mysql的头文件,需安装以下依赖包
rpm -ivh MySQL-devel-4.1.12-1.i386.rpm
[PHP]编译过程中发生错误-2
error: mysql configure failed. Please check config.log for more information.
[PHP]64位系统,需指定以下环境变量
export LDFLAGS=-L/usr/lib64/mysql
·Zeus编译配置
[Zeus]Zeus使用中遇到问题,web端口已打开,访问测试页面却显示空白。
解决办法:Current Configuration -〉 Bind address 125.65.45.18
不使用Zeus自带的PHP,改用我们自己编译的新版本。
在Current Configuration -〉PHP置为Disable
在API Support->FastCGI
Configuring FastCGI Remote Responders
Adding a FastCGI Remote ResponderDirectory name: /usr/local/bin/php
Location: Machine name: localhost
Port: 8002
Additional methods supported?: none
在URL Handling->Handlers->Adding a Handler
File Extension: *.php
Specify the path and filename of the handler, relative to the document root: /usr/local/bin/php
HTTP 404 errors are handled by: The handler
在Zeus/rc.d目录下,新建一个S05php可执行脚本,s05php
运行rc.d/S05php start,初始化php.fcgi进程
在www目录下,放置phpinfo.php页面测试
<?phpinfo();?>
<!———————————————–Notice———————————————->
1.Zeus基于Web界面配置,切记在输入任何参数时,使用英文输入法。
2.
我的服务器,php经常出问题,头痛死了,还是喜欢我的ASP,呵呵
@qq空间代码
阁下PHP和ASP都会?
我又来支持博主了。呵呵。
我也来支持一下!