一、Apache下载
下载流程
- 下载地址:http://httpd.apache.org/ 选择不同操作系统下的HTTP Server下载;
- windows -> Lastest aviriable version模块下,点击File For Microsoft windows;
- 下载选项中选择第三方:ApahceHuas,并选择的对应的windows x32/x64进行下载。
操作图示:
二、Apache安装(windows)
- 设置根目录或端口
1.1 进入zip解压后的目录,打开conf目录下的httpd.conf文件;
1.2 修改目录: Define SRVROOT "E:\httpd-Server\Apache24";
1.3 修改端口: Listen 8080 - 以管理员身份打开cmd,切换至Apache解压后的bin目录,执行步骤3、4指令;
- httpd.exe -k install [-n 'definedName'] 初始化; (-n 命令是自定义服务器命)
- httpd.exe -k start 启动服务;
- 浏览器地址输入 http://localhost:8080 用来确认是否启动;
- httpd.exe -k stop 停止服务。
常用指令使用
7.1 重启服务:httpd.exe -k restart
7.2 卸载服务: httpd.exe -k uninstall
7.2 查看版本:httpd.exe -v1.3 修改端口: Listen 8080
- 以管理员身份打开cmd,切换至Apache解压后的bin目录,执行步骤3、4指令;
- httpd.exe -k install [-n 'definedName'] 初始化; (-n 命令是自定义服务器命)
- httpd.exe -k start 启动服务;
- 浏览器地址输入 http://localhost:8080 用来确认是否启动;
- httpd.exe -k stop 停止服务。
- 常用指令使用
7.1 重启服务:httpd.exe -k restart
7.2 卸载服务: httpd.exe -k uninstall
7.2 查看版本:httpd.exe -v
原文链接:https://blog.csdn.net/qq_41107529/article/details/88361524