中标麒麟操作系统安装教程_中标麒麟内核是centos

中标麒麟操作系统安装教程_中标麒麟内核是centos为什么80%的码农都做不了架构师?>>>…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

原贴发表在我的个人博客haha.tk | Ha?Have a Talk!上,转载请注明出处,谢谢。

因为禾斗石开需要,安装了中标麒麟高级服务器操作系统(虚拟化版)V6,然后该系统上部署了几个JAVA WEB项目,现在需要安装nginx,但是yum无法使用,出现以下异常信息:

Loaded plugins: refresh-packagekit, security
http://****: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

修改yum源改为163

cd  /etc/yum.repos.d/
# 备份原有的源
mv ns6-gen-x86_64.repo ns6-gen-x86_64.repo.old
# 下载网易163的源
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
mv CentOS6-Base-163.repo CentOS-Base.repo  
yum clean all
yum makecache

但在 yum makecache报错:

http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
尝试其他镜像。错误:Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

这是因为无法访问http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml,repomd.xmlhttp://mirrors.163.com/centos/6-6.5下已经不存在,需要更改CentOS-Base.repo此文件中的$releasever参数,对于CentOS来说,$releasever来源于 rpm -qi centos-release 的version数值。

# 查询中标麒麟系统的版本
cat /proc/version
Linux version 2.6.32-358.el6.x86_64 (mockbuild@ns60x64.cs2c.com.cn) (gcc version 4.4.7 20120313 (NeoKylin 4.4.7-3) (GCC) ) #1 SMP Fri Jul 12 10:25:19 CST 2013

对于中标麒麟高级服务器操作系统(虚拟化版)V6,经过测试,$releasever直接取 ** 6 ** 即可。

vim  CentOS-Base.repo
#vim命令模式下将所有的$releasever替换为6
:1,s/$releasever/6/g
# 再执行后续的指令
yum clean all
yum makecache

添加nginx的源

根据NGINX官方文档的安装方法:

To add NGINX yum repository, create a file named and paste one of the configurations below:

cd /etc/yum.repos.d/
# 新建nginx.repo文件
vim nginx.repo
# 填写以下内容
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/
gpgcheck=0
enabled=1

注意:$releasever$basearch需要根据系统来确定,中标麒麟高级服务器操作系统(虚拟化版)V6最后确定为http://nginx.org/packages/rhel/6/x86_64/

安装pcre

尝试安装yum install nginx, 安装nginx时报错,因为nginx的rewrite需要pcre库。

./configure: error: the HTTP rewrite module requires the PCRE library.

安装pcre-devel解决问题

yum -y install pcre-devel

重新安装nginx依然出现错误提示:

./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library.   You can either disable the module by using
–without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
–with-http_ssl_module –with-openssl=<path> options.

安装openssl相关软件:

yum -y install openssl openssl-devel

安装pcre:

# 下载相应版本的pcre
pcre-8.39.tar.bz2
# 解包解压缩
tar xjpf pcre-8.39.tar.bz2
# 切换到pcre的目录
cd pcre-7.8
# 配置
./configure --prefix=/usr/local/pcre-8.39 --libdir=/usr/local/lib/pcre --includedir=/usr/local/include/pcre

configure有许多参数可配,具体参见./configure –help及手册

# 编译及安装
make
make install

安装nginx

最后尝试安装yum install nginx,完成。

参考

解决centos 6.6 更换yum 163源报错

CentOS镜像使用帮助

Install

PCRE-nginx pcre library not found

转载于:https://my.oschina.net/thau/blog/825044

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/179090.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 解决了无法显示验证码的问题怎么办_验证码不能显示的问题

    解决了无法显示验证码的问题怎么办_验证码不能显示的问题 晚上检测一个站的时候,猜解出了密码,扫出了后台,可验证码就是无法显示,难道管理员故意弄的?不太可能吧?于是上网一搜,没想到还真找到了解决的方法。我的是VistaUltimate,部分XPSP2也会有这个问题。好了,不废话了,解决办法如下:运行regedit,找到“HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/InternetExplorer/Securit

    2025年9月26日
    5
  • javaweb-青橙项目-1-76

    javaweb-青橙项目-1-76

    2021年5月18日
    127
  • 动态获取地址×××解决方案

    动态获取地址×××解决方案

    2021年8月19日
    55
  • 情感词典文本情感分析_情感名词

    情感词典文本情感分析_情感名词基于情感词典的文本情感分类传统的基于情感词典的文本情感分类,是对人的记忆和判断思维的最简单的模拟,如上图。我们首先通过学习来记忆一些基本词汇,如否定词语有“不”,积极词语有“喜欢”、“爱”,消极词语有“讨厌”、“恨”等,从而在大脑中形成一个基本的语料库。然后,我们再对输入的句子进行最直接的拆分,看看我们所记忆的词汇表中是否存在相应的词语,然后根据这个词语的类别来判断情感,比如“我喜欢数学”,“喜

    2022年8月23日
    9
  • 通过Windows进程ID获取窗口句柄

    通过Windows进程ID获取窗口句柄通过Windows进程ID获取窗口句柄方法一:使用EnumWindows的方式///&lt;枚举窗口参数typedefstruct{HWNDhwndWindow;//窗口句柄DWORDdwProcessID;//进程ID}EnumWindowsArg;///&lt;枚举窗口回调函数BOOLCALLBACKEnumWindowsProc(…

    2022年7月21日
    15
  • python之random库

    random库是用于产生并运用随机数的标准库1.random库函数(1)random.seed(a)设置随机种子数,可以是浮点数或整数,如果不设置的话,则random库默认以系统时间产生当作随

    2021年12月29日
    57

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号