
linux debian ubuntu
数据库人生
专注于数据库
PostgreSQL;Oracle 11G OCA、OCP;OceanBase V2 OBCA、OBCP
展开
-
Ubuntu 18.04 修改网卡名字,脚本化
os: ubuntu 18.04ubuntu 18.04 使用 netplan 管理网卡root@xxoo:~# cat /etc/network/interfaces# ifupdown has been replaced by netplan(5) on this system. See# /etc/netplan for current configuration.# To r...原创 2019-10-14 16:46:20 · 4043 阅读 · 1 评论 -
ubuntu 环境变量配置文件
/etc/profile在登录时,操作系统定制用户环境时使用的第一个文件 ,此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行。/etc /environment :在登录时操作系统使用的第二个文件, 系统在读取你自己的profile前,设置环境文件的环境变量。~/.profile在登录时用到的第三个文件 是.profile文件,每个用户都可使用该文件输入专用于自己使用...原创 2018-10-24 17:40:02 · 229 阅读 · 0 评论 -
ubuntu 16.04 创建用户
创建用户# groupadd -g 10000 gpadmin# useradd -u 10000 -g gpadmin -s /bin/bash -d /home/gpadmin -m gpadmin# usermod -G root gpadmin# passwd gpadmin配置sudo# vi /etc/sudoersgpadmin ALL=(ALL:ALL) NOPA...原创 2018-11-14 17:24:07 · 251 阅读 · 0 评论 -
ubuntu16.04 LTS 更换aliyun、tsinghua源
备份# cp /etc/apt/sources.list /etc/apt/sources.list.bak替换为 aliyun# vi /etc/apt/sources.list# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricteddeb-s...原创 2018-12-14 14:55:35 · 639 阅读 · 0 评论 -
apt 网络代理设置 http proxy
有时候apt会被网络管理员禁用,这个时候就要找台有权限的机器做代理。session 临时设置# export http_proxy="http://用户名:密码@代理IP:代理端口"# apt updateapt 永久设置# vi /etc/apt/apt.conf# vi /etc/apt/apt.conf.d/00aptagentAcquire::http::Proxy "ht...原创 2018-12-24 09:51:26 · 5443 阅读 · 0 评论 -
ubuntu 16.04 安装桌面环境 gnome
os: ubuntu 16.04ubuntu 16.04 在安装时默认是不安装图形界面的.gnome是linux最流行的桌面环境.安装 xinit# apt update;# apt install -y xinit;安装完 xinit 后,终端由黑色界面变成白底黑字。出现X型的鼠标指针。安装环境管理器 gnome display manager,简称 gdm.# apt in...原创 2019-01-21 12:27:04 · 23114 阅读 · 0 评论 -
ubuntu 16.04 安装桌面环境 kde
ubuntu 16.04 在安装时默认是不安装图形界面的.kde 也是 linux 流行的桌面环境.安装 xinit# apt update;# apt install -y xinit安装完 xinit 后,终端由黑色界面变成白底黑字。出现X型的鼠标指针。安装桌面环境 kubuntu-desktop# apt install -y --no-install-recommends...原创 2019-01-21 12:34:41 · 3366 阅读 · 0 评论 -
ubuntu 16.04 安装桌面环境 xfce
ubuntu 16.04 在安装时默认是不安装图形界面的.xfce 是一款轻量级桌面.安装 xinit# apt update;# apt install -y xinit;安装完 xinit 后,终端由黑色界面变成白底黑字。出现X型的鼠标指针。安装环境管理器 xdm# apt install -y xdm# 安装桌面环境 xubuntu-desktop# apt in...原创 2019-01-21 14:28:59 · 10360 阅读 · 1 评论 -
ubuntu 16.04 配置 vnc4server
安装# apt install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal# apt install vnc4server启动root@xxoo:~# vncserver You will require a password to access your desktops.Passwor...原创 2019-01-21 15:46:59 · 2267 阅读 · 0 评论 -
ubuntu 16.04 更改 ipv6、numa、thp、io scheduler
# vi /etc/default/grubGRUB_CMDLINE_LINUX=" numa=off transparent_hugepage=never "# update-grub# rebootnuma 查看# dmesg |grep -i numa# cat /proc/cmdline# apt install -y numactl# numastat# numac...原创 2019-01-31 10:52:09 · 1486 阅读 · 0 评论 -
linux 配置ssh信任
linux 下,经常需要配置双机或者多机信任,简要记录下具体的操作。 比如配置 a,b两台机器ssh信任。生成密钥a,b两台机器均需要自行# cd ~# ssh-keygen -t rsa此时会生成两个密码文件: id_rsa 私钥文件 id_rsa.pub 公钥文件拷贝公钥配置 a 机器 ssh 免密码到 b机器,需要把 a机器的公钥拷贝到 b机器 的 a...原创 2018-06-04 20:00:17 · 3827 阅读 · 0 评论 -
sudo sudoer 配置
redhat/centos 分支免密登录# vi /etc/sudoers.d/postgrespostgres ALL=(ALL:ALL) NOPASSWD:ALLdebian/ubutu 分支免密登录# vi /etc/sudoerspostgres ALL=(ALL:ALL) NOPASSWD:ALL原创 2018-10-24 13:02:08 · 2006 阅读 · 0 评论 -
debian 各个版本的代号
debian 版本的代号挺有意思的,但就是老记不住,这里自己做个笔记。https://www.debian.org/releases/发行版目录下一代 Debian 正式发行版的代号为 "buster" — 发布时间尚未确定Debian 9("stretch") — 当前的稳定版Debian 8("jessie") — 被淘汰的稳定版Debian 7("wheezy") — 被淘汰的稳定版D转载 2017-12-22 11:10:17 · 14161 阅读 · 1 评论 -
debian 8.2 dynamic add disk
20170628 本次操作是完成虚拟机debian 动态添加磁盘安装debian 8.2省略动态添加硬盘vmware 里手动添加一块硬盘root@debian1:/sys/devices/pci0000:00# ls -l /sys/class/scsi_host 总用量 0 lrwxrwxrwx 1 root root 0 6月 28 15:02 host0 -原创 2017-06-29 18:27:23 · 395 阅读 · 0 评论 -
debian 8.x apt-get 以cdrom为源安装包
debian 8.2 jessie 以光盘为源安装软件1、生成空的/etc/apt/sources.list# mv /etc/apt/sources.list /tmp/sources.list# touch /etc/apt/sources.list2、添加 cdrom源# apt-cdrom add3、查看 /etc/apt/sources.list# ca原创 2018-01-16 19:58:14 · 1628 阅读 · 0 评论 -
ubuntu 16.04 、ubuntu 18.04 允许root进行ssh登录
$ sudo vi /etc/ssh/sshd_config#PermitRootLogin prohibit-passwordPermitRootLogin yes$ sudo passwd root$ sudo service ssh restart然后root用户可以ssh登录了。原创 2018-09-01 23:55:09 · 5039 阅读 · 0 评论 -
ubuntu 16.04 apt-get source 替换为 aliyun
备份# cp /etc/apt/sources.list /etc/apt/sources.list.bak替换# cat /dev/null > /etc/apt/sources.list# vi /etc/apt/sources.list#deb包deb http://mirrors.aliyun.com/ubuntu/ xenial main restric...原创 2018-09-03 08:32:58 · 5291 阅读 · 0 评论 -
apt apt-get apt-cache apt-file 的一些日常操作
重新从源仓库中同步文件索引# apt-get update列出所有可用包# apt-cache pkgnames使用关键字搜索包# apt-cache search "postgresql"列出已经安装的包# dpkg -l | grep -i post列出指定包的基本信息# apt-cache show post原创 2018-09-03 17:59:34 · 2028 阅读 · 0 评论 -
Ubuntu 16.04 修改网卡名字,脚本化
使用 oracle vm 安装 Ubuntu 16.04 时,网卡名称显示:enp0s3,enp0s8,可以通过修改配置文件调整网卡名称。 udev配置文件# vi /etc/udev/rules.d/70-persistent-net.rules:SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:08:4c:07:00:48&q原创 2018-09-13 10:22:14 · 2021 阅读 · 0 评论 -
linux crontab 简述
os: ubuntu 16.04linux crontab 在实际工作中大量使用,这里简单记录下。cron服务cron 在安装os都是默认安装的,如果发现没有安装,可以 apt 安装,对于 redhat 分支可以使用 yum 安装。# ps -ef|grep cronroot 929 1 0 10:15 ? 00:00:00 /usr/sbin/cro...原创 2018-09-28 16:30:42 · 342 阅读 · 0 评论 -
ubuntu 16.04 进入单用户模式
os: ubuntu 16.04在 /etc/rc.local 写错了一行代码,导致os无法正常启动,需要进入到单用户模式修改。1、加电至如下提示,选中第二行,按回车。 Ubuntu*Advanced options for Ubuntu2、会出现如下两行,选中第二行,按键盘 “e” Ubuntu, with Linux 4.10.0-28-generic*Ubuntu, with...原创 2018-09-28 19:27:30 · 8035 阅读 · 0 评论 -
debian 8.2 双网卡绑定 bonding
安装 debian 8.2eth0 eth1eth2 bonding模块工作方式bonding有0-6七种模式,常用的工作方式为0、1、6三种:0: (balance-rr) Round-robin policy: (平衡抡循环策略):传输数据包顺序是依次传输,直到最后一个传输完毕, 此模式提供负载平衡和容错能力。 1: (active-backup) Active-backup p原创 2017-12-21 23:55:51 · 5215 阅读 · 0 评论