第三章 Ubuntu包管理工具介绍及本地源配置

第四章 Ubuntu 22.04.1 LTS版配置局域网内部网络源 如果软件仓库要为内网其他ubuntu服务器提供服务,就需要安装能提供网络服务的软件包,这样的软件有很多种,如ftp,nginx、apache等,这里使用apache2软件包来提供网络应用服务,下面进行apache2软件的安装。因为apache网站默认根路径为/var/www/html/,为了不修改apache的配置文件,这里就直接在/var/www/html/目录下创建本地仓库的存储目录。(2)、这里需要在内网其他主机上导入服务器中导出的公钥,需要把服务器导出的公钥复制到内网其他主机,然后导入公钥。 阅读详情
AI摘要

文章详细介绍了Ubuntu中的包管理工具dpkg及其用法,包括安装、删除软件包及查询文件等。接着讨论了如何配置本地源以解决内网环境中无法联网安装软件包的问题,包括下载软件包、创建本地仓库和更新源的步骤。此外,还提到了apt工具的作用以及修改安装源为国内阿里云镜像以提高安装速度。,

    不论是在学习还是在做Linux运维的过程中都需要安装各种软件包以及使用包管理工具,但由于很多内网环境几乎不允许生产环境的服务器连接互联网,这样就造成内网服务器无法使用网上的各种源,而且如果使用来回拷贝软件包安装还得解决依赖问题,所以就需要搭建个本地源。

    下面先来介绍Ubuntu两款包管理工具然后再来介绍本地源的配置。

一、包管理工具介绍

1 dpkg包管理器

dpkg 即 package manager for Debian ,是 Debian 和基于 Debian 的系统中一个主要的包管理工具,可以用来管理 deb 格式的软件包。。它可以安装、删除和构建包,但与其他包管理系统不同,它不能自动下载和安装包或者安装包的依赖项。

使用语法:

 dpkg (选项) (参数)

选项介绍:

       -i:安装软件包;

       -r:删除软件包;

       -P:删除软件包的同时删除其配置文件;

      -L package: 显示于软件包关联的文件;

     -l package:显示已经安装包的版本

       -l:显示已安装软件包列表;

     -S keyword : 搜索所属的包内容

      -unpack:解开软件包;

      -c:显示软件包内文件列表;

     –confiugre:配置软件包。

参数:

       Deb软件包:指定要操作的.deb软件包。

2 dpkg命令使用示例

2.1 列出已安装软件包列表

列出系统包数据库中已安装的所有包,从终端提示符类型:

2.2 查看是否安装了特定的包

根据系统上的包数量,这可能会生成大量输出。通过grep输出管道来查看是否安装了特定的包:

sudo dpkg - l | grep apache2

2.3 查询软件包关联的文件

要列出一个包所安装的文件,在本例中是ufw包,输入:

arshou@arshou-ser:~$ dpkg -L ufw

/.

/etc

/etc/default

/etc/default/ufw

/etc/init.d

/etc/init.d/ufw

/etc/logrotate.d

/etc/logrotate.d/ufw

/etc/rsyslog.d

/etc/rsyslog.d/20-ufw.conf

/etc/ufw

/etc/ufw/applications.d

/etc/ufw/sysctl.conf

/lib

/lib/systemd

/lib/systemd/system

/lib/systemd/system/ufw.service

/lib/ufw

/lib/ufw/ufw-init

/lib/ufw/ufw-init-functions

/usr

/usr/lib

/usr/lib/python3

/usr/lib/python3/dist-packages

/usr/lib/python3/dist-packages/ufw

/usr/lib/python3/dist-packages/ufw/__init__.py

/usr/lib/python3/dist-packages/ufw/applications.py

/usr/lib/python3/dist-packages/ufw/backend.py

/usr/lib/python3/dist-packages/ufw/backend_iptables.py

/usr/lib/python3/dist-packages/ufw/common.py

/usr/lib/python3/dist-packages/ufw/frontend.py

/usr/lib/python3/dist-packages/ufw/parser.py

/usr/lib/python3/dist-packages/ufw/util.py

/usr/lib/python3/dist-packages/ufw-0.36.1.egg-info

/usr/sbin

/usr/sbin/ufw

/usr/share

/usr/share/bash-completion

/usr/share/bash-completion/completions

/usr/share/bash-completion/completions/ufw

/usr/share/doc

/usr/share/doc/ufw

/usr/share/doc/ufw/README.Debian

/usr/share/doc/ufw/README.gz

/usr/share/doc/ufw/changelog.Debian.gz

/usr/share/doc/ufw/copyright

/usr/share/doc/ufw/examples

/usr/share/doc/ufw/examples/skel-ui.example

/usr/share/lintian

/usr/share/lintian/overrides

/usr/share/lintian/overrides/ufw

/usr/share/man

/usr/share/man/man8

/usr/share/man/man8/ufw-framework.8.gz

/usr/share/man/man8/ufw.8.gz

/usr/share/ufw

/usr/share/ufw/after.init

/usr/share/ufw/after.rules.md5sum

/usr/share/ufw/after6.rules.md5sum

/usr/share/ufw/before.init

/usr/share/ufw/before.rules.md5sum

/usr/share/ufw/before6.rules.md5sum

/usr/share/ufw/check-requirements

/usr/share/ufw/iptables

/usr/share/ufw/iptables/after.rules

/usr/share/ufw/iptables/after6.rules

/usr/share/ufw/iptables/before.rules

/usr/share/ufw/iptables/before6.rules

/usr/share/ufw/iptables/user.rules

/usr/share/ufw/iptables/user6.rules

/usr/share/ufw/messages

/usr/share/ufw/messages/ar.mo

/usr/share/ufw/messages/ast.mo

/usr/share/ufw/messages/bg.mo

/usr/share/ufw/messages/bs.mo

/usr/share/ufw/messages/ca.mo

/usr/share/ufw/messages/ce.mo

/usr/share/ufw/messages/cs.mo

/usr/share/ufw/messages/da.mo

/usr/share/ufw/messages/de.mo

/usr/share/ufw/messages/el.mo

/usr/share/ufw/messages/en_AU.mo

/usr/share/ufw/messages/en_GB.mo

/usr/share/ufw/messages/es.mo

/usr/share/ufw/messages/et.mo

/usr/share/ufw/messages/fi.mo

/usr/share/ufw/messages/fr.mo

/usr/share/ufw/messages/he.mo

/usr/share/ufw/messages/hu.mo

/usr/share/ufw/messages/id.mo

/usr/share/ufw/messages/it.mo

/usr/share/ufw/messages/ja.mo

/usr/share/ufw/messages/ko.mo

/usr/share/ufw/messages/lv.mo

/usr/share/ufw/messages/nb.mo

/usr/share/ufw/messages/nl.mo

/usr/share/ufw/messages/pl.mo

/usr/share/ufw/messages/pt.mo

/usr/share/ufw/messages/pt_BR.mo

/usr/share/ufw/messages/ru.mo

/usr/share/ufw/messages/se.mo

/usr/share/ufw/messages/sk.mo

/usr/share/ufw/messages/sl.mo

/usr/share/ufw/messages/sr.mo

/usr/share/ufw/messages/sv.mo

/usr/share/ufw/messages/tl.mo

/usr/share/ufw/messages/tr.mo

/usr/share/ufw/messages/uk.mo

/usr/share/ufw/messages/ur.mo

/usr/share/ufw/messages/zh_CN.mo

/usr/share/ufw/messages/zh_TW.mo

/usr/share/ufw/ufw.conf

/usr/share/ufw/user.rules.md5sum

/usr/share/ufw/user6.rules.md5sum

/usr/share/ufw/after.rules

/usr/share/ufw/after6.rules

/usr/share/ufw/before.rules

/usr/share/ufw/before6.rules

/usr/share/ufw/user.rules

/usr/share/ufw/user6.rules

arshou@arshou-ser:~$

2.4  查询软件包的版本

列出一个包所安装的版本,执行dpkg -l 包名,示例如下:

使用 dpkg -l 命令列出当前系统中已经安装的软件以及软件包的状态有如下:

命令输出的第一行为期望状态,期望状态有以下几种:

  • u:即 unknown,软件包未安装且用户未请求安装
  • i:即 install,用户请求安装该软件包
  • r:即 remove,用户请求卸载该软件包
  • p:即 purge,用户请求卸载该软件包并清理配置文件
  • h:即 hold,用户请求保持续当前软件包版本

命令输出的第二行为当前状态,有以下几种:

  • n:即 not-installed,软件包未安装
  • i:即 installed,软件包已安装并完成配置
  • c:即 config-files,软件包已经被卸载,但是其配置文件未清理
  • u:即 unpacked,软件包已经被解压缩,但还未配置
  • f:即 half-configured,配置软件包时出现错误
  • w:即 triggers-awaited,触发器等待
  • t:即 triggers-pending,触发器未决

命令输出的第三行为错误状态,有以下几种:

  • h:软件包被强制保持
  • r:即 reinstall-required,需要卸载并重新安装
  • x:软件包被破坏

因此 ii 表示该软件需要安装且已经安装,没有出现错误; iu 表示已经安装该软件,但未正确配置; rc 表示该软件已经被删除,但配置文件未清理。

2.4.1 筛选查找模式匹配的软件包

使用命令格式:dpkg -l <package_name_pattern>

arshou@ub-client:~$ sudo dpkg -l "apache*"

Desired=Unknown/Install/Remove/Purge/Hold

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)

||/ Name                            Version           Architecture Description

+++-===============================-=================-============-==============================================>

un  apache2-api-20120211            <none>            <none>       (no description available)

un  apache2-api-20120211-openssl1.1 <none>            <none>       (no description available)

