Apache2.4+PHP5.6+Mysql5.6(web环境搭建)
2015-12-14 16:37
731 查看
Apache2.4安装配置:
1.解压Apache2.4
找到 httpd.conf 文件,用记事本打开
修改:
ServerRoot "C:/ztaos/Apache24"
Listen 80 //80端口
ServerName localhost:80 //一般为localhost
DocumentRoot "c:/ztaos/www"
<Directory "c:/ztaos/www">
ScriptAlias /cgi-bin/ "c:/ztaos/www"
<Directory "c:/ztaos/Apache24/cgi-bin">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options FollowSymLinks //禁止列出目录
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
2.将Apache加入到window服务启动项里面
win+R->cmd 进入Apche\bin目录,执行
httpd.exe -k install -n "Apache24"
PHP安装配置:
1.解压PHP5.6
复制 php.ini-development 重命名为php.ini //php.ini为php的配置文件
为Apache服务添加php支持
在 httpd.conf 中添加
# php5 support
LoadModule php5_module C:/ztaos/php5/php5apache2_4.dll
AddType application/x-httpd-php .php .html .htm
# configure thepath to php.ini
PHPIniDir "C:/ztaos/php5"
Mysql安装配置:
1.解压Mysql5.6
复制 my-default.ini 重命名为 my.ini //my.ini 为mysql配置文件
修改 my.ini
basedir = C:\ztaos\Mysql5.6
datadir = C:\ztaos\Mysql5.6\data
修改mysql占用内存过大:
innodb_buffer_pool_size =1M
join_buffer_size = 1M
sort_buffer_size = 1M
read_rnd_buffer_size = 1M
performance_schema_max_table_instances=400
table_definition_cache=400
table_open_cache=256
2.以管理员身份运行cmd
进入mysql\bin目录下
输入:mysqld -install 安装mysql
启动: net start mysql
登录:mysql -u root -p
3.修改 php.ini 连接mysql
找到:
;On windows:
;extension_dir = "ext"
;extension=php_mysql.dll
;extension=php_mysqli.dll
去掉冒号重启Apache
[b]http://pan.baidu.com/s/1nun1IlV xggc
[/b]
1.解压Apache2.4
找到 httpd.conf 文件,用记事本打开
修改:
ServerRoot "C:/ztaos/Apache24"
Listen 80 //80端口
ServerName localhost:80 //一般为localhost
DocumentRoot "c:/ztaos/www"
<Directory "c:/ztaos/www">
ScriptAlias /cgi-bin/ "c:/ztaos/www"
<Directory "c:/ztaos/Apache24/cgi-bin">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options FollowSymLinks //禁止列出目录
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
2.将Apache加入到window服务启动项里面
win+R->cmd 进入Apche\bin目录,执行
httpd.exe -k install -n "Apache24"
PHP安装配置:
1.解压PHP5.6
复制 php.ini-development 重命名为php.ini //php.ini为php的配置文件
为Apache服务添加php支持
在 httpd.conf 中添加
# php5 support
LoadModule php5_module C:/ztaos/php5/php5apache2_4.dll
AddType application/x-httpd-php .php .html .htm
# configure thepath to php.ini
PHPIniDir "C:/ztaos/php5"
Mysql安装配置:
1.解压Mysql5.6
复制 my-default.ini 重命名为 my.ini //my.ini 为mysql配置文件
修改 my.ini
basedir = C:\ztaos\Mysql5.6
datadir = C:\ztaos\Mysql5.6\data
修改mysql占用内存过大:
innodb_buffer_pool_size =1M
join_buffer_size = 1M
sort_buffer_size = 1M
read_rnd_buffer_size = 1M
performance_schema_max_table_instances=400
table_definition_cache=400
table_open_cache=256
2.以管理员身份运行cmd
进入mysql\bin目录下
输入:mysqld -install 安装mysql
启动: net start mysql
登录:mysql -u root -p
3.修改 php.ini 连接mysql
找到:
;On windows:
;extension_dir = "ext"
;extension=php_mysql.dll
;extension=php_mysqli.dll
去掉冒号重启Apache
[b]http://pan.baidu.com/s/1nun1IlV xggc
[/b]
相关文章推荐
- apache日志切割与不记录指定文件类型日志
- apache服务器设置
- apache服务器设置
- 用apache commons-pool2建立thrift连接池
- 严重: Exception occurred during processing request: org.apache.struts2.json.JSONException: org.hiberna
- Linux(CentOS)下的apache服务器配置与管理
- apache ab测试并发命令的使用
- Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart
- java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
- linux下关于Apache设置二级域名绑定二级目录的方法
- Google推出Apache加速模块 速度提高50%!
- Working with Apache Derby
- apache .htaccess文件详解和配置技巧总结
- 基于mac系统的apache服务器的使用流程
- java.lang.NullPointerException at org.apache.jsp.**_jsp.jspInit(index_jsp.java)异常 解决方案
- Apache 基金会宣布 Apache Kylin 成为顶级项目
- Apache日志解读 每列代表什么
- php学习日记第二棒(Apache 安装和配置)
- 使用 apache flex mavenizer 将flex sdk 4.6 maven化
- 阿里云ECS Apache+php+mysql环境搭建