Linux 的基本配置

  Linux

1.SSH

禁止密码登录

prohibit-password

2. A start job is running for wait for network to be configured

Run the command as below,

root@XSHQSHE02:~# systemctl mask systemd-networkd-wait-online.service

3.CentOS 密令该yum仓库( repository)

# sed -i ‘s/mirrorlist/#mirrorlist/g’ /etc/yum.repos.d/CentOS-*

# sed -i ‘s|#baseurl=http://mirror.centos.org|baseurl=

http://vault.centos.org|g’ /etc/yum.repos.d/CentOS*

4. MySQL 5.7 initial password

Actually for mysql community server 5.7, the default root password is randomly generated when you install. Check your /var/log/mysqld.log for a line talking about a “temporary password”. Saves hours of messing around. 

5. Generate authorized keys

root@localhost:~/.ssh# ssh-keygen
Generating public/private ed25519 key pair.
Enter file in which to save the key (/root/.ssh/id_ed25519): 
Enter passphrase for "/root/.ssh/id_ed25519" (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_ed25519
Your public key has been saved in /root/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:6PhS2+N/Uwv3GzNskE8FK67jMD687mZBUVVDGf0z5z8 root@localhost.localdomain
The key's randomart image is:
+--[ED25519 256]--+
|         ....o*+ |
|        .     .+.|
|         .  . . o|
|       ..  . ..o+|
|      ..S   .o o+|
|     o. .  .. B .|
|    ...+o.o  + X.|
|    ....B+ .o oE*|
|     ..**=o. . .o|
+----[SHA256]-----+

root@localhost:~/.ssh# mv id_ed25519.pub authorized_keys
root@localhost:~/.ssh# ls
authorized_keys  id_ed25519
root@localhost:~/.ssh# 

LEAVE A COMMENT