ii  apache2-bin                     2.4.52-1ubuntu4.5 amd64        Apache HTTP Server (modules and other binary f>

ii  apache2-data                    2.4.52-1ubuntu4.5 all          Apache HTTP Server (common files)

un  apache2-doc                     <none>            <none>       (no description available)

un  apache2-suexec-custom           <none>            <none>       (no description available)

un  apache2-suexec-pristine         <none>            <none>       (no description available)

ii  apache2-utils                   2.4.52-1ubuntu4.5 amd64        Apache HTTP Server (utility programs for web s

un 表示此软件包没有安装。

2.5 安装本地软件包

使用dpkg安装本地软件包,本地必须有这个软件包,并且这个包没有其他包的依赖关系,使用dpkg才能安装成功,如果有依赖其他包则安装或报错。

以下安装zip包,执行以下命令:

arshou@arshou-ser:~$ sudo dpkg -i zip_3.0-12build2_amd64.deb

(Reading database ... 110181 files and directories currently installed.)

Preparing to unpack zip_3.0-12build2_amd64.deb ...

Unpacking zip (3.0-12build2) over (3.0-12build2) ...

Setting up zip (3.0-12build2) ...

Processing triggers for man-db (2.10.2-1) ...

arshou@arshou-ser:~$

这里使用dpkg安装有依赖的软件包安装部成功之后会有提示报错,比如安装ansible。

查看安装结果:

 这里iU 表示已经安装该软件,但未正确配置;

这个时候安装其他软件包时会提示有包绝少依赖,其他软件无法安装成功,如下:

解决方法把这个已经安装该软件,但未正确配置的软件包删除,然后再安装其他软件包。

2.6 卸载软件包

使用dpkg卸载软件包时,有两个选项可以使用,使用选项P不保留其配置信息,使用选项r时,有配置文件的软件包会保留配置信息。

列如使用选项r卸载apache2时,因为apache2有配置文件,所以使用选项r卸载时会保留配置信息,出口已经卸载的软件时会显示rc。

卸载和查看示例如下:

再使用选项P卸载时,查看就没有apache2时就没有发现apache2了,如下:

 

3 高级包装工具- APT

apt命令是一个强大的命令行工具,它与Ubuntu的高级打包工具(apt)一起工作。apt中包含的命令提供了安装新软件包、升级现有软件包、更新软件包列表索引,甚至升级整个Ubuntu系统的方法。

在介绍apt工具安装或者删除软件包之前先来介绍修改配置安装源的方法,将安装好系统自带默认源改为国内源,这样安装软件包时会加快安装速度。

下面将安装源修改为国内的阿里云的源:

root@arshou-ser:~# vi /etc/apt/sources.list

deb ubuntu安装包下载_开源镜像站-阿里云 jammy main restricted universe multiverse
deb-src ubuntu安装包下载_开源镜像站-阿里云 jammy main restricted universe multiverse

deb ubuntu安装包下载_开源镜像站-阿里云 jammy-security main restricted universe multiverse
deb-src ubuntu安装包下载_开源镜像站-阿里云 jammy-security main restricted universe multiverse

deb ubuntu安装包下载_开源镜像站-阿里云 jammy-updates main restricted universe multiverse
deb-src ubuntu安装包下载_开源镜像站-阿里云 jammy-updates main restricted universe multiverse

# deb ubuntu安装包下载_开源镜像站-阿里云 jammy-proposed main restricted universe multiverse
# deb-src ubuntu安装包下载_开源镜像站-阿里云 jammy-proposed main restricted universe multiverse

deb ubuntu安装包下载_开源镜像站-阿里云 jammy-backports main restricted universe multiverse
deb-src ubuntu安装包下载_开源镜像站-阿里云 jammy-backports main restricted universe multiverse

 

执行apt update:

root@arshou-ser:~# apt update

Hit:1 ubuntu安装包下载_开源镜像站-阿里云 jammy InRelease

Hit:2 ubuntu安装包下载_开源镜像站-阿里云 jammy-security InRelease             

Hit:3 ubuntu安装包下载_开源镜像站-阿里云 jammy-updates InRelease              

Hit:4 ubuntu安装包下载_开源镜像站-阿里云 jammy-backports InRelease

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

11 packages can be upgraded. Run 'apt list --upgradable' to see them.

root@arshou-ser:~#

执行apt update报错解决:

执行 apt update报错:

root@arshou-ser:~# apt update

Reading package lists... Done                                                                        

E: Method https has died unexpectedly!

E: Sub-process https received signal 4.

root@arshou-ser:~#

一般可能是安装源有问题,更换安装源重新update就好了,这里要说的是,就算更换了安装源,依然会报这个错的情况

这里需要在设置了环境变量的情况下执行

root@arshou-ser:~# source /etc/profile   

root@arshou-ser:~# source /etc/environment

这个问题应该是CPU的问题引起,当前使用的CPU为 Intel(R) Xeon(R) Silver 4214 CPU @ 2.20GHz,使用其他cpu的系统是正常的。

补充知识点:

GNUTLS_CPUID_OVERRIDE是一个环境变量,用于指定GnuTLS库使用的CPUID(CPU信息检测)函数的行为。

CPUID是用于检测计算机中央处理器(CPU)的特性和功能的函数。

将GNUTLS_CPUID_OVERRIDE设置为0x1意味着GnuTLS库将忽略CPU的特性检测,并始终使用指定的固定值0x1。

这可能是为了在某些情况下强制使用特定的加密算法或功能,而忽略实际的CPU特性。

然而,设置该环境变量可能会对系统的性能和安全性产生潜在影响。

因为忽略CPU特性检测可能导致在某些情况下使用不合适的加密算法或功能,这可能会降低系统性能或增加安全风险。

因此,在一般情况下,建议不要修改该环境变量,除非您明确知道修改的目的和影响

知识引用站点: <https://www.cnblogs.com/guangdelw/p/17616268.html>

3.1 安装软件包

使用apt安装软件包非常简单。例如,要安装apache2做web服务器,请输入以下命令:

sudo apt install apache2

3.2移除包

删除一个(或多个)包也很简单。要删除前面示例中安装的包,只需输入:

sudo apt remove apache2

这样删除软件包,会保留软件包的配置文件,当使用dpkg -l | grep 软件包名时显示结果会显示rc

有些包卸载不彻底,也会导致各种问题。

debian系的底层包管理程序dpkg可以对于帮助我们找到这些包。

使用dpkg --list可以查看所有包的状态,其中前两位表示状态,第一位为期望的状态,第二位为实际的状态。可以大致理解为:当我们输入安装命令时,第一位置为i(表示install),当命令完成时,第二位置为i。

一个常见的非理想状态是:第一位为r(removed),第二位为c(Cfg-file存在)。

向apt remove添加——purge选项将删除包配置文件。这可能是也可能不是想要的效果,所以要小心使用。

移除软件包是增加--purge参数将会删除软件包已经相关的配置文件,再次查看移除的软件包时就没有rc了

二、配置本地源

1 前言

    由于很多内网环境都是不允许连接互联网,无法使用网上的各种源,而且在安装软件包时由于多数软件包的安装都需要解决依赖关系,使用来回拷贝软件包安装麻也比较麻烦,并且还得解决软件包之间的依赖问题,所以就需要搭建个本地源。

2 系统环境

系统版本

 IP

用途

Ubuntu 22.04.1 LTS

192.168.20.128

软件包源服务器

3 下载软件包

     首先执行下载命令的时候,会系统会默认保存下载的安装包,路径是/var/cache/apt/archives,可以从这里面复制出去安装包,然后就可以拿去制作本地源了。

单纯下载软件包的话,使用以下命令:

如下载时间同步chrony:

root@server:~# apt download chrony

但是更多时候我们需要同时下载一个软件和他的依赖软件,这时候执行如下命令可以一块下载他的依赖,-d参数就是下载模式,不安装,这个的前提是没有安装过这个软件才能下载

root@server:~# apt -d install ansible -y

这样软件包就会下载到/var/cache/apt/archives目录下。

4 安装dpkg-dev工具

需要安装dpkg-dev软件包,才能为本地APT仓库创建软件包元数据。

root@server:~#  apt install -y dpkg-dev

5、配置提供本机使用的源

5.1 创建本地仓库的存储目录

创建/soft/repo目录,用来存放软件包:

root@server:~# mkdir -p /soft/repo

 

将下载好的软件包放置在/soft/repo目录下(这里是下载ansible的安装包和依赖包做源后测试无公网连接来安装ansible):

root@server:~# ll /soft/repo/

total 22380

drwxr-xr-x 2 root root     4096 Jun 13 02:16 ./

drwxr-xr-x 3 root root     4096 Jun 13 02:11 ../

-rw-r--r-- 1 root root 17530700 Jun 13 02:16 ansible_2.10.7+merged+base+2.10.8+dfsg-1_all.deb

-rw-r--r-- 1 root root  1887104 Jun 13 02:16 ieee-data_20210605.1_all.deb

-rw-r--r-- 1 root root    27236 Jun 13 02:16 python3-argcomplete_1.8.1-1.5_all.deb

-rw-r--r-- 1 root root   123058 Jun 13 02:16 python3-dnspython_2.1.0-1ubuntu1_all.deb

-rw-r--r-- 1 root root    21708 Jun 13 02:16 python3-jmespath_0.10.0-1_all.deb

-rw-r--r-- 1 root root    23012 Jun 13 02:16 python3-kerberos_1.1.14-3.1build5_amd64.deb

-rw-r--r-- 1 root root  1554184 Jun 13 02:16 python3-libcloud_3.2.0-2_all.deb

-rw-r--r-- 1 root root    14576 Jun 13 02:16 python3-lockfile_1%3a0.12.2-2.2_all.deb

-rw-r--r-- 1 root root   308658 Jun 13 02:16 python3-netaddr_0.8.0-2_all.deb

-rw-r--r-- 1 root root    20384 Jun 13 02:16 python3-ntlm-auth_1.4.0-1_all.deb

-rw-r--r-- 1 root root    30672 Jun 13 02:16 python3-packaging_21.3-1_all.deb

-rw-r--r-- 1 root root  1026726 Jun 13 02:16 python3-pycryptodome_3.11.0+dfsg1-3build1_amd64.deb

-rw-r--r-- 1 root root    11892 Jun 13 02:16 python3-requests-kerberos_0.12.0-2_all.deb

-rw-r--r-- 1 root root     6160 Jun 13 02:16 python3-requests-ntlm_1.1.0-1.1_all.deb

-rw-r--r-- 1 root root    37984 Jun 13 02:16 python3-requests-toolbelt_0.9.1-1_all.deb

-rw-r--r-- 1 root root   158910 Jun 13 02:16 python3-selinux_3.3-1build2_amd64.deb

-rw-r--r-- 1 root root    54722 Jun 13 02:16 python3-simplejson_3.17.6-1build1_amd64.deb

-rw-r--r-- 1 root root    21660 Jun 13 02:16 python3-winrm_0.3.0-2_all.deb

-rw-r--r-- 1 root root    12608 Jun 13 02:16 python3-xmltodict_0.12.0-2_all.deb

root@server:~#

 

5.2 创建本地软件源的文件

进入/soft/repo目录下:

root@server:~# cd /soft/repo

创建本地软件源的Package.gz和index文件

root@server:/soft/repo# dpkg-scanpackages ./ | gzip -9c > Packages.gz

dpkg-scanpackages: info: Wrote 19 entries to output Packages file.

root@server:/soft/repo#

root@server:/soft/repo# apt-ftparchive packages ./ > Packages

root@server:/soft/repo# apt-ftparchive release ./ > Release

root@server:/soft/repo#

 

5.3 更改安装源为本地源

root@server:/soft/repo# mv /etc/apt/sources.list /etc/apt/sources.list.old

root@server:/soft/repo#

root@server:/soft/repo# vi /etc/apt/sources.list

输入以下内容并保存:

deb [trusted=yes] file:///soft/repo/ ./

更新源

root@server:/soft/repo# apt update

Get:1 file:/soft/repo ./ InRelease

Ign:1 file:/soft/repo ./ InRelease

Get:2 file:/soft/repo ./ Release [1,204 B]

Get:2 file:/soft/repo ./ Release [1,204 B]

Get:3 file:/soft/repo ./ Release.gpg

Ign:3 file:/soft/repo ./ Release.gpg

Get:4 file:/soft/repo ./ Packages [8,635 B]

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

All packages are up to date.

root@server:/soft/repo#

执行更新源命令后,源就只有本地源可以使用了。

5.4 安装软件

前面是下载ansible和其依赖包来做包的安装源,那么我们就安装ansible:

 

先验证是否已经安装有ansible:

 

验证结果没有安装ansible软件,下面进行安装。

root@server:~# apt install -y ansible

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

The following additional packages will be installed:

  ieee-data python3-argcomplete python3-dnspython python3-jmespath python3-kerberos python3-libcloud python3-lockfile python3-netaddr

  python3-ntlm-auth python3-packaging python3-pycryptodome python3-requests-kerberos python3-requests-ntlm python3-requests-toolbelt

  python3-selinux python3-simplejson python3-winrm python3-xmltodict

Suggested packages:

  cowsay sshpass python3-sniffio python3-trio python-lockfile-doc ipython3 python-netaddr-docs

The following NEW packages will be installed:

  ansible ieee-data python3-argcomplete python3-dnspython python3-jmespath python3-kerberos python3-libcloud python3-lockfile python3-netaddr

  python3-ntlm-auth python3-packaging python3-pycryptodome python3-requests-kerberos python3-requests-ntlm python3-requests-toolbelt

  python3-selinux python3-simplejson python3-winrm python3-xmltodict

0 upgraded, 19 newly installed, 0 to remove and 0 not upgraded.

Need to get 0 B/22.9 MB of archives.

After this operation, 243 MB of additional disk space will be used.

Get:1 file:/soft/repo ./ python3-packaging 21.3-1 [30.7 kB]

Get:2 file:/soft/repo ./ python3-pycryptodome 3.11.0+dfsg1-3build1 [1,027 kB]

Get:3 file:/soft/repo ./ python3-dnspython 2.1.0-1ubuntu1 [123 kB]

Get:4 file:/soft/repo ./ ieee-data 20210605.1 [1,887 kB]

Get:5 file:/soft/repo ./ python3-netaddr 0.8.0-2 [309 kB]

Get:6 file:/soft/repo ./ ansible 2.10.7+merged+base+2.10.8+dfsg-1 [17.5 MB]

Get:7 file:/soft/repo ./ python3-argcomplete 1.8.1-1.5 [27.2 kB]

Get:8 file:/soft/repo ./ python3-jmespath 0.10.0-1 [21.7 kB]

Get:9 file:/soft/repo ./ python3-kerberos 1.1.14-3.1build5 [23.0 kB]

Get:10 file:/soft/repo ./ python3-lockfile 1:0.12.2-2.2 [14.6 kB]

Get:11 file:/soft/repo ./ python3-simplejson 3.17.6-1build1 [54.7 kB]

Get:12 file:/soft/repo ./ python3-libcloud 3.2.0-2 [1,554 kB]

Get:13 file:/soft/repo ./ python3-ntlm-auth 1.4.0-1 [20.4 kB]

Get:14 file:/soft/repo ./ python3-requests-kerberos 0.12.0-2 [11.9 kB]

Get:15 file:/soft/repo ./ python3-requests-ntlm 1.1.0-1.1 [6,160 B]

Get:16 file:/soft/repo ./ python3-requests-toolbelt 0.9.1-1 [38.0 kB]

Get:17 file:/soft/repo ./ python3-selinux 3.3-1build2 [159 kB]

Get:18 file:/soft/repo ./ python3-xmltodict 0.12.0-2 [12.6 kB]

Get:19 file:/soft/repo ./ python3-winrm 0.3.0-2 [21.7 kB]

Selecting previously unselected package python3-packaging.

…………………………………………………………………………………………………………………..略

Processing triggers for man-db (2.10.2-1) ...

Scanning processes...                                                                                                                          

Scanning linux images...                                                                                                                       

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

root@server:~#

5.5 编写一个脚本来更新Package.gz和索引文件

创建一个脚本文件以扫描更新Packages.gz文件,因为可能会不时的在本地APT仓库中添加新的deb软件包。因此,每次在repo目录中添加新的deb软件包之后,都需要更新Packages.gz文件和索引文件。

root@server:~# vim /bin/update-debs.sh

#!/bin/bash
cd
/soft/repo
dpkg
-scanpackages ./ /dev/null|gzip -9c >Packages.gz

apt-ftparchive packages ./ > Packages
apt-ftparchive release ./ > Release

给update-debs脚本文件添加可执行权限:

root@server:~# chmod +x /bin/update-debs.sh

现在执行此脚本以创建Packages.gz文件:

root@server:~#  /bin/update-debs.sh

 

 

列举Ubuntu常会使用到的几种镜像源 列举Ubuntu常会使用到的几种镜像源。 阅读详情

相关推荐

搭建pip本地源

环境: 系统ubuntu14.04.5              eth0: 192.168.10.18   可访问外网               eth1: 172.16.1.1          不可访问外网 一:搭建pip本地源 1.首先使用pip下载所有需要的python包到指定的目录内,比如/python-packages root@ubuntu:~# mkdir /

wjcaiyf的专栏 9689

Ubuntu 配置国内源

因为众所周知的原因,国外的很多网站在国内是访问不了或者访问极慢的,这其中就包括了Ubuntu的官方源。因此,在执行 upgrade 之前一定要先执行 update,这样才能保证所有软件包是最新的。upgrade 是升级已安装的所有软件包,升级之后的版本就是本地索引里的。所以,想要流畅的使用apt安装应用,就需要配置国内源的镜像。修复损坏的软件包,尝试卸载出错的包,重新安装正确版本的。中列出的源的索引,这样才能获取到最新的软件包。选择自己操作系统版本的镜像,复制其内容。编辑源文件,改为复制的内容。

天河有尽后为涯,星海无边前作岸。 9842

ubuntu 制作本地源 离线安装

对于一些不能访问Internet的服务器,需要通过离线安装软件。通过制作ubuntu本地源,可以实现通过apt install来离线安装软件。 1.首先需要在能访问网络的机器上,将需要安装的软件包及依赖下载到本地。 以安装expect为例: mkdir packages cd packages apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks

dongsongz的专栏 2867

配置Ubuntu软件源

配置Ubuntu软件源

zhulong20120418的博客 1万+

Linux apt-mirror 同步搭建本地源详解教程

apt-mirror 是一个用于创建 Debian 或 Ubuntu 软件包镜像的工具。它能够将远程软件源中的包同步到本地服务器,使得本地用户可以直接从本地服务器获取所需的软件包,从而减少对外部网络的依赖,提高下载速度和稳定性。通过以上步骤,你可以成功搭建一个本地的 Ubuntu 软件源,提高包管理效率。这个过程可能需要一些时间,具体取决于你的网络速度和要同步的软件源大小。为了保持本地软件源的更新,可以设置定时任务来自动执行同步操作。文件来了解同步进度和状态。假设你的本地软件源目录为。

广阔天地,大有作为 2116

Ubuntu 20.04离线安装Wireshark 3.2.3全攻略:从依赖解析到本地源配置

在Linux系统管理和网络运维中,软件包管理是核心基础技能之一,它涉及依赖解析、版本控制和系统配置等关键原理。尤其在隔离网络或生产服务器环境下,离线安装成为保障服务连续性的必备技术。通过APT包管理器的`apt download`和`dpkg`工具,可以递归获取软件及其完整依赖树,构建自包含的离线包仓库。这种方法不仅解决了网络隔离场景下的部署难题,还提升了软件部署的可重复性和一致性。本文以网络协议分析工具Wireshark为例,详细演示了在Ubuntu 20.04系统中准备离线安装包、处理依赖关系、配置本地

weixin_34163553的博客 593

蓝易云 - Ubuntu(kylin)挂载iso文件和配置apt本地源的方法

接下来我们来配置APT本地源。以上就是Ubuntu Kylin系统挂载ISO和配置APT本地源操作步骤。希望这个指南能帮助到你,并让Ubuntu Kylin变得更加易用和强大!首先,我们来看看如何在Ubuntu Kylin系统中挂载ISO文件。这是一个简单但重要的步骤,因为它允许你访问和使用ISO文件中的数据。在Ubuntu Kylin系统中,挂载ISO文件和配置APT本地源是两个常见的操作。现在, APT已经知道了新添加本地源,并且会从该位置检索和安装包。为实际要挂载的ISO文件路径。

高性价比服务器就选:蓝易云 1918

出现 No services need to be restarted. No containers need to be restarted. No user sessions are 解决方法

此提示严重,如果有意关闭,可继续往下看。

码农研究僧的博客 4723

Ubuntu挂载iso文件和配置apt本地源

版本说明:Ubuntu Server 16.04 LTS 解决问题:解决在无任何互联网的环境下,安装软件时缺少依赖包的问题 将镜像挂载到虚拟机 以VMware Workstation为例,打开“虚拟机设置”,点击“CD/DVD”选项,将 “设备状态”中的“已连接”勾选上。然后选择下方“使用ISO镜像文件”,点击浏览,选择与虚拟机操作系统相同的系统镜像文件即可。 进行iso挂载 # 执...

liuchao的博客 4万+

Win10 LTSC 2021 CPU占用率飙升?KB5017308补丁修复全攻略

本文针对Windows 10 LTSC 2021系统中因wsappx进程导致的CPU占用率异常飙升问题,提供了详细的解决方案。核心在于安装微软官方发布的KB5017308补丁,该补丁能从根本上修复系统组件缺陷,使CPU占用恢复正常。文章详解了补丁的下载、安装步骤、注意事项及安装后的验证方法,是解决此问题的权威指南。

python9snake的博客 1319

告别城市峡谷定位漂移:手把手教你用PSINS仿真INS/NHC/ODO组合导航(附代码获取)

本文详细解析了INS/NHC/ODO组合导航系统在城市峡谷环境中的应用,通过PSINS平台实现精准定位。文章涵盖核心原理、环境搭建、算法实现及性能优化,帮助开发者解决GNSS信号中断时的定位漂移问题,提升自动驾驶系统在复杂环境中的可靠性。

weixin_30329623的博客 432

ubuntu设置本地源详解版(在9.10亲测)

本地源,其一,可以进行软件包备份,下次就不用去网上下载了。 其二,对于没有网络的ubuntu,也可以用apt-get 来安装软件了。 走了很多弯路,这个本地源搞了很多回,但是每次都不是一次成功。 今天又试了一回,刚刚搞好,索性把具体设置贴上来得了。 1.首

elfylin的专栏 1945

别再傻傻分不清!直流有刷、无刷、步进电机,3分钟教你根据项目需求选对电机

本文深入解析直流有刷电机、无刷电机和步进电机的核心差异与应用场景,提供电机选型的黄金法则。通过性能参数对比、成本分析及典型应用案例,帮助工程师根据项目需求精准选择电机类型,避免常见选型误区。特别适合机器人、3D打印等领域的开发者参考。

weixin_29183637的博客 350

ubuntu本地源制作

一.实验环境 服务器端ip:192.168.139.150 测试机ip:  192.168.139.151 步骤二到步骤四在服务器端执行 步骤五,六在客户端执行 二.常用deb包 创建目录mkdir /data/soft -p 打开iso镜像/pool/main 文件下面是常用的deb包,把deb复制到/data/soft目录下面 三.安装dpkg-dev 安装d

979

Wsl/InstallDistro/Service/RegisterDistro/CreateVm/HCS/E_INVALIDARG

摘要:安装WSL2时遇到E_INVALIDARG错误(多核CPU问题),可通过创建.wslconfig配置文件解决。配置内容包括:渐进式内存回收、自动代理、模拟虚拟系统调用、限制内存为4GB和处理器核心数为4。需确保已启用虚拟机平台和Linux子系统功能。 (98字)

猿小白的博客 1069

YOLO 系列专栏(二十九)YOLO26 × StarNet 轻量化涨点方案(CVPR 2024)轻量化、主干改进篇 | 星星卷积虽小,却蕴藏着巨大的高效潜力

StarNet 出自 CVPR 2024 轻量化主干网络工作,核心创新是,依靠逐元素乘法实现高阶特征融合,在几乎不增加参数量与 FLOPs 的前提下,大幅提升特征表达能力,天然适合等多任务统一建模。本文将 StarNet 完整替换 YOLO26 原有主干,保留 YOLO26 无 NMS 检测头与轻量化结构,实现,并提供。

qq_36130719的博客 415

内网离线部署Nginx全攻略:从依赖打包到本地源配置

在Linux系统运维中,软件包管理是核心基础,它通过依赖解析机制自动处理库文件关联,确保应用稳定运行。其原理在于包管理器(如YUM/APT)利用仓库元数据索引,递归解决软件包间的版本约束关系。这一机制在封闭网络环境中价值凸显,因为内网服务器无法直接访问互联网仓库。此时,离线安装方案成为关键,它要求预先在联网环境捕获目标软件及其完整依赖树,构建本地软件仓库。以企业级Web服务Nginx为例,通过yumdownloader或repoquery工具下载所有RPM依赖包,配合createrepo生成元数据,即可形成

weixin_30770783的博客 311

OpenClaw实战系列06:持久记忆与RAG知识库构建——让AI真正“记住”你

本文介绍了OpenClaw AI助理的持久记忆与RAG知识库构建功能。OpenClaw采用"文件即真理"的独特设计,所有记忆都以Markdown文件形式存储,支持直接编辑和Git版本管理。记忆系统分为三层:长期精炼记忆(MEMORY.md)、日常日志(按日期存储)和归档记忆。文章详细说明了环境配置步骤,包括安装必要组件、创建目录结构、设置API密钥,并提供了OpenClaw主配置文件的完整参数说明。该系统实现了跨会话、跨平台的持久化记忆,使AI助理能真正理解用户需求。

PeterPan的博客 1175

aptget本地源 ubuntu_apt-get Ubuntu本地ISO镜像入源

转自http://blog.csdn.net/binchel/article/details/21486999在没有网络的情况下,本地镜像源不实为一个上等的权宜之计!目前linux的两大主流包管理器(基于redhat rpm包系列的yum和基于以debian deb包系列的apt-get)都提供本地dvd或ISO入源的功能,即使用本地的dvd或ISO镜像作为软件安装源。但ISO镜像比刻盘后再放进光...

weixin_39755712的博客 313

OpenClaw实战:拒绝复制粘贴,用 xlsx 技能打通“带公式模板”的月报自动化

本文详解了如何利用 OpenClaw 框架搭载的 xlsx skill,解决 AI 自动化处理“带复杂公式与格式”Excel 月报时极易翻车的业务痛点。针对传统大模型粗暴写入导致模板报废的问题,OpenClaw 创新采用“双核微创”工作流:首先利用 pandas 高效清洗并聚合海量原始明细数据,随后切换至 openpyxl 将计算结果精准注入目标模板,完美保留原有的底色、边框与跨表动态公式。

我有一个梦想 159

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

yum包管理器

我们将yum称为包管理器,主要用来解决:下载、依赖关系、安装、卸载四种问题。在Linux系统中有一个yum软件服务器,上面有Linux需要的各种软件软件包,我们使用yum命令去云服务器下载我们所需要的软件,然后再本地进行安装。对于这种行为不知道大家觉得似曾相识,yum的使用本质上和手机应用商店是一样的,所以手机上的应用市场对应Linux下的yum工具。也就是说,yum类似于手机的应用市场,是用来解决Linux的软件下载、安装、卸载、问题的包管理器。

m0_56578216的博客 203

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

ubuntu制作本地源

背景 平时apt-get install安装软件时,下载的deb文件都会存放在/var/cache/apt/archives/下,为了今后重装或给别人用,特别是没有网络时,这些deb文件实际上是可以派上用途的,也就是可以用这些deb制作成本地源。这种方法还有一个应用场景: 先在有网络的服务器上面进行apt-get install安装 然后制作本地源 将...

weixin_34336526的博客 95

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Ubuntu apt 离线使用本地源

# 在能上网的笔记本上下载好需要的包 $ sudo rm -rf /var/cache/apt/archives/* # 清空缓存目录,这一步也可以不做 $ sudo apt-get -d install <包名> # 运行完该命令后,需要的包及依赖都会下载到 /var/cache/apt/archives。 # 将...

三流程序员,三流的技术,一流的态度和真心,期待和你们交流合作🤝🤝🤝。 1133

离线安装gcc/make依赖包全解析:手动RPM/DEB安装与本地源方案对比

本文全面解析了在离线环境下安装GCC与Make的两种主流方案:手动RPM/DEB依赖包安装与本地镜像源配置。通过详细的依赖树分析、操作流程演示和故障排除指南,帮助用户在无网络环境中高效构建编译工具链,特别适用于服务器运维和嵌入式开发场景。

cumo3681的博客 402

ubuntu系统常用命令大全

Ubuntu是一个以桌面应用为主的Linux发行版操作系统Ubuntu是一个以桌面应用为主的Linux操作系统,其名称来自非洲南部祖鲁语或豪萨语的“ubuntu”一词,意思是“人性”“我的存在是因为大家的存在”,是非洲传统的一种价值观。以下都是基于ubuntu20的系统配置。

1478
上一篇: 第二章 Linux基础网络配置及用户管理
下一篇: 第四章 Ubuntu 22.04.1 LTS版配置局域网内部网络源
yjun89
博客等级 码龄18年 408粉丝 12原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yjun89

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值