ubuntu服务器如何做安全更新?

42 views
Skip to first unread message

机械唯物主义 : linjunhalida

unread,
Sep 24, 2014, 8:49:57 AM9/24/14
to shlug
现在我有好几台生产服务器,部分ubuntu 12.04, 部分14.04,上面跑了一些rails,nginx之类的。

请问大家,我应该怎么做安全更新?几个选择:

- 每个月apt-get update && apt-get upgrade
- 设置安全更新服务,自动更新
- 看ubuntu security notice,发现有相关安全问题(比如ssl安全问题)再更新对应的包,其它时候不管

谢谢!

--

Coder, Gamer, Reader.

none_nobody

unread,
Sep 24, 2014, 12:19:13 PM9/24/14
to sh...@googlegroups.com, linjun...@gmail.com
最小化安装,remove 不必要的软件包和服务;

if (不必要){ 不更新。exit(0); }

while( 1  ) {
 在测试机上进行更新
  if ( 确保更新过程没问题 ) break;
   有问题 , 记录进更新操作文档
}

按操作文档来;



On Wednesday, September 24, 2014 8:49:57 PM UTC+8, 机械唯物主义 : linjunhalida wrote:
现在我有好几台生产服务器,部分ubuntu 12.04, 部分14.04,上面跑了一些rails,nginx之类的。

请问大家,我应该怎么做安全更新?几个选择:

--

Coder, Gamer, Reader.

Shawn

unread,
Sep 25, 2014, 12:08:57 AM9/25/14
to sh...@googlegroups.com
Debian-based GNU/Linux distro:

sudo apt-get upgrade -s | grep -i security

每个月太久了,一般每12小时更新一次吧

安全基线可以参考:
https://raw.githubusercontent.com/citypw/DNFWAH/master/4/d4_0x02_DNFWAH_gnu-linux_security_baseline_hardening.txt
> --
> -- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
> ---
> 您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
> 要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
> 要查看更多选项,请访问 https://groups.google.com/d/optout



--
GNU powered it...
GPL protect it...
God blessing it...

regards
Shawn

Shell Xu

unread,
Sep 25, 2014, 12:13:49 AM9/25/14
to shlug
unattended-upgrade
彼節者有間,而刀刃者無厚;以無厚入有間,恢恢乎其於游刃必有餘地矣。
blog: http://shell909090.org/blog/

机械唯物主义 : linjunhalida

unread,
Sep 27, 2014, 10:13:50 PM9/27/14
to shlug
2014-09-25 12:08 GMT+08:00 Shawn <cit...@gmail.com>:
> sudo apt-get upgrade -s | grep -i security


这个命令不能达到搜索安全更新的效果,更新了bash,在changelog里面看到了安全更新提示,但是没有grep出来。

--

Coder, Gamer, Reader.

机械唯物主义 : linjunhalida

unread,
Sep 27, 2014, 10:37:30 PM9/27/14
to shlug
2014-09-25 12:13 GMT+08:00 Shell Xu <shell...@gmail.com>:
> unattended-upgrade


请问用这个工具,自动升级安全更新,是否会造成服务器运行不正常?

--

Coder, Gamer, Reader.

Shell Xu

unread,
Sep 27, 2014, 11:21:54 PM9/27/14
to shlug
那得看安全更新会不会打的服务器不正常。


--

Coder, Gamer, Reader.

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/d/optout

机械唯物主义 : linjunhalida

unread,
Sep 29, 2014, 10:35:40 PM9/29/14
to shlug
嗯,
sudo apt-get upgrade -s | grep -i security
搜索不出来东西,应该是updates那个条目把它覆盖了。。
有解决方法:http://askubuntu.com/questions/152179/how-do-i-check-only-security-updates-from-the-command-line
不过好肮脏的样子。

然后手动执行unattended-upgrade,一直停在这里没有反应,不知道是怎么回事。

命令行执行一下安装安全更新就那么复杂吗。。
> 您收到此邮件是因为您订阅了Google网上论坛中的“Shanghai Linux User Group”论坛。
> 要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
> 要查看更多选项,请访问https://groups.google.com/d/optout



--

Coder, Gamer, Reader.

Shell Xu

unread,
Sep 29, 2014, 11:15:26 PM9/29/14
to shlug
停在哪里?

机械唯物主义 : linjunhalida

unread,
Sep 30, 2014, 2:43:12 AM9/30/14
to shlug
2014-09-30 11:14 GMT+08:00 Shell Xu <shell...@gmail.com>:
> 停在哪里?


加上了-d参数,发现不是停,而是执行好慢。。

--

Coder, Gamer, Reader.

机械唯物主义 : linjunhalida

unread,
Sep 30, 2014, 2:43:28 AM9/30/14
to shlug
2014-09-30 14:42 GMT+08:00 机械唯物主义 : linjunhalida <linjun...@gmail.com>:
> 加上了-d参数,发现不是停,而是执行好慢。。


所以没问题了。

--

Coder, Gamer, Reader.

Shell Xu

unread,
Sep 30, 2014, 4:18:15 AM9/30/14
to shlug
你没配approx吧?
另外,在meta拉到本地后,进行安全相关计算的时候,也会消耗相当的cpu。这货好像是用的python(我不确定),因此在解算依赖的时候是单CPU的。。。


--

Coder, Gamer, Reader.

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/d/optout
Reply all
Reply to author
Forward
0 new messages