ubuntu优化

 root@localhost:~# grep -E "^(PermitRootLogin|GSSAPIAuthentication|UseDNS)" /etc/ssh/sshd_config
PermitRootLogin yes
GSSAPIAuthentication no
UseDNS no


root@localhost:~# systemctl restart sshd

#此时就可以设置root密码了

root@localhost:~# passwd 
New password: 
Retype new password: 
passwd: password updated successfully



防火墙
root@localhost:~# systemctl status ufw
● ufw.service - Uncomplicated firewall
     Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled)
     Active: active (exited) since Tue 2024-07-02 14:10:13 UTC; 22min ago
       Docs: man:ufw(8)
   Main PID: 744 (code=exited, status=0/SUCCESS)
        CPU: 866us

Jul 02 14:10:13 localhost systemd[1]: Starting Uncomplicated firewall...
Jul 02 14:10:13 localhost systemd[1]: Finished Uncomplicated firewall.
root@localhost:~# 

root@localhost:~# systemctl stop ufw

配置 ubuntu 源

去阿里云找ubuntu

root@localhost:~# cat /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse




在 root@localhost:~# apt updata
即可

时间同步

root@localhost:~# apt install ntpdate

root@localhost:~# cat /var/spool/cron/root
*/2 * * * * /usr/sbin/ntpdate ntp.aliyun.com >/dev/null 2>1&

rsync服务

rsync服务
已经安装
手动创建配置文件 /etc/rsyncd.conf
systemctl restart rsync
systemctl enable rsync

nfs服务

apt install nfs-common nfs-kernel-server
#正常启用即可
rbcbind
systemctl enable nfs-kernel-server
systemctl restart nfs-kernel-server

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值