Ubuntu:修订间差异

来自Gea-Suan Lin's Wiki
跳到导航 跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
→‎apt
第8行: 第8行:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sudo apt install -y apache2-utils build-essential curl dstat git jq moreutils most mtr-tiny net-tools p7zip-full rsync sharutils software-properties-common sysstat unrar unzip vim-nox wget zsh zsh-syntax-highlighting; sudo apt clean
sudo apt install -y apache2-utils build-essential curl dstat git jq moreutils most mtr-tiny net-tools p7zip-full pigz rsync sharutils software-properties-common sysstat unrar unzip vim-nox wget zsh zsh-syntax-highlighting; sudo apt clean
</syntaxhighlight>
</syntaxhighlight>



2019年11月16日 (六) 19:53的版本

Ubuntu是一种Linux操作系统。

安装

apt

这边列出常用的套件:

sudo apt install -y apache2-utils build-essential curl dstat git jq moreutils most mtr-tiny net-tools p7zip-full pigz rsync sharutils software-properties-common sysstat unrar unzip vim-nox wget zsh zsh-syntax-highlighting; sudo apt clean

跳板机会多装这些:

sudo apt install -y keychain mosh; sudo apt clean

设定

在VPS或是云端上的机器通常会利用swapfile增加一些内存使用空间:

sudo fallocate -l 512M /swapfile; sudo chmod 600 /swapfile; sudo mkswap /swapfile; sudo swapon /swapfile; echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

然后设定TCP BBR,需要Linux Kernel 4.9+(如果是Ubuntu 16.04,预设是4.4,会需要安装linux-image-generic-hwe-16.04):

echo -e "net.core.default_qdisc=fq\nnet.ipv4.tcp_congestion_control=bbr" | sudo tee /etc/sysctl.d/99-tcp.conf; sudo sysctl -p /etc/sysctl.d/99-tcp.conf

使用者

echo "gslin ALL = (ALL:ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/gslin; sudo useradd -g staff -G adm,sudo -m -s /bin/zsh gslin; sudo passwd gslin

外部链接