在windows下安装WEB 主机

本文介绍用开源程序AMP建立一个本地web主机。实例是在windows7 和windows10下用wamp建立一个本地Web主机。AMP其实就是Apache,PHP和MySQL, wamp 指windows 下的版本,可以用于windows 7,8,10。 其他操作系统linux 等都有对应的版本。

WampServer是一个Windows Web开发环境。 它允许您使用Apache,PHP和MySQL数据库创建Web应用程序。 除此之外,PhpMyAdmin还允许您轻松管理数据库。

1:下载, 到网站 https://sourceforge.net/projects/wampserver/files/ 下载最新版本,或者搜索wamp download 。我的系统是windows 64位版本,下的是64位的版本wampserver3.2.0_x64.exe。

2:下载到本机上后,如果准备好了,点击即可,然后一路next, 就安装好了。以前教程就这么说的,但我实际安装过程中,说缺少好些文件,其实就是vc 的分配包。 我想怎么办呢,就网上查找, 也不敢乱下,怕病毒和木马。这样就查找时,缺少的文件名 + microsoft。微软下载还是放心一点。现在的安装程序会提示你需要安装好vc 安装库,见我后面的英文说明,其实这是按照新版程序的安装提示警告。

3:安装准备:

下面这2个文件必须下载并安装好

— VC16 Redistribuable (Visual C++ 2015-2019)
https://aka.ms/vs/16/release/VC_redist.x86.exe
https://aka.ms/vs/16/release/VC_redist.x64.exe

我还下载安装了:– VC11 Packages (Visual C++ 2012 Update 4)
这2个文件 VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe 在同一个下载页面: http://www.microsoft.com/en-us/download/details.aspx?id=30679

4:以前我是缺什么就补什么好了。但是wamp这个程序还不能重新安装。需要控制面板上卸载,然后重新安装。我们应按照后面英文提示安装好所有必要的vc安装包。

5: 安装好后,启动(一般在桌面有图标),如果没有提示缺什么,在右下角可以看到一个绿色的图标,就表示启动成功了。在你的浏览器上输入localhost 就可以完整验证好了。

6:下面是安装的提示信息,如果你有老版本,一定要卸载才安装新的系统。在64位系统下安装需要安装32位和64位的2个版本vc扩展安装包,这在安装准备一节有介绍。

— Installation of Wampserver —
BEFORE proceeding with the installation of Wampserver, you must ensure that certain elements are installed on your system, otherwise Wampserver will absolutely not run, and in addition, the installation will be faulty and you need to remove Wampserver BEFORE installing the elements that were missing.
Make sure you are “up to date” in the redistributable packages VC9, VC10, VC11, VC13 , VC14 and VC15
See — Visual C++ Packages below.
— Do not install Wampserver OVER an existing version, follow the advice:

  • Install a new version of Wampserver: http://forum.wampserver.com/read.php?2,123606
    If you install Wampserver over an existing version, not only it will not work, but you risk losing your existing databases.
    — Install Wampserver in a folder at the root of a disk, for example C:\wamp or D:\wamp. Take an installation path that does not include spaces or diacritics; Therefore, no installation in c: \ Program Files\ or C: \ Program Files (x86\
    We must BEFORE installing, disable or close some applications:
  • Close Skype or force not to use port 80
    Item No. 04 of the Wampserver TROUBLESHOOTING TIPS:http://forum.wampserver.com/read.php?2,134915
  • Disable IIS
    Item No. 08 of the Wampserver TROUBLESHOOTING TIPS:http://forum.wampserver.com/read.php?2,134915
    If these prerequisites are not in place, Press the Cancel button to cancel the installation, then apply the prerequisites and restart the installation.
    This program requires Administrator privileges to function properly. It will be launched with the “Run as administrator” option. If you do not want a program to have this option, cancel the installation.
    — Visual C++ Packages —
    The MSVC runtime libraries VC9, VC10, VC11 are required for Wampserver 2.4, 2.5 and 3.0, even if you use only Apache and PHP versions with VC11. Runtimes VC13, VC14 is required for PHP 7 and Apache 2.4.17 or more
    — VC9 Packages (Visual C++ 2008 SP1)
    http://www.microsoft.com/en-us/download/details.aspx?id=5582
    http://www.microsoft.com/en-us/download/details.aspx?id=2092
    — VC10 Packages (Visual C++ 2010 SP1)
    http://www.microsoft.com/en-us/download/details.aspx?id=8328
    http://www.microsoft.com/en-us/download/details.aspx?id=13523
    — VC11 Packages (Visual C++ 2012 Update 4)
    The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page: http://www.microsoft.com/en-us/download/details.aspx?id=30679
    — VC13 Packages Update 5(Visual C++ 2013)
    The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page: https://support.microsoft.com/en-us/help/4032938/
    — VC14 Packages (Visual C++ 2015 Update 3) Supersedes by VC15
    — VC15 Redistribuable (Visual C++ 2017)Supersedes by VC16
    — VC16 Redistribuable (Visual C++ 2015-2019)
    https://aka.ms/vs/16/release/VC_redist.x86.exe
    https://aka.ms/vs/16/release/VC_redist.x64.exe
    VC2015-2019 (VC16) is backward compatible to VC2015 (VC14 )and VC2017 (VC15). That means, a VC14 or VC15 module can be used inside a VC16 binary. Because this compatibility the version number of the Redistributable is 14.2x.xx and after you install the Redistributable VC2015-2019, VC2015 and VC2017 is removed but you can still use VC14 and VC15.

If you have a 64-bit Windows, you must install both 32 and 64bit versions of each VisualC++ package, even if you do not use Wampserver 64 bit
To verify that all VC ++ packages are installed and with the latest versions, you can use the tool:
http://wampserver.aviatechno.net/files/tools/check_vcredist.exe and you will find all the packages on http://wampserver.aviatechno.net/ in section Visual C++ Redistribuable Packages
You must install each package “as an administrator”, so right-click the exe file and then run as Administrator. Do not use a previously loaded tool. Make a new download to make sure you are using the correct version.

Warning: Sometimes Microsoft may update the VC ++ package by breaking the download links and without redirect to the new. If the case happens to you, remember that item number 20 below will be updated and the page http://wampserver.aviatechno.net/ section Visual C++ Redistribuable Packages is up to date.
This is item number 20 of TROUBLESHOOTING TIPS of Wampserver:
http://forum.wampserver.com/read.php?2,134915

发表评论

电子邮件地址不会被公开。 必填项已用*标注