CentOS7 之基础设置及常见操作命令
1、Host SMbus controller not enabled
解决方法: 在 /etc/modprobe.d/blacklist.conf 文件里添加
blacklist i2c_piix4
2、intel_rapl: no valid rapl domains found in package 0
解决方法: 在 /etc/modprobe.d/blacklist.conf 文件里添加
blacklist intel_rapl
3、修改开机等待时间
在 /boot/grub2/grub.cfg 找到并修改下面的代码
terminal_output console
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout= (建议修改成1,不要修改成0,修改完成后,重启即可看到效果)
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
4、选定默认启动内核,及删除无用内核
#使用cat /boot/grub2/grub.cfg |grep menuentry 查看系统可用内核
[root@bigapp-slave27 ~]# cat /boot/grub2/grub.cfg |grep menuentry
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
menuentry_id_option=""
export menuentry_id_option
menuentry 'CentOS Linux (3.10.0-514.16.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-6f5840d0-55ac-4d3b-899b-61c0297c5347' {
menuentry 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-6f5840d0-55ac-4d3b-899b-61c0297c5347' {
menuentry 'CentOS Linux (0-rescue-d57307c454c0437d91c309347178cdf5) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-d57307c454c0437d91c309347178cdf5-advanced-6f5840d0-55ac-4d3b-899b-61c0297c5347' {
#查看当前内核
[root@bigapp-slave27 ~]# uname -r
3.10.0-514.16.1.el7.x86_64
#修改开机时默认使用的内核
grub2-set-default 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)'
#查看内核修改结果
[root@bigapp-slave27 ~]# grub2-editenv list
saved_entry=CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
#查看系统安装了哪些内核包
[root@bigapp-slave27 ~]# rpm -qa |grep kernel
kernel-3.10.0-327.el7.x86_64
kernel-headers-3.10.0-514.6.1.el7.x86_64
kernel-tools-libs-3.10.0-327.el7.x86_64
kernel-3.10.0-514.16.1.el7.x86_64
kernel-tools-3.10.0-327.el7.x86_64
#使用yum remove 或rpm -e 删除无用内核
yum remove kernel-3.10.0-327.el7.x86_64
5、中断ping命令
ctrl+c是可以的。不然也可以ctrl+z,然后kill %1
最好的方法还是 ping -c 3 192.168.1.1 ,-c 3表示ping 3次
6、关闭防火墙
CentOS 7.0默认使用的是firewall作为防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
7、修改虚拟机配置文件,设置固定IP
cd /etc/sysconfig/network-scripts

vi ifcfg-ens33

注意:ONBOOT="yes"
修改:BOOTPROTO="static"
添加:
DNS1=114.114.114.114 #这个是国内的DNS,是固定的,当然还有个8.8.8.8,是国外谷歌的IPADDR=192.168.25.135 # 设置一个和原来动态分配的ip在同一子网的IP
NETMASK=255.255.255.0 #子网掩码
GATEWAY=192.168.25.2 #网关,vmvare的nat模式网关为x.x.x.2
重启网络服务
service network restart
参考链接:http://www.cnblogs.com/wycc/p/6066342.html
CentOS7 之基础设置及常见操作命令的更多相关文章
- linux网络基础设置 以及 软件安装
ifconfig #查看所有已激活的网卡信息 临时配置 #yum install net-tools -y 默认ifconfig是没有安装的,可能需要安装 ifconfig eth0 #查看单独一块网 ...
- linux基础-第十四单元 Linux网络原理及基础设置
第十四单元 Linux网络原理及基础设置 三种网卡模式图 使用ifconfig命令来维护网络 ifconfig命令的功能 ifconfig命令的用法举例 使用ifup和ifdown命令启动和停止网卡 ...
- Linux网络服务01——Linux网络基础设置
Linux网络服务01--Linux网络基础设置 一.查看及测试网络 1.使用ifconfig命令查看网络接口 (1)查看活动的网络接口 ifconfig命令 [root@crushlinux ~]# ...
- Redis入门很简单之二【常见操作命令】
Redis入门很简单之二[常见操作命令] 博客分类: NoSQL/Redis/MongoDB redisnosql缓存 Redis提供了丰富的命令,允许我们连接客户端对其进行直接操作.这里简单介绍一 ...
- gRPC学习之一:在CentOS7部署和设置GO
欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...
- centos7 ip地址设置
centos7 ip地址设置 http://simonhu.blog.51cto.com/196416/1588971 CentOS系统 修改DNS 修改对应网卡的DNS的配置文件 # vi /etc ...
- hibernate----hibernate的基础设置
本次学习的内容是hibernate的基础设置 具体内容为: 一.准备工作 1.新建java工程 2.自动引入相关库(自动生成SessionFactory) 3.将数据库驱动拿进来 4.添加hibern ...
- postfix 邮箱设置及常见错误
postfix 邮箱设置及常见错误 1.如果装了sendmail的话,先卸载了. yum remove sendmail 2.安装 Postfix yum install postfix 3.更改默认 ...
- Ubuntu安装VirtualBox以及CentOS7.5联网设置
一.virtualBox的安装 官方Liunx版本下载地址: https://www.virtualbox.org/wiki/Linux_Downloads 这里选择下载ubuntu 16.04 ...
随机推荐
- String详解, String和CharSequence区别, StringBuilder和StringBuffer的区别
本章主要介绍String和CharSequence的区别,以及它们的API详细使用方法. 转载请注明出处:http://www.cnblogs.com/skywang12345/p/string01. ...
- 逻辑控制之While循环控制器(While Controller)
测试环境 apache-jmeter-3.0 1. 添加While Controller 右键线程组->添加->逻辑控制器->响应断言 2. 控制面板介绍 添加后,面板如下 ...
- 把数组存入到cookie中
$arr = array(1,2,3); // 把数组序列化之后,存入到cookie中 $arr_str = serialize($arr); // 序列化数组 setcookie('a',$arr_ ...
- phpunit安装出错的原因及解决办法
官方指引 很遗憾, phpunit还没有在ArchLinux的仓库里. 所以使用下载安装的方式.按照官方的指引: wget https://phar.phpunit.de/phpunit.phar c ...
- 【leetcode 简单】 第六十八题 二叉搜索树的最近公共祖先
给定一个二叉搜索树, 找到该树中两个指定节点的最近公共祖先. 百度百科中最近公共祖先的定义为:“对于有根树 T 的两个结点 p.q,最近公共祖先表示为一个结点 x,满足 x 是 p.q 的祖先且 x ...
- Python练习-函数(方法)的定义和应用
需求:对文件进行增删改查,使用函数调用的方式完成操作 # 编辑者:闫龙 import MyFuncation; Menu = ["查询","添加"," ...
- Linux基础-yum软件包管理
任务目标:自定义yum仓库:createrepo,自定义repo文件,使用yum命令安装httpd软件包,卸载httpd软件包:yum –y remove 软件名 ,使用yum安装组件'KDE 桌面' ...
- D - Balanced Ternary String (贪心)
题目链接:http://codeforces.com/contest/1102/problem/D 题目大意:给你一个字符串,这个字符串是由0,1,2构成的,然后让你替换字符,使得在替换的次数最少的前 ...
- IIC串行总线的组成及其工作原理
------------------最近项目上用到了一款美信的DS1308RTC芯片,由于是挂在了Zynq的PS MIO上,需要软件人员协助才能测试:觉得太麻烦了,想通过飞线,然后在Vivado中调用 ...
- aarch64_l4
livestreamer-1.12.2-7.fc26.noarch.rpm 2017-02-11 17:38 537K fedora Mirroring Project lizardfs-adm-3. ...