网站首页 > 教程分享 正文
lamp = linux + apache + mysql + php
首先来讲一下搭建Apache的过程。
Apache编译安装之前,需要先安装依赖apr, apr-util。安装apr-util之前需要先安装apr。 这里说明一下,软件的安装路径
准备安装之前的环境
通过yum安装一些依赖的库,及软件
>>>yum install -y epel-release
>>>yum install -y gcc wget make libtool expat-devel pcre-devel openssl-devel libxml2-devel
安装apr
>>>wget http://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.7.0.tar.gz
>>>tar -zxvf apr-1.7.0.tar.gz
>>>cd apr-1.7.0
>>>./configure --prefix=/usr/local/apr
>>>make
>>>make install
安装apr-util
>>>wget http://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.6.1.tar.gz
>>>tar -zxvf apr-util-1.6.1.tar.gz
>>>cd apr-util-1.6.1
>>>./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
>>>make
>>>make install
安装Apache
>>>wget http://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.39.tar.gz
>>>tar -zxvf httpd-2.4.39.tar.gz
>>>cd httpd-2.4.39
>>>./configure --prefix=/usr/local/apache \--with-apr=/usr/local/apr \--with-apr-util=/usr/local/apr-util \--enable-so \--enable-ssl \--enable-cgi \--enable-rewrite \--with-pcre \--with-zlib \--with-mpm=event \--enable-modules=most \--enable-mpms-shareds=all$ make$ make install
验证是否安装成功
启动Apache
>>>cd /usr/local/apache
>>>./bin/httpd -k start
Apache成功启动之后,运行netstat -tunlp | grep httpd是能够看到处于监听状态的httpd进程. 或者通过浏览器访问http://your_ip, 能够得到一个Apache返回的页面
注意:安装成功之后,可能会访问不了,此时需要关闭防火墙。
猜你喜欢
- 2024-10-27 我的HTML+php学习第十八天——Apache,域名配置下
- 2024-10-27 CentOS7编译安装PHP7的详细教程(图文)
- 2024-10-27 Mac系统下用Apache和PHP安装Xdebug详细流程
- 2024-10-27 CentOS7 - 安装Apache HTTP Server和PHP
- 2024-10-27 Windows安装PHP8+Apache+JIT(即时编译)
- 2024-10-27 CentOS7如何安装最新版PHP7?Nginx或Apache该如何配置?
- 2024-10-27 phpstudy中apache无法启动怎么解决?
- 2024-10-27 使用Dockerfile基于7.4-apache-buster镜像搭建php7.4微服务环境
- 2024-10-27 windows下的Apache+php+pdo+SQL server环境配置
- 2024-10-27 全能PHP自定义环境,IIS、Apache、Nginx三大站点多版本共存
你 发表评论:
欢迎- 最近发表
-
- 有了这份900多页的Android面试指南,你离大厂Offer还远吗?
- K2 Blackpearl 流程平台总体功能介绍:常规流程功能
- 零基础安卓开发起步(一)(安卓开发入门视频)
- 教程:让你的安卓像Windows一样实现程序窗口化运行
- Android事件总线还能怎么玩?(事件总线有什么好处)
- Android 面试被问“谈谈架构”,到底要怎样回答才好?
- Android开发工具Parcel和Serialize
- Android 中Notification的运用(notification widget安卓)
- Android退出所有Activity最优雅的方式
- MT管理器-简单实战-去除启动页(mt管理器怎么去除软件弹窗)
- 标签列表
-
- css导航条 (66)
- sqlinsert (63)
- js提交表单 (60)
- param (62)
- parentelement (65)
- jquery分享 (62)
- check约束 (64)
- curl_init (68)
- sql if语句 (69)
- import (66)
- chmod文件夹 (71)
- clearinterval (71)
- pythonrange (62)
- 数组长度 (61)
- javafx (59)
- 全局消息钩子 (64)
- sort排序 (62)
- jdbc (69)
- php网页源码 (59)
- assert h (69)
- httpclientjar (60)
- postgresql conf (59)
- winform开发 (59)
- mysql数字类型 (71)
- drawimage (61)
本文暂时没有评论,来添加一个吧(●'◡'●)