中标麒麟操作系统安装教程_中标麒麟内核是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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • mysql8.0压缩包安装教程(zarchiver怎么安装游戏)

    首先声明,这里是Mysql8.0.27版本、64位操作系统解压版mysql的下载及安装配置及修改初始密码。如果是其他版本的mysql安装,可以自行查找其他方法,记住搜索的时候最好加上是什么版本的,因为不同版本的mysql安装的时候有些命令是不同的,例如,mysql5.7的就搜索mysql5.7安装。话不多说,接下来就是我的mysql8.0.27版本的教程了。1.下载打开下载地址:https://dev.mysql.com/downloads/mysql/,找到箭头中的文件https:/

    2022年4月14日
    194
  • 线性代数,行列式(加边法求行列式例题)

    一、二阶和三阶行列式1.二阶行列式PS:只适用于二元线性方程;2.三阶行列式 二、全排列及其逆序数1.全排列把n个不同的元素排成一列,叫做这n个元素的全排列;2.逆序数对于n个不同的元素,先规定各元素之间有一个标准次序,于是在这n个元素的任一排列中,当某两个元素的先后次序与标准次序不同时,就说有一个一个逆序,一个排列中所有逆序的总数叫做这个排列的逆序数。…

    2022年4月16日
    182
  • ViewState 剖析

    ViewState 剖析 ViewState不是什么?1.ViewState不是用来恢复回发的控件的值。这个是通过匹配form中该控件的变量名而自动完成的。这个只对Load事件加载之前创建的控件有效。2.ViewState不会自动重新创建任何通过代码动态创建的控件。3.不是用来保存用户信息的。仅仅保存本页的控件状态,而不能在页面之间传递。ViewState是什么?ViewState用来

    2022年7月21日
    13
  • Marsaglia XORshift随机数算法「建议收藏」

    Marsaglia XORshift随机数算法「建议收藏」引理:二进制矩阵相乘中加法为异或。给定非空向量beta和n阶矩阵T,序列beta*T,beta*T^2,beta*T^3,…的秩为2^n-1的充要条件是矩阵T为非奇异矩阵.L是左移位操作,y=y^(y>b)表示为y=y*(E+R^b),令T=(E+L^a)(E+R^b),n=32或64,找不到这样的非奇异矩阵。但是令T=(E+L^a)*(E+R^b)*(E+L^c)能找

    2022年7月26日
    9
  • idea最新激活码2021_通用破解码

    idea最新激活码2021_通用破解码,https://javaforall.net/100143.html。详细ieda激活码不妨到全栈程序员必看教程网一起来了解一下吧!

    2022年3月17日
    58
  • Eclipse导入Maven工程报异常

    Eclipse导入Maven工程报异常蛋疼的一天,今天刚弄好新机子,迁移项目,导入的时候报如下错误:Couldnotcalculatebuildplan:Pluginorg.apache.maven.plugins:maven-resources-plugin:2.6oroneofitsdependenciescouldnotberesolved:Failedtoreadartifac

    2022年5月18日
    34

发表回复

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

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