欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 教育 > 高考 > ubuntu优化

ubuntu优化

2024/10/23 23:33:12 来源:https://blog.csdn.net/2201_76119904/article/details/140138054  浏览:    关键词:ubuntu优化
 root@localhost:~# grep -E "^(PermitRootLogin|GSSAPIAuthentication|UseDNS)" /etc/ssh/sshd_config
PermitRootLogin yes
GSSAPIAuthentication no
UseDNS noroot@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 firewallLoaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled)Active: active (exited) since Tue 2024-07-02 14:10:13 UTC; 22min agoDocs: man:ufw(8)Main PID: 744 (code=exited, status=0/SUCCESS)CPU: 866usJul 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 multiversedeb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiversedeb 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 multiversedeb 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 ntpdateroot@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

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com