优化系统:
1.优化ssh
vi /etc/ssh/sshd_config
79行:GSSAPIAuthentication no
115行:UseDNS no
systemctl restart sshd
2.优化selinux
#修改配置文件,永久关闭
vi /etc/selinux/config
#第7行修改为
SELINUX=disabled
需要重启生效
#立即生效,临时的
setenforce 0
3.关闭firewalld
systemctl stop firewalld
systemctl disable firewalld
4.优化yum源
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
5.安装常用软件
yum install lrzsz vim tree wget net-tools screen tcpdump bash-completion -y
服务管理:
查看所有服务列表
systemctl list-unit-files
该界面按 ‘q’退出
启动服务
systemctl start httpd #start启动
停止服务
systemctl stop httpd #stop停止
重启服务
systemctl restart httpd #restart重启
查看服务状态
systemctl status httpd #查看服务状态
把服务设置为开机启动
systemctl enable httpd.service
取消服务的开机自启
systemctl disable httpd.service
Linux 的所有服务:手动启动或者systemctl
软件和服务都是程序
软件一般是客户端curl
服务一般是给客户端提供某一个功能,7*24一直运行
本文暂时没有评论,来添加一个吧(●'◡'●)