摘要: 1.vagrantfile的配置 Vagrant.configure("2") do |config| config.vm.box = "xinjieLinux" config.vm.define :master do |mfsmaster_config| mfsmaster_config.vm.n 阅读全文
posted @ 2017-05-05 15:03 sky10001 阅读(586) 评论(0) 推荐(0) 编辑
摘要: 1.docker切换镜像源 vim /etc/sysconfig/docker OPTIONS='--registry-mirror=http://9zkjjecg.mirror.aliyuncs.com' systemctl restart docker.service 2.删除images do 阅读全文
posted @ 2017-05-01 23:07 sky10001 阅读(163) 评论(0) 推荐(0) 编辑
摘要: LINUX通过下面的命令可以开启允许对外访问的网络端口: /sbin/iptables -I INPUT -p tcp --dport 8000 -j ACCEPT #开启8000端口 /etc/rc.d/init.d/iptables save #保存配置 /etc/rc.d/init.d/ipt 阅读全文
posted @ 2017-04-30 01:34 sky10001 阅读(3958) 评论(0) 推荐(0) 编辑
摘要: 1 #!/bin/sh 2 cd /mnt/tomcat/tomcat_8082/logs; 3 tail -f catalina.out; 阅读全文
posted @ 2017-03-28 14:15 sky10001 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1 #!/bin/sh 2 cd /mnt/tomcat/tomcat_8082; 3 ps -ef|grep /tomcat_8082/ |awk '{print $2}'|xargs kill -9; 4 ./bin/startup.sh; 5 tail -f ./logs/catalina.o 阅读全文
posted @ 2017-03-28 14:13 sky10001 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 一、编写一个脚本使我们在写一个脚本时自动生成”#!/bin/bash”这一行和注释信息。 原文代码为: Shell 1 2 3 4 5 6 7 8 9 10 #!/bin/bash if ! grep "^#!" $1 &>/dev/null; then cat >> $1 << EOF #!/bi 阅读全文
posted @ 2017-02-14 00:14 sky10001 阅读(3221) 评论(0) 推荐(0) 编辑
摘要: 练习一:写一个脚本 1.设定变量FILE的值为/etc/passwd 2.依次向/etc/passwd中的每个用户问好,并且说出对方的ID是什么 形如:(提示:LINE=`wc -l /etc/passwd | cut -d" " -f1`) Hello,root,your UID is 0. 3. 阅读全文
posted @ 2017-02-14 00:12 sky10001 阅读(29264) 评论(0) 推荐(1) 编辑
摘要: 1.模拟linnux登录shell 1.模拟linnux登录shell 1.模拟linnux登录shell #/bin/bashecho -n "login:" read nameecho -n "password:"read passwdif [ $name = "cht" -a $passwd 阅读全文
posted @ 2017-02-14 00:11 sky10001 阅读(8002) 评论(0) 推荐(1) 编辑
摘要: 默认安装完成之后并不知道root用户的密码,那么如何应用root权限呢? (1)sudo 命令 xzm@ubuntu:~$ sudo 这样输入当前管理员用户密码就可以得到超级用户的权限。但默认的情况下5分钟root权限就失效了。 (2)sudo -i xzm@ubuntu:~$ sudo -i 通过 阅读全文
posted @ 2017-01-17 22:52 sky10001 阅读(424597) 评论(3) 推荐(7) 编辑
摘要: http://www.zeroc.com/download/eclipse 阅读全文
posted @ 2017-01-17 11:49 sky10001 阅读(243) 评论(0) 推荐(0) 编辑