CENTOS7+相关问题
1.使用yum安装时报错:
具体报错:
Another app is currently holding the yum lock; waiting for it to exit...
解决方法:
强制关掉yum进程
[root@localhost ~]# rm -f /var/run/yum.pid
2.弹入弹出光驱(CDROM)命令:
# 1. 弹出光驱命令
[root@localhost ~]# eject
# 2. 弹入光驱命令
[root@localhost ~]# eject -t
3.临时和永久关闭Selinux:
临时关闭:
[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
永久关闭:
[root@localhost ~]# vim /etc/sysconfig/selinux
### SELINUX=enforcing 改为 SELINUX=disabled
[root@localhost ~]# reboot
4.CentOS7查看和关闭防火墙
# 查看防火墙状态
[root@localhost ~]# firewall-cmd --state
# 停止firewall
[root@localhost ~]# systemctl stop firewalld.service
# 禁止firewall开机启动
[root@localhost ~]# systemctl disable firewalld.service
5.CentOS 7 关闭图形界面
# 开机以命令模式启动,执行:
[root@localhost ~]# systemctl set-default multi-user.target
# 开机以图形界面启动,执行:
[root@localhost ~]# systemctl set-default graphical.target