做動(dòng)態(tài)網(wǎng)站不需要DW嗎百度關(guān)鍵詞排名優(yōu)化
ubuntu必備操作
1 更換apt鏡像源
- 備份鏡像
cp /etc/apt/sources.list /etc/apt/sources.list.bak
- 查看自己ubuntu版本
# 查看自己的codename
#查看自己的ubuntu版本[注意關(guān)注:DISTRIB_CODENAME,發(fā)行代號(hào)]
cat /etc/*release# DISTRIB_CODENAME=cosmic
# 例如(下面是ubuntu的LTS長(zhǎng)期支持版):
# Ubuntu20.04(focal)
# Ubuntu19.10(eoan)
# Ubuntu19.04(disco)
# Ubuntu18.04(bionic)
# Ubuntu16.04(xenial)
- 設(shè)置國(guó)內(nèi)鏡像源
我ubuntu的版本是18.10,國(guó)內(nèi)上沒有維護(hù)對(duì)應(yīng)的鏡像,但是大版本一致即可(所以我采用了bionic)
vim /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
- 更新軟件列表,完成換源
apt update
- 修復(fù)損壞的軟件包
apt-get install -f
- 更新軟件
apt-get upgrade
2 其他命令
①防火墻相關(guān)
# 查看防火墻狀態(tài)
sudo ufw status
# 開啟/關(guān)閉防火墻
sudo ufw enable/disable