1. cd /etc/sysconfig/network-scripts

  2. ll

  3. vi ifcfg-ens33(每个人的文件名都不一样,要自己看文件名是什么)

  4. #确保ONBOOT=yes
    #ONBOOT的意思是系统在启动的时候是否激活网卡,只有激活网卡,才能进行网络通讯
    #如果文件没有下面的这些字段,就自己增加
     
    BOOTPROTO=static
    IPADDR=192.168.xxx.xxx  #你自己想要的ip地址
    NETMASK=255.255.255.0   #子网掩码
    ONBOOT=yes

  5. systemctl restart network命令重启网络 就ok了


1. 备份默认的yum
# mv /etc/yum.repos.d /etc/yum.repos.d.backup
 
2. 设置新的yum目录
# mkdir /etc/yum.repos.d
 
3. 下载阿里yum配置到该目录中,用wget,进行下载,
# yum install -y wget
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
 
4. 重建缓存
yum clean all
yum makecache
 
5. 升级所有包
yum upgrade -y
yum -y update:升级所有包同时,也升级软件和系统内核;(时间比较久)
yum -y upgrade:只升级所有包,不升级软件和系统内核,软件和内核保持原样。 


问题
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre= option.
答案
yum -y install pcre-devel
 

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