摘要:
1.vagrantfile的配置 Vagrant.configure("2") do |config| config.vm.box = "xinjieLinux" config.vm.define :master do |mfsmaster_config| mfsmaster_config.vm.n 阅读全文
摘要:
1.docker切换镜像源 vim /etc/sysconfig/docker OPTIONS='--registry-mirror=http://9zkjjecg.mirror.aliyuncs.com' systemctl restart docker.service 2.删除images do 阅读全文
摘要:
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 阅读全文
摘要:
1 #!/bin/sh 2 cd /mnt/tomcat/tomcat_8082/logs; 3 tail -f catalina.out; 阅读全文
摘要:
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 阅读全文
摘要:
一、编写一个脚本使我们在写一个脚本时自动生成”#!/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 阅读全文
摘要:
练习一:写一个脚本 1.设定变量FILE的值为/etc/passwd 2.依次向/etc/passwd中的每个用户问好,并且说出对方的ID是什么 形如:(提示:LINE=`wc -l /etc/passwd | cut -d" " -f1`) Hello,root,your UID is 0. 3. 阅读全文
摘要:
1.模拟linnux登录shell 1.模拟linnux登录shell 1.模拟linnux登录shell #/bin/bashecho -n "login:" read nameecho -n "password:"read passwdif [ $name = "cht" -a $passwd 阅读全文