添加动物欢迎语
平时,我们登录系统的时候都没怎么注意,就像生活得要有乐趣,下面介绍一种一登陆就有动物欢迎语。如图:
主要是用到两个包,一个是fortune、一个是cowsay
1、安装cowsay
1)安装npm
yum -y install npm
2)安装cowsay
npm install -g cowsay
2、安装forturn
百度云下载地址:https://pan.baidu.com/s/1nS9ov3Gf2d9PJrSG8aIG6w
recode官网下载地址: https://centos.pkgs.org/7/centos-x86_64/recode-3.6-38.el7.x86_64.rpm.html
fortune官网下载地址:http://springdale.math.ias.edu/data/puias/7/x86_64/os/Addons/Packages/fortune-mod-1.99.1-17.sdl7.x86_64.rpm
安装:
rpm -i recode-3.6-38.el7.x86_64.rpm
rpm -i fortune-mod-1.99.1-17.sdl7.x86_64.rpm
3、在/etc/profile.d目录下,添加脚本 cow.sh
#!/bin/bash
fortune |cowsay
4、重新登录
5、Dockerfile
FROM docker.io/centos RUN yum -y install wget RUN wget https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz RUN xz -d node-v8.12.0-linux-x64.tar.xz RUN tar -xf node-v8.12.0-linux-x64.tar RUN ln -s /node-v8.12.0-linux-x64/bin/node /usr/local/bin/node RUN ln -s /node-v8.12.0-linux-x64/bin/npm /usr/local/bin/npm RUN npm install -g cowsay RUN ln -s /node-v8.12.0-linux-x64/bin/cowsay /usr/local/bin/cowsay RUN wget http://mirror.centos.org/centos/7/os/x86_64/Packages/recode-3.6-38.el7.x86_64.rpm RUN rpm -i /recode-3.6-38.el7.x86_64.rpm RUN wget http://springdale.math.ias.edu/data/puias/7/x86_64/os/Addons/Packages/fortune-mod-1.99.1-17.sdl7.x86_64.rpm RUN rpm -i /fortune-mod-1.99.1-17.sdl7.x86_64.rpm
-------------------------------------------
个性签名:在平凡中坚持前行,总有一天会遇见不一样的自己!
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!
万水千山总是情,打赏一分行不行,所以如果你心情还比较高兴,也是可以扫码打赏博主,哈哈哈(っ•̀ω•́)っ✎⁾⁾!
微信公众号 微信打赏 支付宝打赏
posted on 2018-09-29 21:56 Captain_Li 阅读(427) 评论(0) 编辑 收藏 举报