首页 技术 正文
技术 2022年11月6日
0 收藏 855 点赞 345 浏览 1620 个字

1、关闭防火墙

  • 临时关闭防火墙
    systemctl stop firewalld
  • 永久防火墙开机自关闭
    systemctl disable firewalld
  • 临时打开防火墙
    systemctl start firewalld
  • 防火墙开机启动
    systemctl enable firewalld
  • 查看防火墙状态
    systemctl status firewalld

2、关闭selinux 关闭原因 自行google  vi /etc/selinux/config

CentOS7 设置yum源

修改sellinux=disabled :wq保存退出

可能存在的问题:若修改了selinuxtype=disabled的值会导致linux启动失败。

解决方案:

1. 重启时在启动页面,选择你要启动的内核 按 E, 进入 grub 编辑页面。

2. 找到 linux16 那一行,在language 后面 也就是LANG=zh_CN.UTF-8,空格 加上 selinux=0 或者 enforcing=0 (备注:我是加入selinux=0 生效的。)

3. 然后 ctrl + x 启动,就看到熟悉的登录界面。

4 .修改selinux配置文件,正确关闭selinux

解决方案原文:http://www.mamicode.com/info-detail-1847013.html

3、设置域名解析

配置下centos的DNS一个国内,一个国外

vi  /etc/resolv.conf

nameserver 114.114.114.114

nameserver 8.8.8.8

4、安装wget命令,已安装请忽略

命令:yum -y install wget

5、更新yum源配置

5.1、备份下原来的yum源

cd /etc/yum.repos.d/   ls

mv CentOS-Base.repo CentOS-Base.repo_bak

5.2 、设置源网易或阿里云

网易yum源:http://mirrors.163.com/.help/centos.html

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

yum clean all

yum makecache

阿里云yum源:http://mirrors.aliyun.com/repo/Centos-7.repo

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all

yum makecache

查看已安装yum源:yum repolist all

图形方案:https://jingyan.baidu.com/article/215817f7aef2e01eda1423f4.html

yum命令常见问题:

yum install的时候提示:Loaded plugins: fastestmirror(加速插件)

解决方案:

1.修改插件的配置文件

# vi  /etc/yum/pluginconf.d/fastestmirror.conf

enabled = 1//由1改为0,禁用该插件

2.修改yum的配置文件

# vi /etc/yum.conf

plugins=1//改为0,不使用插件

解决方案原文:https://www.cnblogs.com/starof/p/4773209.html

6、安装VIM命令,默认未安装
检测是否安装VIM rpm -aq|grep vim
若出现以下命令则未安装 vim-minimal.x86_64 2:7.4.160-4.el7
执行命令,yum -y install vim* 提示安装完毕!

7、检测IP地址 ipaddr show 或ifconfig

提示ifconfig command not found的解决方案:

1、确认sbin目录是否存在 cd  /sbin ls

2、不存在执行命令:yum install net-tools

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,953
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,477
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,290
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,107
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,739
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,773