摘要: 转载:http://hi.baidu.com/lostdays/item/1d5e7e4833b4d20fc116134b终于在Debian用apt-get安装好LAMP了,之前在CentOS使用编译安装,速度比现在快,但内存使用怎么都优化不下来,又没时间深入研究。。。使用yum安装后更头疼,别的都可以,phpmyadmin居然不能连接数据库。。。试了N种方法都不行,最终只能放弃。装回Debian了- -记录下自己的安装过程,以备后用~1,更新Debian:apt-get updateapt-get updgrade2,安装Apache2:由于内存只有360M,得省着用,所以选择了prefor 阅读全文
posted @ 2014-01-17 23:13 dolinux 阅读(583) 评论(0) 推荐(0)
摘要: 1 安装$apt-get install mysql-server$apt-get install mysql-client2 修改MySQL的口令 一般上一步会让你输入root密码,如果没有,为了安全起见,一定要修改你的口令!先来看看你的mysql是不是真的没有口令:$mysqladmin version如果你能够看到mysql的版本信息,证明目前MySQL没有口令。好,运行mysqladmin password xxxxxx 修改口令:#mysqladmin password xxxxxx 这里xxxxxx是你的新口令。现在你需要运行 mysqladmin version --user.. 阅读全文
posted @ 2014-01-17 22:58 dolinux 阅读(3574) 评论(0) 推荐(0)
摘要: ${变量:-word}如果变量存在且非空,则返回其值;否则返回word用于:如果变量未定义,则返回默认值即word${变量:+word}如果变量存在且非空,则返回word;否则返回null用于:测试变量是否存在${变量:=word}如果变量存在且非空,则返回其值;否则,设置它为word,并返回其值用于:如果变量非订立,则设置变量为默认值,且还返回!${变量:?message}如果变量存在且非空,则返回其值;否则,显示变量:message,并退出当前的命令或脚本。省略message会出现默认信息:parameter null or not set。用于:不足忧变量未定义所导致的错误。 阅读全文
posted @ 2014-01-17 18:48 dolinux 阅读(234) 评论(0) 推荐(0)
摘要: 转载:http://blog.sina.com.cn/s/blog_ac9fdc0b0101lvdv.html sed和awk是永远地痛,学了又忘,主要是木有横向对比过,所以总把握不到精髓。它可以完美的配合正则表达式(注意是正则表达式哈,不是通配符和字符串模板)。 ***********************************************************... 阅读全文
posted @ 2014-01-17 18:42 dolinux 阅读(475) 评论(0) 推荐(0)
摘要: 转载:http://www.firefoxbug.net/?p=722 Var=/home/firefox/MyProgram/fire.login.name${Variable#pattern}:如果模式匹配于变量值的开头处,则删除匹配的最短部分,并且返回剩下的部分例子:[fire]$ echo ${Var#*/}[fire]$ home/firefox/MyProgram/... 阅读全文
posted @ 2014-01-17 18:15 dolinux 阅读(3768) 评论(0) 推荐(0)
摘要: 配置文件的内容格式如下:# Copyright (c) 2013 Peng Donglin.## Authors: Peng Donglin ## this is a config file# # imagenum : the number of images included in output file # output : the file name of update package## enable : # 0: the corresponding image w... 阅读全文
posted @ 2014-01-17 10:12 dolinux 阅读(307) 评论(0) 推荐(0)