答案:【apache安装】复制代码 代码如下:
httpd.exe -k install -n "apache2.2.15"
httpd.exe -k start -n "apache2.2.15"
【apache卸载】复制代码 代码如下:
httpd.exe -k stop -n "apache2.2.15"
httpd.exe -k uninstall -n "apache2.2.15"
【httpd.conf配置关键】复制代码 代码如下:
ServerRoot "D:/APM/Apache2.2.15"
Listen 80
# 压缩发送给客户端的内容 gzip支持
#LoadModule deflate_module modules/mod_deflate.so
# LoadModule cgi_module modules/mod_cgi.so
# fastcgi
LoadModule fcgid_module modules/mod_fcgid.so
LoadModule rewrite_module modules/mod_rewrite.so
DocumentRoot "D:/APM/Apache2.2.15/htdocs"
# 支持 php 脚本
# fastcgi模式将此行注释
# 直接在虚拟主机中可配置每个站点使用不同版本的php 或者不同的cgi
#Include conf/extra/httpd-php.conf
# Fancy directory listings 华丽的目录清单
Include conf/extra/httpd-autoindex.conf
# Virtual hosts 虚拟主机
#Include conf/extra/httpd-vhosts.conf
# fastcgi模式虚拟主机
Include conf/extra/httpd-vhosts-fcgid.conf
# Various default settings 页脚显示版本信息AccessFileName .htaccess
Include conf/extra/httpd-default.conf
【httpd-php.conf参考】复制代码 代码如下:
#
# 查找 /APM/php-5.2.12-Win32 替换
#
SetEnv PHPRC "/APM/php-5.2.12-Win32"
SetEnv TMP "/tmp"
# UnsetEnv PERL5LIB
# 加载dll省去在PATH中添加php路径
#LoadFile "/APM/php-5.2.12-Win32/libpq.dll"
LoadFile "/APM/php-5.2.12-Win32/libmysql.dll"
LoadFile "/APM/php-5.2.12-Win32/libmcrypt.dll"
LoadFile "/APM/php-5.2.12-Win32/libmhash.dll"
LoadFile "/APM/php-5.2.12-Win32/libeay32.dll"
LoadFile /APM/php-5.2.12-Win32/ssleay32.dll
#
# PHP-Module setup
#
LoadFile "/APM/php-5.2.12-Win32/php5ts.dll"
LoadModule php5_module "/APM/php-5.2.12-Win32/php5apache2_2.dll"
SetHandler application/x-httpd-php
SetHandler application/x-httpd-php-source
# Load php.ini File Dir
PHPIniDir "/APM/php-5.2.12-Win32"
AddType text/html .php .phps
【httpd-vhosts.conf参考】复制代码 代码如下:
NameVirtualHost *:80
#文档目录
DocumentRoot "/vhosts/localhost"
#名字 如www.php.net
ServerName localhost
#别名 如php.net
ServerAlias 127.0.0.1
#错误日志文件
ErrorLog "logs/dummy-host.localhost-error_log"
#目录访问规则
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
#目录索引文件
DirectoryIndex index.html index.htm index.php
[html]
【httpd-vhosts-fcgid.conf参考】
[code]
#FcgidInitialEnv PHPRC "/APM/php5210"
#FcgidInitialEnv PATH "/APM/php5210;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
#FcgidInitialEnv SystemRoot "C:/Windows"
#FcgidInitialEnv SystemDrive "C:"
#FcgidInitialEnv TEMP "C:/WINDOWS/Temp"
#FcgidInitialEnv TMP "C:/WINDOWS/Temp"
#FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 64
FcgidConnectTimeout 16
FcgidMaxRequestsPerProcess 500
NameVirtualHost *:80
DocumentRoot "/vhosts/localhost"
ServerName localhost
ServerAlias 127.0.0.1
ErrorLog "logs/dummy-host.localhost-error_log"
Options Indexes FollowSymLinks ExecCGI
#Options +ExecCGI
AllowOverride All
#AddHandler fcgid-script .php
#FCGIWrapper /APM/php5210/php-cgi.exe .php
#"
AddHandler fcgid-script .php
FcgidWrapper "/APM/php-5.2.13-nts-Win32/php-cgi.exe" .php
#FcgidWrapper "/APM/php-5.3.2-nts-Win32-VC6-x86/php-cgi.exe" .php
#
Order allow,deny
Allow from all
DirectoryIndex index.html index.htm index.php
【Mysql安装】复制代码 代码如下:
mysqld-nt.exe --install MySQL5.0.45-community-nt --defaults-file=D:\APM\mysql5.0.45\my.ini
net start MySQL5.0.45-community-nt
【Mysql卸载】复制代码 代码如下:
net stop MySQL5.0.45-community-nt
mysqld-nt.exe --remove MySQL5.0.45-community-nt
【my.ini参考】复制代码 代码如下:
[mysqld]
basedir="D:\APM\mysql5.0.45\"
datadir="D:\APM\mysql5.0.45\Data\"
tmpdir="D:\APM\mysql5.0.45\tmp\"
# log="D:\APM\mysql5.0.45\tmp\mysql.log"
default-character-set=utf8
port=3306
interactive_timeout=5
wait_timeout=5
skip-locking
skip-innodb
skip-bdb
ft_min_word_len=1
[mysqld]
port=3306
basedir="D:/mysql/"
datadir="D:/mysql/Data/"
tmpdir="d:/mysql/tmp/"
default-character-set=utf8
default-storage-engine=MYISAM
skip-bdb
skip-innodb
skip-locking
key_buffer=16M
max_allowed_packet=1M
table_cache=128
thread_cache=8
join_buffer_size=512K
sort_buffer=512K
record_buffer=512K
max_connections=500
wait_timeout=120
interactive_timeout=120
max_connect_errors=3000
long_query_time=1
max_heap_table_size=16M
tmp_table_size=8M
thread_concurrency=8
myisam_sort_buffer_size=8M
myisam_sort_buffer_size=4M
low_priority_updates=1
ft_min_word_len=1
【php.ini配置参考】复制代码 代码如下:
output_buffering = On
disable_functions = system,passthru,shell_exec,exec,popen,proc_open
enable_dl = Off
upload_tmp_dir = "D:/tmp/uploadtemp/"
session.save_path = "d:/tmp/sessiondata/"
date.timezone = "Etc/GMT-8" ;表示的是 GMT+8
mbstring.language = Neutral ; Set default language to Neutral(UTF-8) (default)
mbstring.internal_encoding = UTF-8 ; Set internal encoding to UTF-8
cgi.force_redirect = 0
cgi.fix_pathinfo = 1
fastcgi.impersonate = 1
[eaccelerator]
;zend_extension="/APM/ext/eAccelerator_v0_9_6_for_v5_2_13-VC6/eAccelerator.dll"
;zend_extension="/APM/ext/eAccelerator_v1_0_svn412_for_v5_2_13-VC6/eAccelerator.dll"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
;eaccelerator.log_file="/var/log/httpd/eaccelerator_log"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="300"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
[Zend]
zend_optimizer.optimization_level=15
zend_optimizer.encoder_loader=0
;zend_extension_ts="/APM/ext/ZendOptimizer-3.3.0/lib/Optimizer-3.3.0/php-5.2.x/ZendOptimizer.dll"
;zend_extension="/APM/ext/ZendOptimizer_nts.dll"
;zend_extension="/APM/ext/ZendOptimizerPlus.dll"
; 下面是使用ZendExtensionManager.dll的参考配置
;zend_extension_manager.optimizer_ts="/APM/Zend/ZendOptimizer-3.3.0/lib/Optimizer-3.3.0"
;zend_extension_ts="/APM/Zend/ZendOp
- 更多php疑问解答:
- php使用imagick将image图片转化为字符串模式
- php通过gd实现图片图片转换为字符图代码
- PHP把图片转base64代码,php把base64代码转换为图片并保存
- PHP把图片base64转换成图片并保存成文件
- wordpress问题<?php if(have_posts()) : ?>
- 建设一个搜索类网站php还是jsp,数据库那个好
- 没理由啊 php代码无法执行,貌似有语法错误。。。
- 关于PHP 和API 的一段代码不懂啊不懂,请高手指点! 这是淘宝API的
- php语言中,序列化到底在那里使用?它的优势是什么?劣势是什么?
- PHP函数等于或等于应该怎么表达
- 请教php高手,解决basename函数和mb_substr函数处理中文文件名称的解决方法,在上传文件时,总是出现乱码
- .NET,PHP,JAVA,JS优秀点分别是?
- 织梦cms 在环境监测的时候 wamp5 gd不支持 是为什么。;extension=php_gd2.dll这一句我删除了还是不显示?
- 我想学PHP。1.应安装什么编程工具? 2. 装LIUNX系统是装简易的还是?什么版本的?3.还应安装什么?
- <?php 和 <? 有什么区别