当前位置:网站首页>linx7.5 初始安装
linx7.5 初始安装
2020-11-09 07:35:00 【osc_bskubcvl】
博客地址: https://blog.51cto.com/13718453/2468398
github
dockerhub
修改主机名:
hostnamectl set-hostname node01.magedu.com
root密码忘记:centos7
https://blog.51cto.com/13718453/2468388
关闭图形界面:centos7
https://blog.51cto.com/13718453/2468380
centos7.5修改网卡名称:
https://blog.51cto.com/13718453/2468415
eth0:
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.100.1
PREFIX=24
DNS=114.114.114.114
eth1:
DEVICE=eth1
BOOTPROTO=dhcp
secureCrt time out :
secureCrt ssh vm (因为仅主机,定义的网段有问题,本机ping 都不通)
ping: www.baidu.com: Name or service not known解决方案
https://blog.csdn.net/weixin_41045798/article/details/88694878
默认路由:
route del default
route add default gw 192.168.0.1 eth1
192.168.0.104/24 (桥接网段)
域名解析:cat /etc/resolv.conf
yum epel 仓库:
vim /etc/yum.repos.d/epel.repo
[epel]
name=epel
baseurl=https://mirrors.aliyun.com/epel/$releasever/x86_64/
gpgcheck=0
创建用户:
useradd admin
echo centos |passwd --stdin admin
visudo
admin ALL=(ALL) NOPASSWD: ALL
添加用户组内:
useradd -g wheel admin
history
vim ~/.bash_profile
export HISTTIMEFORMAT="%F %T whoami " 这里插入了whoami用来显示命令的操作用户
export HISTSIZE=100000
export HISTFILESIZE=20000
export HISTTIMEFORMAT="%F %T whoami hostname "
日志清理命令:
find / -mount -type f -size +100M |xargs -i du -sh {}|sort -nr
vim:
%s/137/100/g
[root@node4~]#cat ~/.vimrc
set nu
set cul
set ai
set paste
set ic
set ai
hosts:
[root@node01 ~]# cat /etc/hosts
192.168.100.40 node04.magedu.com node04 node04
192.168.100.30 node03.magedu.com node03 node03
192.168.100.20 node02.magedu.com node02 node02
192.168.100.10 node01.magedu.com node01 node01
上传下载:
yum -y install lrzsz
secure crt 免密连接 虚拟机器;
1、cd .ssh/
2、ssh-keygen
3、 cat id_rsa.pub >> authorized_keys
4、chmod 600 authorized_keys
5、chmod 700 ~/.ssh
6、[root@node01 ~]# cat /etc/ssh/sshd_config |grep -i PermitRootLogin#PermitRootLogin
#PermitRootLogin yes
7、sz id_rsa
主机名:
hostnamectl set-hostname node01.magedu.com
cat /etc/sysconfig/network-scripts/ifcfg-ens33
免密:
ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected]
iplist
192.168.100.10 root centos
192.168.100.20 root centos
192.168.100.30 root centos
192.168.100.40 root centos
#/bin/bash
rpm -q expect &> /dev/null || yum install expect -y &> /dev/null
ssh-keygen -t rsa -P '' -f /root/.ssh/id_rsa &> /dev/null && echo " ssh key is created"
while read line;do
ip=echo $line |awk '{print $1}'
user=echo $line |awk '{print $2}'
password=echo $line |awk '{print $3}'
expect <<EOF
set timeout 50
spawn ssh-copy-id -i /root/.ssh/id_rsa.pub $user@$ip
expect {
"yes/no" { send "yes\n";exp_continue }
"password" { send "$password\n" }
}
expect eof
EOF
echo "$ip is finished"
done < iplist
版权声明
本文为[osc_bskubcvl]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/4383081/blog/4708493
边栏推荐
- 数据库设计:范式与反范式
- C / C + + Programming Notes: pointer! Understand pointer from memory, let you understand pointer completely
- STS安装
- 几行代码轻松实现跨系统传递 traceId,再也不用担心对不上日志了!
- 基于LabVIEW实现的几种滚动字幕
- Database design: paradigms and anti paradigms
- First development of STC to stm32
- Bifrost 之 文件队列(一)
- C++之异常捕获和处理
- 程序员都应该知道的URI,一文帮你全面了解
猜你喜欢

Flink's datasource Trilogy 3: customization

你有没有想过为什么交易和退款要拆开不同的表

使用递增计数器的线程同步工具 —— 信号量,它的原理是什么样子的?

C++邻接矩阵

教你如何 分析 Android ANR 问题

非阻塞的无界线程安全队列 —— ConcurrentLinkedQueue

Have you ever thought about why the transaction and refund have to be split into different tables

几行代码轻松实现跨系统传递 traceId,再也不用担心对不上日志了!

作业2020.11.7-8

上线1周,B.Protocal已有7000ETH资产!
随机推荐
WordPress Import 上传的文件尺寸超过php.ini中定义的upload_max_filesize值--&gt;解决方法。
Leetcode-15: sum of three numbers
2020,Android开发者打破寒冬的利器是什么?
Travel notes of csp-s 2020
A brief introduction of C code to open or close the firewall example
Flink's datasource Trilogy 3: customization
AQS 都看完了,Condition 原理可不能少!
Several common playing methods of sub database and sub table and how to solve the problem of cross database query
Windows环境下如何进行线程Dump分析
Adding OpenGL form to MFC dialog
你有没有想过为什么交易和退款要拆开不同的表
VIM Introduction Manual, (vs Code)
教你如何 分析 Android ANR 问题
上线1周,B.Protocal已有7000ETH资产!
OpenGL ES 框架详细解析(八) —— OpenGL ES 设计指南
Factory Pattern模式(简单工厂、工厂方法、抽象工厂模式)
通过canvas获取视频第一帧封面图
20201108 programming exercise exercise 3
为什么我们不使用GraphQL? - Wundergraph
APP 莫名崩溃,开始以为是 Header 中 name 大小写的锅,最后发现原来是容器的错!