下面是我多年整理并使用多少的Shell 分享给大家。说起自动化运维很多人会谈到 puppet, ansible,saltstack 这些工具我都使用了,最终都放弃了。这些工具前期配置太耗时间,扩展也不方便,适合傻瓜化运维,对于有15年软件开发经验的我更喜欢,自由,随心所欲。最 终我选择了自行维护 shell , 将shell 模块化,根据需要组合。
github 地址 : https://github.com/oscm/shell
下面举例,安装一个web 服务器。
- curl -s https://raw.githubusercontent.com/oscm/shell/master/os/centos7.sh | bash
- curl -s https://raw.githubusercontent.com/oscm/shell/master/os/iptables.sh | bash
- curl -s https://raw.githubusercontent.com/oscm/shell/master/lang/gcc/gcc.sh | bash
- curl -s https://raw.githubusercontent.com/oscm/shell/master/web/nginx/nginx.centos7.sh | bash
- curl -s https://raw.githubusercontent.com/oscm/shell/master/lang/php/5.6.9-centos7.sh | bash
- curl -s https://raw.githubusercontent.com/oscm/shell/master/lang/php/pecl/redis.sh | bash
- curl -s https://raw.githubusercontent.com/oscm/shell/master/lang/php/pecl/pthreads.sh | bash
- curl -s https://raw.githubusercontent.com/oscm/shell/master/lang/php/pecl/amqp.sh | bash
- curl -s https://raw.githubusercontent.com/oscm/shell/master/lang/php/pecl/phalcon.sh | bash