WampServer installation environment

WampServer Download: http: //www.wampserver.com

 

What is WampServer

WampServer is a developed by the French Apache Web server, PHP interpreter and integrated package MySQL database. Eliminating the need for developers to spend time in the tedious process configuration environment, thereby releasing more energy to do the development.

WampServer is a Windows Apache Mysql PHP integrated installation environment, that apache, php and mysql server software under the window.

installation

1. Download WampServer, the official website: http://www.wampserver.com  . If the download is slow, you can go to my  CSDN download

2. Open the direct installation. After the installation is complete there will be:

Meaning that lets you select the default file browser, which gives you general open directly to the  C:\Windows directory, direct point  to open  just fine

3. Select the mailbox. If you are not sure you can point directly to the next step

4. At this point installation is complete. Next is to configure

Configuration

After the installation is complete, open WampServer, will find it is in English. You can now modify its display language

1. Right-click the bottom right corner of WampServer program, select  Language - chinese

2. Start

There are three states WampServler

  • Server is turned off, the color is red
  • Server is turned on, but is offline, the color is orange
  • Server is turned on, online, color is green

If the server is offline, you need to left-click icons - 切换到在线状态

Provided that the service needs to be started in, or the following error:

But there may be a port is in use, lead to not start. The time required to troubleshoot the cause.

There are two general reasons:

1. 80端口被占用,导致Apache服务无法启动。这里可以的打开我的另外一篇博文解决:解决windows系统80端口被占用问题

当然也可以通过修改80端口的方法实现,这个下面会做说明

2. 3306端口被占用,可能原因是你的电脑已经安装了MySQL并且服务正在启动中,需要你停步本地的MySQL服务

不过这个情况不会影响你启动WampServer,它仍然可以启动成功,只是图标的颜色是橙色的

3. 当你启动成功后(服务器为在线状态),可以打开 localhost或者127.0.0.1 打开网站了

修改MySQL

其实也没啥好改的,主要是MySQL的默认密码为空,为了安全需要给它设置一个密码

1. 右击图标 - MySQL - MySQL控制台

因为默认为空,直接按 回车 就可以进入数据库了

2. 输入命令 set password for root@localhost = password('新密码');

3. 打开数据库

打开MySQL的控制台(在图标 - MySQL - MySQL控制台 ),输入刚刚设置的密码后就可以访问数据库啦。

4. 打开 phpMyAdmin

phpMyAdmin 是一个以PHP来管理MySQL数据库

  • 先打开本地站点( localhost/127.0.0.1)

  • 点击 Your Aliases - phpmyadmin

  • 会发现错误了:

意思就是它使用了空密码登录数据库,结果被失败了。这个时候我们需要修改下登录时的密码

  • 打开 C:\wamp\apps\phpmyadmin3.5.1\config.inc.php 里找到 $cfg['Servers'][$i]['password'] = ''; 将密码填进去即可

  • 再次打开 phpMyAdmin。登录成功

配置 Apache

Apache 需要配置的有 修改端口,设置其它主机可访问

修改端口

1. 打开 httpd.conf 配置文件 位于 C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf 。也可以在右下角图标打开( Apache - httpd.conf )

2. 找到 Listen 80 将80 修改成其它端口

Listen主要侦听web服务端口状态,默认为:80,即侦听所有的地址的80端口,注意这里也可以写成IP地址的侦听形式(12.34.56.78:8080)

3. 保存后重启服务即可生效

设置其它主机访问

1. 同样是 httpd.conf 配置 ,搜索 "Controls who can get" ,将 Deny from all 删除,将 Allow from 127.0.0.1 改为 "Allow from all"

2. 保存后重启服务,就可以使其它主机访问了

美丽的欣怡同学,请仔细看了哦,有问题百度或者艾特我。

 

Guess you like

Origin www.cnblogs.com/tiechui2015/p/12110479.html