apt

Ubuntu Basic Configuration Commands

雨燕双飞 提交于 2019-11-26 16:18:54
1. Update / Upgrade Commands sudo apt-get update : In a nutshell, apt-get update doesn’t actually install new versions of software. Instead, it updates the package lists for upgrades for packages that need upgrading, as well as new packages that have just come to the repositories. sudo apt-get upgrade : will fetch new versions of packages existing on the machine if APT knows about these new versions by way of apt-get update. An update must be performed first so that apt-get knows that new versions of packages are available. sudo apt-get dist-upgrade : will do the same job which is done by apt

ubuntu18

依然范特西╮ 提交于 2019-11-26 15:00:41
ls -al /bin/sh # choose [No] to use bash sudo dpkg-reconfigure dash sudo apt update sudo apt -y upgrade sudo apt install openssh-server vim net-tools sudo apt install ssh ssh-import-id lzop vim-gnome vim-addon-manager vim-scripts exuberant-ctags ctags \ git git-core git-svn subversion mercurial wget privoxy yasm gcc g++ unzip gitk git-gui build-essential pkg-config aptitude \ automake autoconf samba smbclient samba-common minicom python-glade2 system-config-samba nfs-kernel-server nfs-common \ ant autoconf automake autopoint cmake gawk libtool m4 patch pkg-config libprotobuf-dev libprotobuf-c0

How to install a package using the python-apt API

为君一笑 提交于 2019-11-26 14:03:20
问题 I'm quite a newbie when it comes to Python, thus I beg foregiveness beforehand :). That said, I'm trying to make a script that, among other things, installs some Linux packages. First I tried to use subopen as explained here. While this can eventually work, I stumbled upon the python-apt API and since I'm not a big fan or re-inventing the wheel, I decided to give a try. Problem comes when trying to find examples/tutorials on installing a package using python-apt. Searching the documentation I

what are the differences between node.js and node?

柔情痞子 提交于 2019-11-26 08:55:20
问题 I have installed node.js in my machine (linux mint 15), when I run node example.js , it says: The program \'node\' can be found in the following packages: * node * nodejs-legacy Try: sudo apt-get install <selected package> So what are the differences between node and nodejs? I had both node.js and node installed previously, but when I run node example.js , the web server doesn\'t start at all. So I deleted node and kept node.js. 回答1: The package node is not related to node.js. nodejs is what

Android编译时注解&mdash;&mdash;APT技术

大憨熊 提交于 2019-11-26 08:23:20
APT (Annotation Processing Tool)即 注解处理器 ,是一种处理注解的工具,确切的说它是javac的一个工具,它用来在 编译时 扫描和处理注解。注解处理器以 Java代码 (或者编译过的字节码)作为输入,生成 .java文件 作为输出。 简单来说就是在编译期,通过注解生成 .java 文件。 运行时注解(@Retention(RetentionPolicy.RUNTIME)):之前讲得运行时注解,是在程序运行的时候,获取和解析注解的,并且在获取一些信息后通过反射达到效果。 运行时注解的例子 。 编译时注解(@Retention(RetentionPolicy.CLASS)):编译时注解在编译的时候需要用到代理模式,生成对应java文件,在程序运行的时候,使用该java文件,并调用方法来达到预期的效果。 下面来一步步实现APT: 1.创建注解类: @Retention(RetentionPolicy.CLASS) @Target(ElementType.FIELD) public @interface BindView { int value(); } 2.创建AbstractProcessor实现类: @AutoService(Processor.class) public class BindViewProcessor extends

Install MySQL on Ubuntu without a password prompt

风格不统一 提交于 2019-11-26 07:50:30
问题 How do I write a script to install MySQL server on Ubuntu? sudo apt-get install mysql will install, but it will also ask for a password to be entered in the console. How do I do this in a non-interactive way? That is, write a script that can provide the password? #!/bin/bash sudo apt-get install mysql # To install MySQL server # How to write script for assigning password to MySQL root user # End 回答1: sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password your

阿里云ubuntu nginx无法访问

与世无争的帅哥 提交于 2019-11-25 23:53:23
安装 Nginx 我习惯 fish,可以预装一下: apt install fish root@istaotao:~ # fish Welcome to fish, the friendly interactive shell 注:如果遇到权限问题,需要 sudo ,如: sudo apt install fish 。 Nginx 的软件包在 Ubuntu 默认软件仓库中可用。 安装非常简单,只需键入以下命令: apt update apt install nginx 检查 Nginx 服务的状态: systemctl status nginx 查看版本: root@istaotao ~ # nginx -v nginx version: nginx/1.14.0 ( Ubuntu ) 然后 访问 公网 ip,就可以看到欢迎界面,如果长时间没有响应,说明你的服务器没有开启 80 端口。 参考: 阿里云ubuntu nginx无法访问,求解答 来源: CSDN 作者: 大涛子 链接: https://blog.csdn.net/qq_42840269/article/details/103236285

两小时openstack环境搭建(keystone)...未完待续……

妖精的绣舞 提交于 2019-11-25 22:39:29
一、新建虚拟机4g内存2cpu,unbutu系统 安装并设置时间同步服务 apt update apt install chrony vim /etc/chrony/chrony.conf service chrony restart compute上 apt update apt install chrony vim /etc/chrony/chrony.conf service chrony restart chronyc sources 回到controller chronyc sources 在两台虚拟机上 apt install software-properties-common add-apt-repository cloud-archive:queens apt update && apt dist-upgrade apt install python-openstackclient 安装并配置mysql数据库(controller上) apt install mariadb-server python-pymysql vim /etc/mysql/mariadb.conf.d/99-openstack.cnf [mysqld] bind-address = 10.0.0.11 default-storage-engine = innodb innodb_file

Ubuntu18.04初始化

本小妞迷上赌 提交于 2019-11-25 16:49:38
Ubuntu18.04初始化 更新源: sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo gedit /etc/apt/sources.list deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic