自己安装php,不用mac安装,这样就有php开发环境了。 安装很简单,直接运行一个命令, 需要几分钟,请慢慢等待。curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5 (注5.5是php版本可以是5.6等等)新安装的php目录是/us...
分类:
Web程序 时间:
2014-07-22 22:56:34
阅读次数:
266
#!/bin/bash#forsecurityofosforipin`catip.txt`doecho-e"\033[31m##################$ip#####################\033[0m"RedhatVersion=`ssh$ip-C"cat/etc/issue"|awkNR==1‘{print$7}‘`if[${RedhatVersion}=‘5.6’]thenssh$ip-C"chattr-i/etc/login.defs&&authconfig--..
分类:
其他好文 时间:
2014-07-17 09:41:28
阅读次数:
257
#!/bin/bash#forsecurityofosforipin`catip.txt`doecho-e"\033[31m##################$ip#####################\033[0m"scpopenssl-0.9.8za.tar.gz$ip:/tmp/ssh$ip-C"tar-xzvf/tmp/openssl-0.9.8za.tar.gz-C/tmp/&&cd/tmp/openssl-0.9.8za&&./configsharedno-z..
分类:
其他好文 时间:
2014-07-17 09:18:46
阅读次数:
205
linux命令执行遵循环境变量PATH中的路径,但是有时我们会发现这种现象:#mv/sbin/ls/bin/
[root@xx~]#ls/tmp/
-bash:/sbin/ls:Nosuchfileordirectory/sbin和/bin同样是PATH环境变量中的搜索路径,但是移动之后却发现不了命令,这是因为,命令在上次执行之后以key-value形式缓存..
分类:
系统相关 时间:
2014-07-17 08:11:59
阅读次数:
347
在ubuntu14.04上,通过qtcreator进行串口编程时出现:tryingtoopenfile"/dev/ttyS0"couldnotopenfile:权限不够portopenisfalsejgc>ls-al/dev/ttyS0
crw-rw----1rootdialout4,64Mar2321:00/dev/ttyS0
jgc>echoxyzzy>/dev/ttyS0
bash:/dev/ttyS0:Permissiondenied解决方..
分类:
其他好文 时间:
2014-07-17 08:01:38
阅读次数:
455
#!/bin/bash ver=`cat gate.rc | grep FILEVERSION`ver=`echo $ver | awk '{print $2;}'`ver=`echo $ver |sed 's/\([0-9]*\),\([0-9]*\),\([0-9]*\),\([0-9]*\)/...
分类:
系统相关 时间:
2014-07-17 00:54:24
阅读次数:
363
当Linux 进行查找时,对某些目录的访问可能没有权限而无法进行访问,打印出很多错误消息
1、root目录文件内容
-bash-3.2$ ls
anaconda-ks.cfg bea Desktop lib wls1036_generic.jar
2、查找.log结尾的文件,
-bash-3.2$ find . -name "*.log"
find: ./.gconfd...
分类:
系统相关 时间:
2014-07-16 17:27:01
阅读次数:
433
while循环适用于循环次数未知的场景。语法格式:
whileCONDITION
do
statement
……
done
说明:while是当CONDITION成立的时候就执行循环,当条件不成立时,退出循环。示例1:计算从1加到100.[root@Server3Learn]#catwhile1.sh
#!/bin/bash
declare-isum=0
declare-ii=0
while[..
分类:
其他好文 时间:
2014-07-16 16:42:00
阅读次数:
191
第五章 自定义模块
此前我们一直使用Ansible自带的模块,这已经给我们提供了很多很强的‘自带的电池’,但是如果你有一些特殊又复杂的任务,你可能会希望学习一下如何扩展Anisble。本章你将学习到以下主题:
在python或则bash中编写模块
使用你开发的自定义模块...
分类:
其他好文 时间:
2014-07-16 09:55:30
阅读次数:
375
无书面授权,请勿转载
第五章 自定义模块
Using a module
Now that we have written our very first module for Ansible, we should give it a
go in a playbook. Ansible looks at several places for its modules: first it looks ...
分类:
其他好文 时间:
2014-07-16 09:14:31
阅读次数:
376