当前位置:网站首页>Initial installation of linx7.5
Initial installation of linx7.5
2020-11-09 07:35:00 【Total cost】
Blog address : https://blog.51cto.com/13718453/2468398
github
dockerhub
Modify hostname :
hostnamectl set-hostname node01.magedu.com
root The code forgot :centos7
https://blog.51cto.com/13718453/2468388
Close graphical interface :centos7
https://blog.51cto.com/13718453/2468380
centos7.5 Modify the network card name :
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 ( Because only the mainframe , There is a problem with the defined network segment , This machine ping It doesn't work )
ping: www.baidu.com: Name or service not known Solution
https://blog.csdn.net/weixin_41045798/article/details/88694878
Default route :
route del default
route add default gw 192.168.0.1 eth1
192.168.0.104/24 ( Bridge segment )
Domain name resolution :cat /etc/resolv.conf
yum epel Warehouse :
vim /etc/yum.repos.d/epel.repo
[epel]
name=epel
baseurl=https://mirrors.aliyun.com/epel/$releasever/x86_64/
gpgcheck=0
Create user :
useradd admin
echo centos |passwd --stdin admin
visudo
admin ALL=(ALL) NOPASSWD: ALL
Add user group :
useradd -g wheel admin
history
vim ~/.bash_profile
export HISTTIMEFORMAT="%F %T whoami
" Here's the insertion of whoami The operating user used to display the command
export HISTSIZE=100000
export HISTFILESIZE=20000
export HISTTIMEFORMAT="%F %T whoami
hostname
"
Log cleanup command :
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
Upload and download :
yum -y install lrzsz
secure crt No secret connection Virtual machines ;
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
Host name :
hostnamectl set-hostname node01.magedu.com
cat /etc/sysconfig/network-scripts/ifcfg-ens33
Unclassified :
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
版权声明
本文为[Total cost]所创,转载请带上原文链接,感谢
边栏推荐
- OSChina 周一乱弹 —— 程序媛的青春
- 基于链表的有界阻塞队列 —— LinkedBlockingQueue
- 使用递增计数器的线程同步工具 —— 信号量,它的原理是什么样子的?
- Sublime text3 插件ColorPicker(调色板)不能使用快捷键的解决方法
- 服务器性能监控神器nmon使用介绍
- 自然语言处理(NLP)路线图 - kdnuggets
- The vowels in the inverted string of leetcode
- First development of STC to stm32
- 几行代码轻松实现跨系统传递 traceId,再也不用担心对不上日志了!
- Why choose f for the back end of dark website? - darklang
猜你喜欢
卧槽,这年轻人不讲武德,应届生凭“小抄”干掉5年老鸟,成功拿到字节20Koffer
Sublime text3 插件ColorPicker(调色板)不能使用快捷键的解决方法
第五章编程
Have you ever thought about why the transaction and refund have to be split into different tables
梁老师小课堂|谈谈模板方法模式
14. Introduction to kubenetes
RabbitMQ脑裂问题解决方案调查
EasyNTS上云网关设备在雪亮工程项目中的实战应用
This program cannot be started because msvcp120.dll is missing from your computer. Try to install the program to fix the problem
salesforce零基础学习(九十八)Salesforce Connect & External Object
随机推荐
当我们聊数据质量的时候,我们在聊些什么?
How does pipedrive support quality publishing with 50 + deployments per day?
程序员都应该知道的URI,一文帮你全面了解
C / C + + Programming Notes: pointer! Understand pointer from memory, let you understand pointer completely
常见特征金字塔网络FPN及变体
How to reduce the resource consumption of istio agent through sidecar custom resource
FC 游戏机的工作原理是怎样的?
通过canvas获取视频第一帧封面图
After Android solves the setrequested orientation, the rotation of the mobile phone screen does not trigger the onconfigurationchanged method
Review of API knowledge
Several rolling captions based on LabVIEW
商品管理系统——整合仓库服务以及获取仓库列表
On buffer overflow
Finally, the python project is released as exe executable program process
首次开通csdn,这篇文章送给过去的自己和正在发生的你
Do you know how the computer starts?
2020,Android开发者打破寒冬的利器是什么?
Bifrost 之 文件队列(一)
SAP S/4HANA 2020安装实录
leetcode之反转字符串中的元音字母