1. Apache基础介绍
2. Apache安装
1. 安装编译所需要的信赖软件包
yum -y install gcc* make* apr apr-util pcre apr-devel apr-util-devel pcre-devel
2. 安装OpenSSL和Apache
安装Open SSL
tar -zxvf openssl-1.0.2m.tar.gz
cd openssl-1.0.2m
./config --prefix=/usr/local/ssl --shared
make && make install
安装Apache
wget http://archive.apache.org/dist/httpd/httpd-2.4.28.tar.gz
tar -zxvf httpd-2.4.28.tar.gz
cd httpd-2.4.28
./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-ssl --with-ssl=/usr/local/ssl --with-mpm=prefork
make && make install
--prefix 指定安装路径
--enable-so 让apache核心装载DSO(动态共享目标)
--enable-rewrite 启用重写功能
--enable-modules 将模块编译到apache中
--enable-ssl 打开ssl协议
--with-mpm 指定运行模型
运行模式:/etc/httpd/conf.modules.d/00-mpm.conf
多进程模型:prefork(预派生)
多进程多线程混合模型:worker(工作者)、event(事件)
编译安装成功后,安装在:/usr/local/apache2/ 目录下
配置文件:/usr/local/apache2/conf/httpd.conf
启动命令:/usr/local/apache2/bin/apachectl
默认网站家目录:/usr/local/apache2/htdcos
安装php7.x
持续完善,待续...