首页 > 系统相关 >ubuntu制作本地镜像(类似yum本地)

ubuntu制作本地镜像(类似yum本地)

时间:2024-07-01 17:31:57浏览次数:14  
标签:11g sources apt etc yum 本地 ubuntu cdrom root

 

1.原文件备份
root@11g:/mnt# cd /etc/apt/
root@11g:/etc/apt# cp sources.list bak_sources.list

 

2.挂载安装盘镜像
mkdir -p /media/cdrom/
root@11g:/soft/ios# cd /soft/ios
root@11g:/soft/ios# mount ubuntu-18.04.6-desktop-amd64.iso -o loop /media/cdrom
mount: /media/cdrom: WARNING: device write-protected, mounted read-only.

 

 

3.向source.list中添加一个新的光盘源文件
root@11g:/etc/apt# apt-cdrom -m -d /media/cdrom add


4.更改sources.list
root@11g:/soft/ios# cd /etc/apt/
root@11g:/etc/apt# more sources.list
#deb cdrom:[Ubuntu 18.04.6 LTS _Bionic Beaver_ - Release amd64 (20210915)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb cdrom:[Ubuntu 18.04.6 LTS _Bionic Beaver_ - Release amd64 (20210915)]/ bionic main restricted

除deb cdrom内容,其它内容都注释掉

 

5.更新软件源
root@11g:/etc/apt# apt-get update

 

6.尝试安装
root@11g:/etc/apt#apt-get install gcc -y
root@11g:/etc/apt# which gcc
/usr/bin/gcc

 

标签:11g,sources,apt,etc,yum,本地,ubuntu,cdrom,root
From: https://www.cnblogs.com/hxlasky/p/18278500

相关文章

  • ubuntu与windows双系统时间不同步
    两个系统时间不同步是因为对于硬件时间(BIOS里的时间)的时区认定不一致,windows认为BIOS的时间是当前系统时区(中国时区:UTC+08(CST-8)),ubuntu认为BISO时间是UTC时区时间.两个系统在启动是按照BISO时间设置系统时间导致了系统时间差异。处理思路无非,修改windows或者ubuntu系统对于BIS......
  • Ubuntu23.10 多个硬盘挂载到同一目录
    借鉴https://blog.csdn.net/qq_37054954/article/details/136262332https://www.zhihu.com/question/607744366/answer/3083634568系统:Ubuntu23.10版本:x86_64 无法识别df命令sudoaptinstallcoreutils场景:将/dev/sdb1/dev/sdc1/dev/sdd1/dev/sde1/dev/sdf1 5个硬......
  • Ubuntu23.10 安装SVN
    一、搭建环境查看Ubuntu系统的版本信息:可用cat/proc/version命令、uname-a命令与sb_release-a命令。Ubuntu:23.10 64位SVN:通过apt-get安装二:搭建步骤1.安装SVNsudoapt-getinstallsubversion安装成功后可以验证一下,通过如下命令:svnhelp      //--svn......
  • ubuntu配置网络信息
    环境:Os:18.04.1 1.备份配置文件root@11g:~#cd/etc/netplanroot@11g:/etc/netplan#root@11g:/etc/netplan#cp01-network-manager-all.yamlbak_01-network-manager-all.yaml 2.配置静态ip#LetNetworkManagermanagealldevicesonthissystemnetwork:ethernet......
  • maven项目引用本地jar包
    这个问题相信很多人都碰到过,在maven项目中引用本地jar包有如下两种常见的做法:1、方法一:在pom.xml中的dependency中指定jar路径<dependency><groupId>ojdbc8-12.2.0.1.jar</groupId><artifactId>ojdbc8-12.2.0.1.jar</artifactId><version>1.0</version>......
  • c++使用matplotlibcpp,subplot() 报错问题-ubuntu22.04
    使用matplotlibcpp.h在C++代码中绘制图形plt::subplot();程序抛出运行时错误,terminatecalledafterthrowinganinstanceof'std::runtime_error'what():Calltosubplot()failed.解决方法:在matplotlibcpp.h文件中把PyTuple_SetItem(args,0,PyFloat_FromDouble(......
  • 如何解决Ubuntu安装图形化界面后vnc无法使用root登录的问题?
    ​​运行环境Ubuntu18.04Ubuntu20.04问题描述Ubuntu安装图形化界面后使用root用户,输入正确密码也无法登录,但是可以通过ssh远程登录命令行界面,具体现象如下。alt 通过命令less/var/log/auth.log查看日志信息如下。gdm-password]:pam_succeed_if(gdm-password:auth):......
  • ubuntu配置ssh登录
    环境:Os:18.04.11.查看当前ssh是否运行 2.安装ssh(没有运行的情况下需要安装)sudoapt-getupdatesudoapt-getinstallopenssh-serverroot@oracle-VirtualBox:~#ps-e|grepssh1405?00:00:00ssh-agent4060?00:00:00sshd5143?00:00:00ss......
  • Ubuntu20.04之VNC的安装与使用
    本教程适用于Ubuntu20.04及以下版本,Ubuntu22.04版本或有出入更多更新的文章详见我的个人博客:【前往】文章目录1.安装图形桌面1.1选择安装gnome桌面1.2选择安装xface桌面2.安装VNC-Server3.配置VCN-Server4.连接VNC5.设置VNC-Server为系统服务(可选)1.安装图形桌面如果linux系统已经......
  • 乌班图Ubuntu 24.04 SSH Server 修改默认端口重启无效
    试用最新的乌班图版本,常规修改ssh端口,修改完毕后重启sshd提示没有找到service,然后尝试去掉d重启ssh后查看状态,端口仍然是默认的22,各种尝试都试了不行,重启服务器后倒是端口修改成功了,心想着不能每台机器都重启吧。百思不得其解后查看官网相关(机翻)意思就是22.10之后的版本使用方......