Home  >  Article  >  Backend Development  >  一台新的VPS,搭建了LAMP环境,如何做最基本的安全设置?

一台新的VPS,搭建了LAMP环境,如何做最基本的安全设置?

WBOY
WBOYOriginal
2016-06-06 20:50:06845browse

CentOS 6 + Apache + MySQL + PHP

最简单实用的安全设置怎么做?

当然用软件也好,如nagios。不用那个,手动配置呢?

回复内容:

CentOS 6 + Apache + MySQL + PHP

最简单实用的安全设置怎么做?

当然用软件也好,如nagios。不用那个,手动配置呢?

关闭 selinux 或者设置为 permissive 可能能使你更方便的使用 php 等的软件。 但是系统安全级别可能就降低了。
iptables 还是要一定开启的,防火墙 ACCEPT 80 和 ssh 的端口 其他 REJECT,到时有需求再开。这样系统软件级别的渗透攻击基本会少些。
ssh 可以具体再设置,比如远程禁止 root login 密钥验证登陆,修改端口。都是些常规设置。
应用级别的话可以适当的配置 chroot ,比如 apache 或者 php 的,使应用级别的漏洞不破坏到系统。 勤看系统日志也是好的习惯。

你可以看下linode的关于安全的文档:https://library.linode.com/security/basics

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn