CentOS 7一些常用配置
一、更改启动模式
背景:个人开发环境,安装了GNOME桌面,默认启动是图形化模式。
修改为命令行模式。
systemctl set-default multi-user.target
二、命令行模式下启动图形
startx 想重新打开命令行界面呢?
alt + ctrl +F1~F6 //这个方法尝试了下不好用
三、实时查看启动日志
默认是有图片覆盖在屏幕上的,我想看看为啥启动到哪一步了?(当然也可以在val/log/boot.log中看)
这里是修改为实时显示的方法。
1 vim /boot/grub2/grub.cfg
2 找到如下一行:
3 linux16 /vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_US.UTF-8
4 删除rhgb(redhat图形化启动)即可。 更优雅一些的方法:
1 vim /etc/default/grub
2 删除配置参数GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet"中的rhgb
3 执行grub2-mkconfig -o /boot/grub2/grub.cfg重新生成启动参数。
四、永久关闭SElinux
执行vim /etc/selinux/config,将文件中的enforcing改为disabled即可。
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
五、关闭防火墙
关闭防火墙:
systemctl stop firewalld.service
启动防火墙:
systemctl start firewalld.service
禁止防火墙启动:
systemctl disable firewalld.service
CentOS 7一些常用配置的更多相关文章
- CentOS 6.5环境使用ansible剧本自动化部署Corosync + pacemaker环境及corosync常用配置详解
环境说明: 192.168.8.39 node2.chinasoft.com 192.168.8.42 node4.chinasoft.com 192.168.8.40 ansible管理服务器 19 ...
- VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装
VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装在阿里云开源镜像地址下载镜像Index of /centos/7.2.1511/isos/x86_64/http://mirro ...
- centOS学习part4:安装配置vsftp
0 上一章(http://www.cnblogs.com/souvenir/p/3875934.html)我们完成了对远程工具VNC的安装配置,接下来我们将安装另外一个常用工具:VSFTP. vsft ...
- 【转】CentOS 6 服务器安全配置指南
原文连接: CentOS 6 服务器安全配置指南(通用) Linux 是一个开放式系统,可以在网络上找到许多现成的程序和工具,这既方便了用户,也方便了黑客,因为他们也能很容易地找到程序和工具来潜入 L ...
- httpd2.4常用配置
author:JevonWei 版权声明:原创作品 httpd 2.4配置 切换使用的MPM Centos7:/etc/httpd/conf.modules.d/00-mpm.conf 启用要启用的M ...
- [转帖]CentOS 6 服务器安全配置指南(通用)
CentOS 6 服务器安全配置指南(通用) http://seanlook.com/2014/09/07/linux-security-general-settings/ 发表于 2014-09- ...
- Apache入门 篇(二)之apache 2.2.x常用配置解析
一.httpd 2.2.x目录结构 Cnetos 6.10 YUM安装httpd 2.2.x # yum install -y httpd 程序环境 主配置文件: /etc/httpd/conf/ht ...
- centos7-centos6常用配置对比
设置(CentOS 6 vs CentOS 7)系统常用配置 ysvinit vs Upstart vs Systemd) 常见设置: 字符集CentOS 6方法:/etc/sysconfig/i1 ...
- Centos 6/7 常用命令总结 (基础)
Centos 6/7 常用命令总结 (基础): 参考链接:https://www.cnblogs.com/linhaifeng/p/6045600.html 目录介绍: a) bin目录:用来存放常用 ...
随机推荐
- 解决windows的控制台显示utf8乱码的问题
在控制台的属性里 修改自体为: 新宋体 在控制台下执行命令: chcp 65001
- LR Socket 测试demo
建议像我这样最开始未接触过的,还是先从简单录制开始.录制完之后,分析测试脚本,再学习,再自己根据需要编写测试脚本. 第一:录制. A. B. 选择需要录制的exe的目录 ,填写完后点击ok. C ...
- 项目中empty遇到的一个问题
搜索传参时,数据能获取到,搜索结果不是根据参数得出的,在定义搜索条件时因为empty引起的一个问题,键为0的值没有获取到, 记住:!empty 已经把0排除了
- 操作系统双语阅读 - Schedulers调度器2
Most processes can be described as either I/O bound or CPU bound. 大多数进程都可以描述为IO绑定或者CPU绑定. An I/O-bou ...
- scala匿名函数
package com.ming.test import scala.math._ object AnonymousFunc { def valueAtOneQuarter(f:(Double)=&g ...
- iOS 学习笔记 五 (2015.03.17)使用storyBoard进行tableview的跳转
方法一: 点击tableviewCell后,按住ctrl键拖拽至想要跳转的新的界面.这样跳转的结果是,点击tableview中的任何一行都会跳转到新的界面.可以通过控制cell的 属性 userInt ...
- 设置 textarea 默认滑动到底部
javascript: var textarea = document.getElementById('textarea_id'); textarea.scrollTop = textarea.scr ...
- excel取消自动超链接的方法:还原和自动更正取消自动超链接
默认设置下,我们在excel表格中输入网址,一般excel都会自动将我们输入的网址自动更正为超链接.当单击该网址,就会打开相应的网页. 如果我们不想要自动添加超链接,请看下面的excel取消自动超链接 ...
- MySQL之对数据库库表的字符集的更改
数据字符集修改步骤: 对于已有的数据库想修改字符集不能直接通过 "alter database character set *"或 "alter table tablen ...
- Mysql 如何做双机热备和负载均衡
MySQL数据库没有增量备份的机制,但它提供了一种主从备份的机制,就是把主数据库的所有的数据同时写到备份数据库中.实现MySQL数据库的热备份. 下面是具体的主从热备份的步骤:假设主服务器A(mast ...