yum实验--使用源码包安装httpd2.2(centos6)

1.下载源码 官网,教室的服务器

lftp 172.18.0.1
         user thirty-three pass:thirty-three
         get files/httpd-2.4.27.tar.bz2
         exit
         tar xvf httpd-2.4.27.tar.bz2

[[email protected] ~]#lftp 172.18.0.1
lftp 172.18.0.1:~> user thirty-three
Password:
lftp thirty[email protected]:~> ls
drwxrwxr-x    2 506      506          4096 Jul 31 06:56 files
drwxrwxr-x    2 0        0            4096 Jul 24 08:18 lab manuals
drwxrwxr-x    2 0        0            4096 Jul 09 10:03 notes
drwxrwxr-x    2 0        0            4096 Jul 06 09:54 pictures
drwxrwxr-x    2 0        0            4096 Aug 03 00:38 slides
drwxrwxr-x   18 0        0            4096 Aug 03 10:13 video
lftp thirty[email protected]:/> cd files
lftp thirty[email protected]:/files> ls
-rw-r--r--    1 506      506      49183336 Jul 11 11:13 67.0.3396.99_chrome_installer.exe
-rw-r--r--    1 506      506        658940 Oct 08  2024 access_log
-rw-r--r--    1 506      506       5779739 Jul 30 07:36 httpd-2.2.34.tar.bz2
-rw-r--r--    1 506      506       6527394 Jul 30 07:36 httpd-2.4.27.tar.bz2
-rw-r--r--    1 506      506      102201640 Jul 31 06:56 linux-4.15.13.tar.xz
-rw-r--r--    1 506      506           782 Jul 25 07:28 motd
-rw-r--r--    1 506      506         72928 Jul 11 11:12 skyZIP?_Proxy.crx
lftp thirty[email protected]:/files> get httpd-2.2.34.tar.bz2
get: httpd-2.2.34.tar.bz2: file already exists and xfer:clobber is unset
lftp thirty[email protected]:/files> exit

[root@centos6 ~]#tar xvf httpd-2.2.34.tar.bz2

[root@centos6 ~]#ls
access_log                      Desktop        httpd-2.2.34          reset.sh
acl.bak                         Documents      httpd-2.2.34.tar.bz2  Templates
acl.txt                         Downloads      install.log           test.sh
anaconda-ks.cfg                 etc2018-07-24  install.log.syslog    Videos
bin                             etcdate +%F    Music
CentOS-6.8-x86_64-bin-DVD1.iso  fhj            Pictures
CentOS-6.8-x86_64-bin-DVD2.iso  f.txt          Public

2.安装Development Tools

查看yum的组列表

[[email protected] ~]#yum grouplist
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Group Process
Repository base is listed more than once in the configuration
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
base                                                                 | 4.0 kB     00:00
epel                                                                 | 4.3 kB     00:00
Installed Groups:
    Additional Development
    Base
    CIFS file server
    Compatibility libraries
    Console internet tools
    Debugging Tools
    Desktop
    Desktop Debugging and Performance Tools
    Desktop Platform
    Development tools

[root@centos6 ~]#yum groupinstall ‘Development Tools‘

3.查看README INSTALL

[[email protected] ~]#cd httpd-2.2.34
[[email protected] httpd-2.2.34]#ls
ABOUT_APACHE  CHANGES        httpd.dsp       libhttpd.dep  NOTICE            server
acinclude.m4  config.layout  httpd.mak       libhttpd.dsp  NWGNUmakefile     srclib
Apache.dsw    configure      httpd.spec      libhttpd.mak  os                support
build         configure.in   include         LICENSE       README            test
BuildAll.dsp  docs           INSTALL         Makefile.in   README.platforms  VERSIONING
BuildBin.dsp  emacs-style    InstallBin.dsp  Makefile.win  README-win32.txt
buildconf     httpd.dep      LAYOUT          modules       ROADMAP

4../configure –help

./configure --prefix=/app/apache22 --sysconfdir=/etc/apache22
     dnf|yum install -y apr-devel apr-util-devel pcre-devel

5.make -j 4 (看情况改,可要可不要)

6.make install


