[Share] Huawei cloud opensuse install the software using zypper

Installing the software (opensuse)

opensuse software can easily be managed through zypper, similar to the yum centos software.

Command Reference

Package Operations

搜索软件
zypper search package

安装软件
zypper install package

安装某个版本的软件包
zypper install package=version

安装以某个单词名字开头的所有软件包
zypper install package*

卸载某个软件包
zypper remove package

升级某个软件包
zypper update package

获取所有可用新包的列表
zypper list-updates

检验软件包的依赖关系的完整性
zypper verify package

执行系统升级
zypper dist-upgrade

执行源代码软件安装和其依赖
zypper source-install package.tgz

Configure the source warehouse

zypper search source software package, if you use the installation CDROM operating system, the software source points to a "cd: //" address.
So you can not download software from the Internet.

By zypper repos --details View source configuration:

# zypper repos --details
# | Alias                                            | Name                                             | Enabled | Refresh | Priority | Type  | URI                                                                    | Service
--+--------------------------------------------------+--------------------------------------------------+---------+---------+----------+-------+------------------------------------------------------------------------+--------
1 | SUSE-Linux-Enterprise-Server-11-SP3 11.3.3-1.138 | SUSE-Linux-Enterprise-Server-11-SP3 11.3.3-1.138 | Yes     | No      |   99     | yast2 | cd:///?devices=/dev/disk/by-id/scsi-1ATA_QEMU_DVD-ROM_QM00003,/dev/sr0 |

The next step is to find an available source, similar to the version required, so first determine the version of opensuse, such as the current version of the SUSE-Linux-11.3

How to determine the version number

# cat /etc/*-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3

About Opensuse version history can refer to Wikipedia
because the experienced many versions, most of the image has been no maintenance outdated version number, leaving only the most Opensuse Leap branch of the mirror, the iterative process of SUSE Linux is as follows:

Currently offers a usable source:
http://mirrors.vbi.vt.edu/mirrors/linux/opensuse/

Add Source operation

zypper ar -t yast2 http://mirrors.vbi.vt.edu/mirrors/linux/opensuse/discontinued/distribution/11.4/repo/oss/ main

Here the use of the 11.4 version, is to install python 2.7. 11.3 in the corresponding warehouse, python just updated to version 2.6 version, similar to the 11.3 and 11.4 kernel version.

Disable the original source invalid

zypper modifyrepo -d 1

Check the source added case

zypper repos --details

Source refresh execution

zypper refresh

After that zypper will refresh the metadata file, we need to wait for some time, after the success of the operation can be carried out.

Related reference

About source type
zypper repo supports three types:

Types of Explanation
rpm-md Recognition repodata / repomd.xml file
yast2k Recognition media.1 / media files
plaindir Read local direct path

By -type [t] parameter to specify the source type

For example the following operations, adding a plurality of different types of sources

zypper ar -t yast2 http://mirrors.vbi.vt.edu/mirrors/linux/opensuse/discontinued/distribution/11.4/repo/oss/  main
zypper ar -t yast2 http://mirrors.vbi.vt.edu/mirrors/linux/opensuse/discontinued/distribution/11.4/repo/non-oss/ nonoss
zypper ar -t rpm-md http://mirrors.vbi.vt.edu/mirrors/linux/opensuse/discontinued/update/11.4/  update

 About configuring
all sources located /etc/zypp/repos.d/ warehouse configuration directory, the file can be edited directly after refresh

Install python

Check the current python version:

python --version
Python 2.6.8

Found version is too low, to be replaced by version 2.7

Delete the existing version of python

zypper remove python

Install the latest version

zypper install python python-devel

Reference Documents

zypper operating instructions
suse official source added
zypper configuration agent s

 

Author:  United States Code Division (zale)

Released 1011 original articles · won praise 5413 · Views 890,000 +

Guess you like

Origin blog.csdn.net/devcloud/article/details/104286707