apt

使用apt-mirror搭建debian镜像源

怎甘沉沦 提交于 2019-11-29 02:43:40
debian官方提供了脚本ftpsync来搭建源镜像,而 apt-mirror 是一个更简单便捷的源镜像搭建工具。 安装 apt-mirror sudo apt-get install apt-mirror 配置文件/etc/apt/mirror.list只要修改很少的地方,大部分使用默认值即可。 这里使用中科大镜像 ftp.cn.debian.org 作为上游镜像,只镜像 debian jessie amd64 架构,不镜像源代码包。 ############# config ################## # # set base_path /var/spool/apt-mirror # # set mirror_path $base_path/mirror # set skel_path $base_path/skel # set var_path $base_path/var # set cleanscript $var_path/clean.sh # set defaultarch  # 默认架构与镜像主机的架构一致,这里是amd64 # set postmirror_script $var_path/postmirror.sh # set run_postmirror 0 set nthreads 20 set _tilde 0 # #############

How can I automate dpkg/apt-get?

眉间皱痕 提交于 2019-11-29 02:17:47
I'm trying to create a script that automatically downloads packages for new servers. However, some things like 'mysql-server' can not installed automatically cause you need to configure them in the ncurses interface first. I've looked through the man pages and can't find anything appropriate. I don't care if I have to upload/edit a conf file later -- I just need the appropriate packages installed. Anyone know what to do besides grabbing tarballs and building them myself? UPDATE found out that for things like mysql-server you can just do: DEBIAN_FRONTEND='noninteractive' apt-get install -yq

Using “apt-get install xxx” inside Python script

