8、使用本地光盘制作一个yum源
2021/5/7 7:25:15
本文主要是介绍8、使用本地光盘制作一个yum源,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
8、使用本地光盘制作一个yum源
-
挂载光盘
-
mount /dev/cdrom /mnt
-
删除
yum.repos.d
目录下的所有repo文件 -
rm -rf /etc/yum.repos.d/*
-
创建新的文件dvd.repo
-
vim /etc/yum.repos.d/dvd.repo
-
刷新repos缓存生成的缓存
-
yum makecache
8.1、利用yum工具下载一个rpm包
8.2、下载一个源码包
- 解包阶段
tar zxf httpd-2.4.46.tar.gz
- 配置阶段(类似于Windows2008的角色服务,安装路径等)
configure: error: APR not found. Please read the documentation.
下载路径:http://apr.apache.org/download.cgi
[root@localhost src]# tar -zxf apr-1.7.0.tar.gz [root@localhost src]# ./configure --prefix=/usr/local/apr bash: ./configure: 没有那个文件或目录 [root@localhost src]# cd apr-1.7.0 [root@localhost apr-1.7.0]# ./configure --prefix=/usr/local/apr
- make
- make install
configure: error: APR-util not found. Please read the documentation.
tar -zxf ...
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
错误:
make[1]: 进入目录“/usr/local/src/apr-util-1.6.1” /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo xml/apr_xml.c:35:19: 致命错误:expat.h:没有那个文件或目录 #include <expat.h> ^ 编译中断。 make[1]: *** [xml/apr_xml.lo] 错误 1 make[1]: 离开目录“/usr/local/src/apr-util-1.6.1” make: *** [all-recursive] 错误 1
解决:
yum install -y expat-devel
错误:
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
下载安装:
https://www.linuxfromscratch.org/blfs/view/svn/general/pcre.html
错误:
checking for windows.h… no
configure: error: Invalid C++ compiler or C++ compiler flags
安装:yum install -y gcc gcc-c++
接着安装pcre
./configure
make
make install
安装httpd
[root@localhost ~]# cd /usr/local/src/httpd-2.4.46 [root@localhost httpd-2.4.46]# ./configure --prefix=/usr/local/httpd
妈呀注意配置相关httpd的时候要注意,它依赖于:pcre还有 apr-util
./configure --prefix=/usr/local/httpd --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
终于可以了!
后面就是make&&make install
测试:echo $?
查看Makefile文件
进行编译:
make&&make install
查看:
ls /usr/local/httpd
这篇关于8、使用本地光盘制作一个yum源的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-09-28微服务架构中API版本控制的实践
- 2024-09-28AI给的和自己写的Python代码,都无法改变输入框的内容,替换也不行
- 2024-09-27Sentinel配置限流资料:新手入门教程
- 2024-09-27Sentinel配置限流资料详解
- 2024-09-27Sentinel限流资料:新手入门教程
- 2024-09-26Sentinel限流资料入门详解
- 2024-09-26Springboot框架资料:初学者入门教程
- 2024-09-26Springboot框架资料详解:新手入门教程
- 2024-09-26Springboot企业级开发资料:新手入门指南
- 2024-09-26SpringBoot企业级开发资料新手指南