7.export PATH=$PATH:/app/apache22/bin 可把这行写入/etc/profile.d/*.sh 之后,再source该文件

vim /etc/profile.d/f.sh

export PATH=$PATH:/app/apache22/bin

[root@centos6 profile.d]#chmod +x f.sh
[[email protected] profile.d]#./f.sh

8.apachectl start 启动服务

9.vim /var/www/html/h.html(网页引导界面)

[[email protected] httpd-2.2.34]#vim /var/www/html/h.html
[[email protected] profile.d]#cat /var/www/html/h.html
<html><body><h1>It works! welcome</h1></body></html>

10.iptables –F(关闭防火墙)

[[email protected] profile.d]#iptables -F

11.浏览器访问

172.18.250.57/h.html

原文地址:https://www.cnblogs.com/f-h-j-11-7/p/9426713.html

时间: 2024-10-11 11:15:36

yum实验--使用源码包安装httpd2.2(centos6)的相关文章

rpm工具使用、yum工具使用、源码包安装、yum更换国内源、使用系统盘搭建本地仓库源

Linux安装软件包的三种方法 rpm工具:预先在Linux机器上编译并打包安装的文件,安装迅速.(缺点:安装程序包时,有可能因为依赖另外一个程序包而无法安装)yum工具:可以使用工具安装时,同时将依赖的另外的程序包同时安装好:(CentOS中免费,Red Hat里需要付费)源码包:一般源码包都是通过C语言开发出来的,Linux机器必须安装gcc才能编译: 检测命令 echo $? 检查上一条命令是否错误 0为正确 1为错误 RPM工具 rpm包格式:包名.版本号.发布版本号.平台举例:libj

yum更换国内源,yum下载rpm包,源码包安装

yum更换国内源 删除国外源CentOS-Base.repo [[email protected] yum.repos.d]# ls CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Sources.repo CentOS-Vault.repo [[email protected] yum.repos.d]# rm -f CentOS-Base.

linux CentOS7 中安装包管理:rpm 、yum及源码包安装使用

一. 安装软件包的三种方法 yum ---python rpm工具 yum工具 源码包 二. rpm包介绍 设置光驱并挂载: [[email protected] ~]# mount /dev/cdrom /mntmount: /dev/sr0 写保护,将以只读方式挂载 [[email protected] ~]# ls /mntEULA    isolinux  repodata                      TRANS.TBL GPL     LiveOS    RPM-GPG-

7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装

7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装 扩展 1. 配置yum源优先级 http://ask.apelearn.com/question/7168 2. 把源码包打包成rpm包 http://www.linuxidc.com/Linux/2012-09/70096.htm # 7.6  yum更换国内源 ![mark](http://oqxf7c508.bkt.clouddn.com/blog/20170812/154757717.png?imagesl

linux下系统软件包管理(rpm、yum、源码包安装)

1. rpm工具rpm全称为Redhat Package Manager,红帽软件包管理工具,设计理念是开放的,不仅仅是在RedHat平台上,在SUSE上也是可以使用的. rpm包名字构成由-和.分成了若干部分,如abrt-cli-2.0.8-15.el6.centos.i686.rpm,abrt-cli是包名,2.0.8-15是版本号,el6指的是redhat企业版6,centos指的是这是在centos上用的,i686指的是平台类型.有些rpm包并没有写具体的平台而是noarch,这代表这个

yum更换国内源、下载rpm包,源码包安装

yum更换国内源 yum本身自带的yum是国外的地址,国内下载会比较慢. 配置163yum源 rm -f dvd.repo  删除之前默认的yum源 使用wget或curl命令后,生产新的yum源文件CentOS7-Base-163.repo 查看CentOS7-Base-163.repo 下载rpm包 安装扩展epel,yum install -y epel-release安装epel包,目录下生成epel.repo和epel-testing.repo文件. yum list 查看rpm包(y

5周第2次课 yum更换国内源 yum下载rpm包 源码包安装

1. yum 更换国内源 系统内置的源很多时候都是官方的,大部分在国外,使用起来不是很快,也很难下载,这时候最好使用国内的源,如163 1.1 删除系统中自带的 yum源配置文件 mv CentOS-Base.repo CentOS-Base.repo.bak 1.2 下载网易 yum 源的配置文件 wget http://mirrors.163.com/.help/CentOS7-Base-163.repo 或者curl -O http://mirrors.163.com/.help/Cent

7.6 yum更换国内源;7.7 yum下载rpm包;7.8 -7.9 源码包安装

扩展: 1. 配置yum源优先级 http://ask.apelearn.com/question/7168 2. 把源码包打包成rpm包 http://www.linuxidc.com/Linux/2012-09/70096.htm 7.6 yum更换国内源 1. 进入/etc/yum.repos.d目录下: [[email protected] ~]# cd /etc/yum.repos.d 2. 删除本地仓库配置文件:rm -f 仓库配置文件 [[email protected] yum.

五周第二次课(1月9日) 7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装

五周第二次课(1月9日)7.6 yum更换国内源7.7 yum下载rpm包7.8/7.9 源码包安装扩展1. 配置yum源优先级 http://ask.apelearn.com/question/7168 2. 把源码包打包成rpm包 http://www.linuxidc.com/Linux/2012-09/70096.htm 命令::================================================================================