不想你离开。 提交于 2019-11-28 23:57:55
currently I need to install some package using apt or rpm, according the OS. I saw the lib "apt" to update or upgrade the system, but it is possible use it to install a single package? I was trying to use too "subprocess": subprocess.Popen('apt-get install -y filetoinstall', shell=True, stdin=None, stdout=None, stderr=None, executable="/bin/bash") But this command shows all process in the shell, I cannot hide it. Thank you for your help. You can use check_call from the subprocess library. from subprocess import STDOUT, check_call import os check_call(['apt-get', 'install', '-y', 'filetoinstall

Linux下软件安装

空扰寡人 提交于 2019-11-28 22:57:43
通常 Linux 上的软件安装主要有四种方式: 在线安装 从磁盘安装deb软件包 从二进制软件包安装 从源代码编译安装 apt 包管理工具介绍,APT是Advance Packaging Tool(高级包装工具)的缩写,是Debian及其派生发行版的软件包管理器,APT可以自动下载,配置,安装二进制或者源代码格式的软件包,因此简化了Unix系统上管理软件的过程。 APT最早被设计成dpkg的前端,用来处理deb格式的软件包。现在经过APT-RPM组织修改,APT已经可以安装在支持RPM的系统管理RPM包。这个包管理器包含以 apt- 开头的多个工具,如 apt-get apt-cache apt-cdrom 等,在Debian系列的发行版中使用。 当你在执行安装操作时,首先 apt-get 工具会在本地的一个数据库中搜索关于 w3m 软件的相关信息,并根据这些信息在相关的服务器上下载软件安装,这里大家可能会一个疑问:既然是在线安装软件,为啥会在本地的数据库中搜索?要解释这个问题就得提到几个名词了: 软件源镜像服务器 软件源 我们需要定期从服务器上下载一个软件包列表,使用 sudo apt-get update 命令来保持本地的软件包列表是最新的(有时你也需要手动执行这个操作,比如更换了软件源),而这个表里会有软件依赖信息的记录, 对于软件依赖,我举个例子:我们安装 w3m

How to install “make” in ubuntu? [closed]

﹥>﹥吖頭↗ 提交于 2019-11-28 22:49:10
I'm trying to install "yum" or "apt-get" into my system "ubuntu centOS". I did download the binary files for these two programs from the internet using the command wget. but after decompressing the files using the command "tar -zxvf "filename" ,then configuring the file "./configuring", and then when I want to use the command "make" I get the following error "make: not found". I have searched for a method to download the "make" command but all the methods I found on the net use either the command "yum" or "apt-get" and I don't have any of them. steffenhk I have no idea what linux distribution

Installing R from CRAN Ubuntu repository: No Public Key Error

泪湿孤枕 提交于 2019-11-28 19:29:10
问题 I am on R version 2.13 and would like to update to a newer version in order to use some packages that depend on R>= 2.14. I have the line to my sources.list file as found described here. I then navigate to the terminal and type: sudo apt-get update and get the following error when trying to update R on the CRAN mirror closest to me: Reading package lists... Done W: GPG error: http://lib.stat.cmu.edu oneiric/ Release: The following signatures couldn't be verified because the public key is not

E: Unable to locate package npm

拟墨画扇 提交于 2019-11-28 17:24:52
When i try to install npm with sudo apt-get install npm , i get following error: E: Unable to locate package npm Why can't apt find npm? Im using Debian 9 and already sudo apt-get install nodejs . From the official Node.js documentation: A Node.js package is also available in the official repo for Debian Sid (unstable), Jessie (testing) and Wheezy (wheezy-backports) as "nodejs". It only installs a nodejs binary. So, if you only type sudo apt-get install nodejs , it does not install other goodies such as npm . You need to type: curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

Ubuntu 18 安装kubernetes

杀马特。学长 韩版系。学妹 提交于 2019-11-28 16:17:07
安装dockers 详见上一篇博客 https://mp.csdn.net/postedit/100084226 转自 https://blog.csdn.net/moxiaomomo/article/details/89880900 在大佬的博客上又加了一些实际部署遇到的情况记录一下 #.准备工作 #关闭防火墙 sudo ufw disable #关闭系统swap sudo swapoff -a #安装docker #建议版本: docker-ce-18.0x #2.准备k8s安装环境 #配置k8s的源 { 以下两种自行选择 都执行也没关系 会覆盖 都需要公网ip 或者代理访问外网 #apt 官方源 有时下载不下来 并添加Kubernetes安装的密钥 sudo apt update && sudo apt install -y apt-transport-https curl curl -s https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo apt-key add - sudo touch /etc/apt/sources.list.d/kubernetes.list sudo echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" >

Linux上的套件管理 (rpm, dpkg, yum, apt)

*爱你&永不变心* 提交于 2019-11-28 16:09:44
目前市面上大部分的Linux distro都是根基於Red Hat及Debian這兩大廠牌的改裝(SuSE是一個異類)。因此在套件管理上,Red Hat的RPM與Debian的DPKG就成為Linux套件管理上的兩大標準。 這邊也不討論類Unix作業系統在套件管理(軟體的安裝,移除,查詢)上所持的哲學與一般人常用的MS Windows系列有很大的不同而衍生出的困難了,直接就這兩個套件管理工具列出比較以利查詢。 以下整理列表來自 Jamyy's Weblog : 安裝 目的 rpm 用法 dpkg 用法 安裝指定套件 rpm -i pkgfile.rpm dpkg -i pkgfile.deb 查詢 目的 rpm 用法 dpkg 用法 顯示所有已安裝的套件名稱 rpm -qa dpkg -l (小寫 L) 顯示套件包含的所有檔案 rpm -ql softwarename (小寫 L) dpkg -L softwarename 顯示特定檔案所屬套件名稱 rpm -qf /path/to/file dpkg -S /path/to/file 查詢套件檔案資訊 rpm -qip pkgfile.rpm (顯示套件資訊) rpm -qlp pkgfile.rpm (小寫 L, 顯示套件內所有檔案) dpkg -I pkgfile.deb (大寫 I ) dpkg -c pkgfile.deb

APT配置文件之??sources.list

南楼画角 提交于 2019-11-28 16:09:33
这里有一篇非常不错的文章: http://www.debsir.org/main/?q=node/69 做个记号 三、以水平的观点来看 Debian 特有的三大族群制度:stable、testing、unstable stable 由 『 stable 』 这名词就可以猜到八九分意思了吧,是的!这是 Debian 对外发行的版本,这个版本的最大特色就是稳定,但相对的各个软件套件则通常不是最新版。 这个版本适用在最需要稳定的 Server 架设环境,所安装软件较少也较为固定。 testing 『 testing 』 虽名为测试版,实则已经相当接近于 『 stable 』 版本的程度,这个版本的软件多半是在 『 unstable 』中经由维护、开发人员不断的测试之后流入,所以在某种程度来说,其实已经做过初步的检测,这里头的软件大多也是相当稳定的,而且个软件套件也都会比 『 stable 』 里头的新,不过以软件总量来说则比上 『 stable 』 及 『 unstable 』 中来的完整、来的多。 笔者强烈建议如果想把 Debian 拿来当作 Desktop 平台,『 testing 』 是个很不错的选择。 unstable 『 unstable 』对我来说才算是 『 测试版 』,这里头最大的特色就是软件更新速度快,几乎都与该软件同步,因为太新相对的使用 『 unstable