linux服务器新节点基础配置

47 阅读1分钟

1、创建用户

useradd ywja

2、设置密码

passwd ywja

2、检查有效期

chage -l ywja

[root@iZbp13tv4lhu40ys4zjjyxZ ~]# chage -l ywja
Last password change                                    : Nov 14, 2023
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7

4、添加到sudo免密

visudo 
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
ywja    ALL=(ALL)       NOPASSWD:ALL

5、安装docker(23版本后自带docker compose) linux安装新版docker(23+)和docker-compose - 掘金 (juejin.cn)