介绍
简要介绍
enca是一个实用的编码转换工具。本案例使用x86_64架构虚拟机,通过评估工具x2openEuler评估enca1.19软件移植到openEuler操作系统的兼容性,并根据评估结果完成软件移植。
开发语言:C
建议的版本
建议使用版本为enca 1.19.1。
环境要求
操作系统要求
操作系统 |
版本 |
openEuler |
20.03 LTS SP1 |
CentOS |
7.6 |
安装操作系统
如果是全新安装操作系统,安装方式建议不要使用最小化安装,否则很多软件包需要手动安装,可选择“Server with GUI”安装方式。 安装openEuler操作系统请参考:
https://openeuler.org/zh/docs/20.03_LTS_SP1/docs/Installation/installation.html。
兼容性评估
评估工具:x2openEuler 评估环境:CentOS7.6
下载x2openEuler工具
下载指引:https://www.openeuler.org/zh/other/migration/
部署工具
rpm -ivh x2openEuler-2.0.0-1.x86_64.rpm
注意:安装rpm时需要使用root用户,且目前需要 络(用于下载安装依赖) 注意:根据提示安装依赖包如bzip2-devel等
su x2openEulerx2openEuler redis-db -init
依次录入redis数据库的ip:127.0.0.1 端口:6379 数据库索引 (0-16):0 密码(工具会对密码加密处理):如果redis密码没有设置或者为空时,直接回车即可
x2openEuler init source_centos7.6-openEuler20.03-LTS-SP1.tar.gz
备注:x2openEuler使用rpm安装完成后会在/opt/x2openEuler目录下带有
source_centos7.6-openEuler20.03-LTS-SP1.tar.gz这个默认资源包 需要支持centos8.2到openEuler20.03-LTS-SP1的评估,则需获取对应的静态资源包导入,如对应的资源包为
source_centos8.2-openEuler20.03-LTS-SP1.tar.gz,导入此包命令:x2openEuler init
source_centos8.2-openEuler20.03-LTS-SP1.tar.gz,请示情况选择对应的资源包
扫描软件
wget http://rpmfind.net/linux/epel/7/x86_64/Packages/e/enca-1.19-1.el7.x86_64.rpmx2openEuler scan enca-1.19-1.el7.x86_64.rpm注意要分析的移植文件需要有能够让x2openEuler用户可以读取的权限扫描完成后会在/opt/x2openEuler/output目录生成html格式的 告
查看评估结果
软件兼容性评估 告分三块内容展示软件兼容性,分别是依赖包兼容性、C/C++接口兼容性、java接口兼容性,依赖包兼容性反映了软件包安装过程中的直接依赖,非100%表明无法正确安装;接口兼容性反映的是单个软件运行过程中对其他软件包、动态库或系统接口的调用变化,非100%表明在某个功能调用时可能会触发异常,未调用到时可能表现正常;部分结果建议人工复核,最终软件包使用建优先级建议 openEuler已移植包>openEuler上人工重编译包>centos软件包。
结果:通过 告可知外部接口兼容性100%,依赖包兼容性人工复核后通过,经评估enca1.19软件包在openEuler 20.03 LTS SP1系统上兼容,可安装此软件包至openEuler 20.03 LTS SP1系统进行验证。
RPM方式安装enca
- 下载rpm包:http://rpmfind.net/linux/epel/7/x86_64/Packages/e/enca-1.19-1.el7.x86_64.rpm。
- 上传至openEuler服务器。
- 说明: 若服务器可以访问 络,则可以直接在服务器上使用wget命令下载源码包。
- 执行如下命令,安装enca。
rpm -ivh enca-1.19-1.el7.x86_64.rpm
运行和验证
- 执行如下命令,验证enca是否安装成功。
enca --version
- 回显信息如下,则表示安装成功。
enca 1.19 Features: -librecode-interface +iconv-interface +external-converter +language-detection +locale-alias+ target-charset-auto +ENCAOPT Copyright (C) 2000-2005 David Necas (Yeti) (<yeti@physics.muni.cz>), 2005 Zuxy Meng (<zuxy.meng@gmail.com>). Enca is free software; it can be copied and/or modified under the terms of version 2 of GNU General Public License, run `enca --license' to see the full license text. There is NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
相关链接:
1. openEuler官 :www.openeuler.org/
2. OS迁移专区:
https://www.openeuler.org/zh/migration/download/
3. openEuler兼容性列表:
https://www.openeuler.org/zh/compatibility/
4. openEuler迁移指南:
https://www.openeuler.org/zh/blog/2022-08-29/migration.html
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!