V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
z742364692
V2EX  ›  Linux

如何快速清理磁盘

  •  
  •   z742364692 · 2016-02-03 15:10:40 +08:00 via Android · 4197 次点击
    这是一个创建于 2998 天前的主题,其中的信息可能已经有所发展或是发生改变。
    搬瓦工的 3.5g 硬盘满了,怎么清理啊,就编译了个 lnmp 外加 ss,谢谢指导,centos6_32的
    15 条回复    2016-02-11 20:40:11 +08:00
    Strikeactor
        1
    Strikeactor  
       2016-02-03 15:30:11 +08:00
    那么小的硬盘用编译版,本身就是作死啊
    crystom
        2
    crystom  
       2016-02-03 15:46:43 +08:00
    删除安装包文件,删除 mysql 日志在 /usr/local/mysql/var/mysql-bin.0000*
    crystom
        3
    crystom  
       2016-02-03 15:47:46 +08:00
    忘了说,最好在后台选择用 minimal 版本的,不带 apache 什么的
    z742364692
        4
    z742364692  
    OP
       2016-02-03 16:00:36 +08:00 via Android
    @crystom 是 minimal 的
    @Strikeactor 编译的能有那么一丢丢性能提升,嘿嘿,蛮在意的
    tntsec
        5
    tntsec  
       2016-02-03 16:02:08 +08:00
    编译不会有任何性能提升,反而 YUM 版的编译参数更加详细
    z742364692
        6
    z742364692  
    OP
       2016-02-03 16:04:04 +08:00 via Android
    @tntsec 这样啊,那总得清理点啊,就这么大点空间了。。。。能告诉我一下吗
    SpicyCat
        7
    SpicyCat  
       2016-02-03 16:16:22 +08:00
    先查查都哪些文件占用空间呗。
    popu111
        8
    popu111  
       2016-02-03 16:45:43 +08:00
    1.说实在的,感觉不大可能再空出多大空了,就是删个日志和编译时候的源码包。可以考虑直接重装了重搭环境了。
    2.竟然没人说 rm -rf /*
    3.顺便吐槽之前有位老兄的看法是不编译可以节约能源减少碳排放,做低碳运维人 XD
    4.最后如果你有版本更新强迫症你需要 epel 或 dotdeb
    Justin12345
        9
    Justin12345  
       2016-02-03 17:54:43 +08:00
    把 lnmp 文件夹删掉,瞬间少一大半
    z742364692
        10
    z742364692  
    OP
       2016-02-03 22:33:48 +08:00
    @Justin12345 果然就是这个好大
    Flygoat
        11
    Flygoat  
       2016-02-04 10:12:43 +08:00
    cd / & rm -rf * 版瓦工这么干好了。
    tntsec
        12
    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
        13
    tntsec  
       2016-02-04 15:28:57 +08:00   ❤️ 1
    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
        14
    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
        15
    fourstring  
       2016-02-11 20:40:11 +08:00
    du -sh /*
    然后根据显示结果不断深入
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2620 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 04:46 · PVG 12:46 · LAX 21:46 · JFK 00:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.