ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

第二十二章 系统优化

2022-09-09 16:35:13  阅读:155  来源: 互联网

标签:repo 系统优化 qls 第二十二章 etc sysconfig root eth1


系统优化



[root@qls ~]# ifconfig   eth1   172.16.1.100/24



[root@qls ~]# cp  /etc/sysconfig/network-scripts/ifcfg-eth0  /etc/sysconfig/network-scripts/ifcfg-eth1

[root@qls ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
TYPE=Ethernet
BOOTPROTO=none
NAME=eth1
DEVICE=eth1
ONBOOT=yes
IPADDR=172.16.1.100
PREFIX=24

#更新源

[root@qls ~]# rm -rf /etc/yum.repos.d/*


[root@qls ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

[root@qls ~]# curl  -o   /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo


[root@qls ~]# ll  /etc/yum.repos.d/
total 8
-rw-r--r--. 1 root root 2523 Aug  5 20:09 CentOS-Base.repo
-rw-r--r--. 1 root root  664 Aug  5 20:09 epel.repo


#关闭firewalld及selinux


[root@qls ~]# systemctl  stop firewalld
[root@qls ~]# systemctl  disable  firewalld


[root@qls ~]# setenforce  0
[root@qls ~]# vi  /etc/sysconfig/selinux 
[root@qls ~]# grep  'SELINUX'  /etc/sysconfig/selinux
# SELINUX= can take one of these three values:
SELINUX=disabled



#关闭NetworkManager网络

[root@qls ~]# systemctl   stop NetworkManager
[root@qls ~]# systemctl   disable   NetworkManager


#同步时间

[root@qls ~]# crontab -l
* * * * *  /usr/bin/ntpdate  ntp.aliyun.com  &> /dev/null



#配置文件介绍
<domain> <type>  <item>  <value>

<domain>表示要限制的用户

<type>设定类型

<item>表示可选的资源

<value>表示要限制的值

#加大文件描述符
[root@qls ~]# echo '*               -       nofile          65535 ' >>/etc/security/limits.conf 

#检查结果
[root@qls ~]# tail -1 /etc/security/limits.conf


标签:repo,系统优化,qls,第二十二章,etc,sysconfig,root,eth1
来源: https://www.cnblogs.com/GAO321/p/16673232.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有