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 ...
随机推荐
- 怎么根据Comparable方法中的compareTo方法的返回值的正负 判断升序 还是 降序?
public int compareTo(Student o) { return this.age - o.age; // 比较年龄(年龄的升序) } 应该理解成return (-1)×(thi ...
- Java连接ArtemisMQ,出现Timed out waiting to receive cluster topology. Group:null异常
完整异常内容:org.springframework.jms.UncategorizedJmsException: Uncategorized exception occurred during JM ...
- Django的models中filter的各种用法及官方手册的网址
__exact 精确等于 like 'aaa' __iexact 精确等于 忽略大小写 ilike 'aaa' __contains 包含 like '%aaa%' __icontains 包含 忽略 ...
- 学习openldap01
Linux 下openldap的详细介绍,搭建,配置管理,备份,案例 Ldap 服务应用指南 兼容(5.X&6.X) 1.1 Ldap 目录服务介绍 1.1.1 什么是目录服务(activ ...
- vue中基于sortablejs与el-upload实现文件上传后拖拽排序
今天做冒烟测试的时候发现商品发布有一个拖拽图片排序功能没做,赶紧加上 之前别的同事基于 vuedraggable 实现过这个功能,我这里自己深度封装了 el-upload ,用这种方式改动很大,而且感 ...
- 小程序web-view加载H5信息不全
满足小程序的web-view标签跳转网页形式 配置小程序后台的web-view(业务域名) 可打开关联的公众号的文章 通常实现逻辑 页面加载的时候赋值于一个data对象的值,然后赋值到web-view ...
- 小程序刷新webview小结
场景 在小程序其它页面做了操作,数据发生改变,回到webview页面时需要更新webview里面的数据.由于小程序没有提供与webview的实时通信能力,因此刷新页面是个可考虑的做法. 方法一 最常见 ...
- 各种类型的Dialog
下面是几种对话框的效果 图一: 图二: 图三: 图四: 图五: 图六: 图七: 图1效果:该效果是当按返回按钮时弹出一个提示,来确保无误操作,采用常见的对话框样式. 代码: 创建对话框方法dialog ...
- java中switch结构和 while for循环的用法
6.2 switch结构: 变量可以是:variable can be:(mark: tried, can not be long) char/int/short/byte(java1.7 就可 ...
- Python里的引用与拷贝规律
python的可变不可变与各种浅拷贝深拷贝规则,一并梳理. Python一切皆引用 在C++/Java里,int a = 1就是创建变量为a,赋值为1:int b = a就是创建变量b,赋值为a的值. ...
