1、vi编辑器方向键变字母的问题
1、apt-get remove vim-common
2、apt-get install vim
2、安装curl时报错 curl : Depends: libcurl3-gnutls (= 7.47.0-1ubuntu2.12) but 7.58.0-2ubuntu3.6 is to be installed
//安装curl
sudo apt install -y curl
//提示安装curl依赖的libcurl版本不一致,这个时候用purge命令重新安装就好了
sudo apt-get purge libcurl3-gnutls
sudo apt-get install curl
3、安装gcc,g++,make
sudo apt install build-essential
//centos
yum install -y gcc g++ kernel-devel
4、换源
vi /etc/apt/sources.list
//阿里源(不同版本对应源不一样 此处为bionic):
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 main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
//更新一下
apt-get update
apt-get upgrade
5、实现sudo自动输入密码的脚本
实现sudo自动输入密码的脚本如下:其中zjk123为密码
echo 'zjk123' | sudo -S cp file1 /etc/hosts
6、安装rz命令
//centos
yum -y install lrzsz
//ubuntu
apt-get install lrzsz
7、安装libxml2
//解决:
apt-get install libxml2
//安装libxml2-dev软件包,操作如下:
apt-get install libxml2-dev
//centos
yum -y install libxml2
yum -y install libxml2-devel
8、Ubuntu没有/etc/rc.local
//创建
vi /etc/systemd/system/rc-local.service
//写入内容
[Unit]
Description=/etc/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.local
After=network.target
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Alias=rc-local.service
//创建 /etc/rc.local并写入开机内容
vi /etc/rc.local
//创建软链接
ln -s /lib/systemd/system/rc.local.service /etc/systemd/system/