Linux-编译安装http-实验
准备工作
1、关闭防火墙和SELinux
2、基础安装的系统,安装以下命令
yum install gcc make autoconf gcc-c++ glibc glibc-devel pcre pcre-devel openssl openssl-devel systemd-devel zlib-devel vim lrzsz tree tmux lsof tcpdump wget net-tools iotop bc bzip2 zip unzip nfs-utils man-pages
3、下载httpd2.4,虚拟机下载可能会很慢,本机下载好上传的虚拟机中
[root@centos8/data]$wget https://dlcdn.apache.org/httpd/httpd-2.4.53.tar.bz2
4、查看下载或上传好的安装包,解压
[root@centos8/data]$ls
httpd-2.4.53.tar.bz2
[root@centos8/data]$tar xf httpd-2.4.53.tar.bz2
[root@centos8/data]$ls
httpd-2.4.53 httpd-2.4.53.tar.bz2
5、进入httpd-2.4.53目录查看
[root@centos8/data]$cd httpd-2.4.53/
[root@centos8/data/httpd-2.4.53]$ls
ABOUT_APACHE BuildBin.dsp docs InstallBin.dsp modules ROADMAP
acinclude.m4 buildconf emacs-style LAYOUT NOTICE server
Apache-apr2.dsw CHANGES httpd.dep libhttpd.dep NWGNUmakefile srclib
Apache.dsw changes-entries httpd.dsp libhttpd.dsp os support
apache_probes.d CMakeLists.txt httpd.mak libhttpd.mak README test
ap.d config.layout httpd.spec LICENSE README.CHANGES VERSIONING
build configure include Makefile.in README.cmake
BuildAll.dsp configure.in INSTALL Makefile.win README.platforms
6、编译安装
1)建立安装目录
[root@centos8~]$midir /usr/local/apache2
2)安装
[root@centos8/data/httpd-2.4.53]$./configure --prefix=/usr/local/apache2/ --sysconfdir=/etc/httpd --enable-ssl #指定安装路径,配置文件路径
[root@centos8/data/httpd-2.4.53]$echo $? #检测生成编译文件是否成功
0
[root@centos8/data/httpd-2.4.53]$make
[root@centos8/data/httpd-2.4.53]$echo $?
0
[root@centos8/data/httpd-2.4.53]$make install
[root@centos8/data/httpd-2.4.53]$echo $?
0
7、配置环境
[root@centos8/data/httpd-2.4.53]$echo 'PATH=/usr/local/apache2/bin:$PATH' > /etc/profile.d/httpd.sh [root@centos8/data/httpd-2.4.53]$. /etc/profile.d/httpd.sh
[root@centos8/data/httpd-2.4.53]$apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::250:56ff:fe33:298d. Set the 'ServerName' directive globally to suppress this message
[root@centos8/data/httpd-2.4.53]$
8、指定用apache用户运行
[root@centos8~]$clear
[root@centos8~]$useradd -r -s /sbin/nologin -d /var/www -c Apache -u 48 apache
[root@centos8~]$vim /etc/httpd/httpd.conf
[root@centos8~]$apachectl restart #配置生效和验证
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::250:56ff:fe33:298d. Set the 'ServerName' directive globally to suppress this message
[root@centos8~]$ps aux | tail -6
root 26483 0.0 0.0 0 0 ? I 14:02 0:00 [kworker/1:0-ata_sff]
apache 26487 0.0 0.3 1321352 7728 ? Sl 14:02 0:00 /usr/local/apache2//bin/httpd -k start
apache 26488 0.0 0.3 1321352 7728 ? Sl 14:02 0:00 /usr/local/apache2//bin/httpd -k start
apache 26489 0.0 0.5 1321352 11808 ? Sl 14:02 0:00 /usr/local/apache2//bin/httpd -k start
root 26575 0.0 0.1 58740 3828 pts/0 R+ 14:03 0:00 ps aux
root 26576 0.0 0.0 7348 888 pts/0 S+ 14:03 0:00 tail -6
9浏览器访问

