如何快速清理磁盘

2016-02-03 15:10:40 +08:00
 z742364692
搬瓦工的 3.5g 硬盘满了,怎么清理啊,就编译了个 lnmp 外加 ss,谢谢指导,centos6_32的
4214 次点击
所在节点    Linux
15 条回复
Strikeactor
2016-02-03 15:30:11 +08:00
那么小的硬盘用编译版,本身就是作死啊
crystom
2016-02-03 15:46:43 +08:00
删除安装包文件,删除 mysql 日志在 /usr/local/mysql/var/mysql-bin.0000*
crystom
2016-02-03 15:47:46 +08:00
忘了说,最好在后台选择用 minimal 版本的,不带 apache 什么的
z742364692
2016-02-03 16:00:36 +08:00
@crystom 是 minimal 的
@Strikeactor 编译的能有那么一丢丢性能提升,嘿嘿,蛮在意的
tntsec
2016-02-03 16:02:08 +08:00
编译不会有任何性能提升,反而 YUM 版的编译参数更加详细
z742364692
2016-02-03 16:04:04 +08:00
@tntsec 这样啊,那总得清理点啊,就这么大点空间了。。。。能告诉我一下吗
SpicyCat
2016-02-03 16:16:22 +08:00
先查查都哪些文件占用空间呗。
popu111
2016-02-03 16:45:43 +08:00
1.说实在的,感觉不大可能再空出多大空了,就是删个日志和编译时候的源码包。可以考虑直接重装了重搭环境了。
2.竟然没人说 rm -rf /*
3.顺便吐槽之前有位老兄的看法是不编译可以节约能源减少碳排放,做低碳运维人 XD
4.最后如果你有版本更新强迫症你需要 epel 或 dotdeb
Justin12345
2016-02-03 17:54:43 +08:00
把 lnmp 文件夹删掉,瞬间少一大半
z742364692
2016-02-03 22:33:48 +08:00
@Justin12345 果然就是这个好大
Flygoat
2016-02-04 10:12:43 +08:00
cd / & rm -rf * 版瓦工这么干好了。
tntsec
2016-02-04 15:25:46 +08:00
这是 nginxYUM 源的编译参数
nginx -V
nginx version: nginx/1.8.1
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_spdy_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
tntsec
2016-02-04 15:28:57 +08:00
php 的 YUM 版
php -v
PHP 7.0.3 (cli) (built: Feb 3 2016 11:40:05) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
tntsec
2016-02-04 15:31:18 +08:00
mariaDB 的 yum 版
mysql -V
mysql Ver 15.1 Distrib 10.1.11-MariaDB, for Linux (x86_64) using readline 5.1
fourstring
2016-02-11 20:40:11 +08:00
du -sh /*
然后根据显示结果不断深入

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/255208

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX