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 ...
随机推荐
- Shiro集成多个Realm,认证都不通过返回y configured realms. Please ensure that at least one realm can authenticate these tokens.
异常内容:Authentication token of type [class org.apache.shiro.authc.UsernamePasswordToken] could not be ...
- 怎么样把ModelMap里面的数据放入Session里面?
答:可以在类上面加上@SessionAttributes注解,里面包含的字符串就是要放入session里面的key.
- linux-安装zookeeper及相关操作
下载两个安装包并解压: 配置jdk环境变量: [root@VM-0-10-centos zookeeper]# cat /root/.bash_profile # .bash_profile # Ge ...
- Maven的Scored介绍
Maven的Scored值的介绍:http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.ht ...
- Redis String Type
Redis字符串的操作命令和对应的api如下: set [key] [value] JedisAPI:public String set(final String key, final String ...
- 说出 5 条 IO 的最佳实践?
IO 对 Java 应用的性能非常重要.理想情况下,你不应该在你应用的关键路径上 避免 IO 操作.下面是一些你应该遵循的 Java IO 最佳实践: a)使用有缓冲区的 IO 类,而不要单独读取字节 ...
- 那么如何使用WebSQL?
我们需要做的第一步是通过使用"OpenDatabase"函数开放数据库,如下图所示.第一个参数是数据库的名称,接下来是版本,然后一个简单的文本标题,最后的是数据库的大小. var ...
- 学习ELK日志平台(一)
一.需求及基础: 场景: 1.开发人员不能登录线上服务器查看详细日志 2.各个系统都有日志,日志数据分散难以查找 3.日志数据量大,查询速度慢,或者数据不够实时 4.一个调用会涉及到多个系统,难以在这 ...
- 数据仓库(5)数仓Kimball与Inmon架构的对比
数据仓库主要有四种架构,Kimball的DW/BI架构.独立数据集市架构.辐射状企业信息工厂Inmon架构.混合Inmon与Kimball架构.不过不管是那种架构,基本上都会使用到维度建模. < ...
- 【分享】WeX5的正确打开方式(6)——数据组件初探
本文是[WeX5的正确打开方式]系列的第6篇文章,简单介绍一下WeX5中数据组件的特性和结构形式. 数据组件的由来 上一篇 WeX5绑定机制我们实现了一个简单的记账本应用,当时所有数据都用 JSON ...
