当手头上的VPS和独立服务器多了之后,管理起来就比较耗费时间,其中相对烦人的就是装完系统后的开荒。面对一个可能没有安装任何常用软件的VPS来说,手动更新和安装软件效率很低,使用shell脚就可以避免这些问题,最终实现一次折腾终生使用的懒人终极目标。 一键脚本- wget --no-check-certificate -O update.sh https://raw.githubusercontent.com/uselibrary/Update_VPS/master/update.sh && chmod +x update.sh && bash update.sh
复制代码对于CentOS/RedHat系统,输入以下命令即可自动更新和安装一些常用软件: - wget --no-check-certificate -O updateC.sh https://raw.githubusercontent.com/uselibrary/Update_VPS/master/updateC.sh && chmod +x updateC.sh && bash updateC.sh
复制代码
有些CentOS的精简版系统可能没有自带wget,可以使用下面的命令: - yum install wget -y && wget --no-check-certificate -O updateC.sh https://raw.githubusercontent.com/uselibrary/Update_VPS/master/updateC.sh && chmod +x updateC.sh && bash updateC.sh
复制代码 说明- 此脚本目前只更新系统和安装少量的常用软件,如果这些功能无法满足你,强烈建议你fork源码后自定义。
- 考虑到不同系统的库不一样,部分命令和软件也不同,故将之分为Debian/Ubuntu系和CentOS/RedHat系两个脚本,后期如果有空的话,会尝试合并脚本。
转至:https://pa.ci/index.php/archives/update_vps_sh.html
其他命令 :
- yum -y install wget make automake gcc gcc-c++ pcre-devel zlib-devel sqlite-devel openssl-devel
复制代码 来自kangle
|