服务器初始化

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了服务器初始化相关的知识,希望对你有一定的参考价值。

服务器初始化

/ 设置主机名 /
/ 配置sshd快速链接 /
Last login: Mon Dec 17 09:14:45 on ttys001
ChaodeMacBook-Pro:~ chaoliu$
ChaodeMacBook-Pro:~ chaoliu$ ssh [email protected]
The authenticity of host ‘192.168.13.251 (192.168.13.251)‘ can‘t be
established.
ECDSA key fingerprint is
SHA256:qD06giqI3l2BW0j/i6HpljGVtUBjbc1b/MTG/XeSD50.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.13.251‘ (ECDSA) to the list of known
hosts.
[email protected]‘s password:
Last login: Mon Dec 17 09:09:09 2018 from 192.168.13.1
[[email protected]_001 ~]#
[[email protected]_001 ~]#
[[email protected]_001 ~]# localhost^C
[[email protected]_001 ~]#
[[email protected]_001 ~]# hostnamectl set-hostname nodes_001
[[email protected]_001 ~]# exit
登出
Connection to 192.168.13.251 closed.
ChaodeMacBook-Pro:~ chaoliu$ ssh [email protected]
[email protected]‘s password:
Last login: Mon Dec 17 09:22:33 2018 from 192.168.13.1
[[email protected]_001 ~]#
ChaodeMacBook-Pro:~ chaoliu$ ssh [email protected]
[email protected]‘s password:
Last login: Mon Dec 17 09:24:43 2018 from 192.168.13.1
[[email protected]_001 ~]# vi /etc/ssh/sshd_config
利?/搜索DNS, 使?的是末?模式的/搜索
把UseDNS yes 改成 UseDNS no, 并且去掉前?的#
[[email protected]_001 ~]# systemctl restart sshd
/ 关闭防?墙和SELinux /
/ 配置yum仓库 /
CentOS6 -- iptables
CentOS7 -- firewalld
ChaodeMacBook-Pro:~ chaoliu$ ssh [email protected]
[email protected]‘s password:
Last login: Mon Dec 17 09:26:31 2018 from 192.168.13.1
[[email protected]_001 ~]#
[[email protected]_001 ~]# systemctl stop firewalld
[[email protected]_001 ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi?user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus?org.fedoraproject.FirewallD1.service.
[[email protected]_001 ~]#
[[email protected]_001 ~]# sed -ri s/SELINUX=enforcing/SELINUX=disabled/g
/etc/selinux/config
[[email protected]_001 ~]# setenforce 0
[[email protected]_001 ~]# getenforce
Permissive
[[email protected]_001 ~]#
yum仓库地址: mirrors.aliyun.com
--在浏览器中输?该地址, 找到centos点击右侧的帮助复制CentOS 7下?的curl指令
--找到epel点击右侧的帮助复制RHEL 7下?的指令, 并在命令终端中把 wget -O 换成 curl<br/>-o
[[email protected]_001 ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo
http://mirrors.aliyun.com/repo/Centos-7.repo
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 2523 100 2523 0 0 20303 0 --:--:-- --:--:-- --:--:--
20512
[[email protected]_001 ~]#
[[email protected]_001 ~]# wget -O /etc/yum.repos.d/epel.repo
http://mirrors.aliyun.com/repo/epel-7.repo
-bash: wget: 未找到命令
[[email protected]_001 ~]# curl -o /etc/yum.repos.d/epel.repo
http://mirrors.aliyun.com/repo/epel-7.repo
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 664 100 664 0 0 3722 0 --:--:-- --:--:-- --:--:--
3751
[[email protected]_001 ~]#
[[email protected]_001 ~]# yum clean all
已加载插件:fastestmirror
正在清理软件源: base epel extras updates
[[email protected]_001 ~]# yum makecache

以上是关于服务器初始化的主要内容,如果未能解决你的问题,请参考以下文章

vscode 用户代码片段 vue初始化模板 Snippet #新加入开头注释 自动生成文件名 开发日期时间等内容

如何在使用cardview的片段中初始化gridlayoutmanager?

环境初始化 Build and Install the Apache Thrift IDL Compiler Install the Platform Development Tools(代码片段

我想在每次选择底部导航项时初始化片段

使用片段的谷歌地图

导航上的片段生命周期重叠