当前位置: 首页 > news >正文

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

http://www.lryc.cn/news/393005.html

相关文章:

  • 使用 HBuilder X 进行 uniapp 小程序开发遇到的问题合集
  • Python爬虫获取视频
  • Python自动化,实现自动登录并爬取商品数据,实现数据可视化
  • 计算机网络——数据链路层(以太网)
  • Java ORM框架FastMybatis踩坑
  • AI是在帮助开发者还是取代他们?
  • C. Theofanis‘ Nightmare
  • 加密货币大利好!9月降息概率突破70%!美国可能大幅降息或多次降息?
  • Dns被莫名篡改的逆向分析定位(笔记)
  • SpringBoot中整合ONLYOFFICE在线编辑
  • Python打字练习
  • Pytorch添加自定义算子之(10)-mmdeploy编译流程
  • 大数据面试题之Flink(4)
  • C#实战|账号管理系统:通用登录窗体的实现。
  • php简单商城小程序系统源码
  • NativeMemoryTracking查看java内存信息
  • 建智慧医院核心:智能导航系统的功能全析与实现效益
  • 数据库基础之:函数依赖
  • Newport太阳光模拟器MSOL-UV-X使用说明手侧
  • pandas读取CSV格式文件生成数据发生器iteration
  • SpringBoot 启动流程四
  • 实现桌面动态壁纸(二)
  • JavaEE——计算机工作原理
  • 并发、多线程和HTTP连接之间有什么关系?
  • 展开说说:Android服务之startService源码解析
  • Java + MySQL 实现存储完整 Json
  • 解决刚申请下来的AWS EC2,无法用finalshell连接的问题
  • 如何在PD虚拟机中开启系统的嵌套虚拟化功能?pd虚拟机怎么用 Parallels Desktop 19 for Mac
  • vue中实现button按钮的重复点击指令
  • 智能与伦理:Kimi与学术道德的和谐共舞