Linux-编译安装http-实验的更多相关文章
- 【转】linux 编译安装nginx,配置自启动脚本
linux 编译安装nginx,配置自启动脚本 本文章来给各位同学介绍一篇关于linux 编译安装nginx,配置自启动脚本教程,希望有需要了解的朋友可一起来学习学习哦. 在公司的suse服务器装ng ...
- linux 编译安装nginx,配置自启动脚本
本文章来给各位同学介绍一篇关于linux 编译安装nginx,配置自启动脚本教程,希望有需要了解的朋友可一起来学习学习哦. 在公司的suse服务器装nginx,记录下安装过程: 参照这篇文章:Linu ...
- linux 编译安装PHP模块
本文移到:http://www.phpgay.com/Article/detail/classid/6/id/54.html linux 编译安装PHP模块 1.首先你要有你服务器上安装的PHP的版 ...
- [CentOS_7.4]Linux编译安装ffmpeg
[CentOS_7.4]Linux编译安装ffmpeg 安装过程: 下载安装源,配置,编译,安装,设置环境变量. # wget http://www.ffmpeg.org/releases/ffm ...
- 转:Linux 编译安装 Mysql5.7
http://broqiang.com/2017/04/18/Mysql-Install-5.7.18-Linux-Compile/ 原文 Linux 编译安装 Mysql5.7 Ubuntu 下快速 ...
- Linux编译安装Apache+PHP
Linux编译安装Apache+PHP 来自:自学it网,http://www.zixue.it/. 1]编译安装Apache+PHP 1.安装程序依赖库和开发环境 为了省事把所需要的库文件全都安 ...
- Linux编译安装Qt 5.4.1(-qt-xcb是必须要指定的,卸载自带的gcc等)
转载请注明文章:Linux编译安装Qt 5.4.1 出处:多客博图 很久不写文章了,过程很简单,但是操作很多,简单说吧. 前言: 操作系统CentOS 6.6,64位的. 1.安装gcc 4.8.4, ...
- Linux 编译安装、压缩打包、定时任务
目录 Linux 编译安装 知识储备: wget命令 编译安装 Linux 压缩打包 gzip压缩 bzip2压缩 tar打包 Linux 定时任务 相关文件及操作 Linux 编译安装 编译安装就是 ...
- Linux 编译安装内核
一.简介 内核,是一个操作系统的核心.它负责管理系统的进程.内存.设备驱动程序.文件和网络系统,决定着系统的性能和稳定性.Linux作为一个自由软件,在广大爱好者的支持下,内核版本不断更新.新的内核修 ...
- LINUX 编译安装 PHP 环境
今天终于有时间 总结一下 linux 的编译安装 php 环境同学给我发了他写的文档 ,基本就可以实现编译安装了我同学文章地址: http://penghui.link/articles/2016/0 ...
随机推荐
- 您使用了哪些 starter maven 依赖项?
使用了下面的一些依赖项 spring-boot-starter-activemq spring-boot-starter-security 这有助于增加更少的依赖关系,并减少版本的冲突.
- maven-something
<!--dependencyManagement提供一种管理依赖版本好的方式--> <!-- 通常出现在项目的最顶层父POM,--> <!-- 可以让所有在子项目中引用的 ...
- 事务的 ACID 是指什么?
原子性(Atomic):事务中各项操作,要么全做要么全不做,任何一项操作 的失败都会导致整个事务的失败: 一致性(Consistent):事务结束后系统状态是一致的: 隔离性(Isolated):并发 ...
- 分布式集群中为什么会有 Master?
在分布式环境中,有些业务逻辑只需要集群中的某一台机器进行执行,其他的机 器可以共享这个结果,这样可以大大减少重复计算,提高性能,于是就需要进行 leader 选举.
- Zookeeper 保证了如下分布式一致性特性?
1.顺序一致性 2.原子性 3.单一视图 4.可靠性 5.实时性(最终一致性) 客户端的读请求可以被集群中的任意一台机器处理,如果读请求在节点上注册了 监听器,这个监听器也是由所连接的 zookeep ...
- ACM - 图论- 网络流 - 算法模板
\(EK\) 算法模板 #include <iostream> #include <queue> #include<string.h> using namespac ...
- Numpy实现多项式曲线拟合
Numpy实现多项式曲线拟合 这里可以对比matlab中的拟合方式看看matlab拟合函数的三种方法,和第一种方式很像 问题定义:对于一堆数据点(x, y),能否只根据这些数据,找出一个函数,使得函数 ...
- 顺利通过EMC实验(8)
- 顺利通过EMC实验(1)
- html实体编码遇上js代码
单双引号 在js代码中 在js中单.双引号引起来的是字符串,如果我们要在字符串中使用单.双引号,需要反斜杠进行转义 let str='user\'s name'; // or let str=&quo ...
