Skip to main content

centos

· One min read
tee /etc/locale.conf <<-'EOF'
LANG="en_US.utf8"
#LC_ALL="en_US.utf8"
LC_ALL="C"
EOF

tee /root/.vimrc <<-'EOF'
set encoding=utf-8
set fileencoding=utf-8
EOF

repo 修改源

# mv CentOS-Base.repo CentOS-Base.repo.bak
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache #生产本地缓存
# yum-update

epel 加好多rpm

yum install -y epel-release

常用必装

yum install -y yum-utils    # yum-config-manager --add-repo
yum install -y htop
yum install -y tree
yum install -y net-tools # netstat -ntlp

其他

yum lock

yum-complete-transaction

wifi

dmesg | grep firmware
ip addr show wlo1
wpa_supplicant -B -i wlo1 -c <(wpa_passphrase "iPhone 8" "1234567890")

ssh remote

yum list installed | grep openssh-server
yum install openssh-server

/etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes

sudo service sshd start