诺亚孤舟

导航

2013年9月13日 #

linux卸载挂载点显示device is busy

摘要: 在做umount设备时, device is busy是令人头痛的提示:[root@delphi /]# umount /dev/cdromumount: /mnt/cdrom: device is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1))lsof可以找出被特定进程所打开的文件,目录,套接字,设备.例子:比如有时我们不能umount掉一个分区时,我们会需要检查,是哪些进程在使用当前的分区以便找出进程后将它... 阅读全文

posted @ 2013-09-13 13:02 诺亚孤舟 阅读(4921) 评论(0) 推荐(0) 编辑

2013年9月1日 #

php操作文件(读取写入文件)

摘要: 一,PHP如何读取文件PHP读取文件可以读取当前服务器或远程服务器中的文件。其步骤是:打开文件、读文件和关闭文件。1,PHP如何打开文件使用PHP函数fopen()打开一个文件,fopen()一般使用2个参数表示打开文件的路径和文件模式。比如:$fp=fopen("../cnbruce.txt",'w');其中 "../cnbruce.txt" 就表示打开的cnbruce.txt文件的路径(相对当前执行程序文件的路径),'w'表示以只写的方式打开该文本文件。附录:fopen()函数的文件模式总结r只读——读模式,打开文件, 阅读全文

posted @ 2013-09-01 11:33 诺亚孤舟 阅读(997) 评论(0) 推荐(0) 编辑

2012年6月29日 #

linux修改时区和时间

摘要: linux修改时区和时间 阅读全文

posted @ 2012-06-29 14:08 诺亚孤舟 阅读(172) 评论(0) 推荐(0) 编辑

2012年6月25日 #

linux打包压缩的时候如何剔除某些不想打包的进来的文件

摘要: 比如有如下几个文件夹:www.aaa.com,www.bbb.com,www.ccc.com,www.ddd.com,每个文件里面还有4个子文件夹分别是1,2,3,4,每个子文件里面还有html文件。现在需求把所有文件夹打包压缩但是不要html文件,只是保留文件夹内部结构不需要内部的具体文件。 就可以用如下命令:tar zcvf web.tar.gz --exclude=*.html *.com 把所有以.com结尾的文件夹打包,剔除里面的所有的html文件。 阅读全文

posted @ 2012-06-25 14:56 诺亚孤舟 阅读(1144) 评论(0) 推荐(0) 编辑

2012年6月11日 #

nginx报错”could not build the server_names_hash”

摘要: 今天在给nginx添加几十个域名后,重启nginx的时候,报错”[emerg]: could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 128″在nginx.conf配置文件的http{}把server_names_hash_bucket_size 128改为server_names_hash_bucket_size 512,按32的倍数往上加,再重启问题解决。[root@localho 阅读全文

posted @ 2012-06-11 16:49 诺亚孤舟 阅读(7734) 评论(0) 推荐(0) 编辑

2012年5月31日 #

Linux scp远程文件/目录传输

摘要: 1、获取远程服务器上的文件scp -P 22 root@www.test.com:/root/test.tar.gz /home/test.tar.gz上端口大写P 为参数,22 表示更改连接SSH的端口,如果没有更改默认的SSH端口可以不用添加该参数。 root@www.test.com 表示使用root用户登录远程服务器www.test.com,:/root/test.tar.gz 表示远程服务器上的文件,最后面的/home/test.tar.gz表示保存在本地上的路径和文件名。2、获取远程服务器上的目录scp -r root@www.test.com:/root/testdir /ho. 阅读全文

posted @ 2012-05-31 13:02 诺亚孤舟 阅读(25447) 评论(0) 推荐(0) 编辑

2012年5月16日 #

配置Linux+Apache+Mysql+PHP环境

摘要: mysql-5.0.40.tar.gz 下载地址:http://download.chinaunix.net/do ... amp;ResourceID=7159httpd-2.2.11.tar.gz 下载地址:http://apache.mirror.phpchina.com/httpd/php-5.2.9.tar.gz 下载地址:http://www.php.netZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz 下载地址: http: //www.zend.com GD-2.041gif.tar.gz 下载地址:http://www.rhyme. 阅读全文

posted @ 2012-05-16 16:31 诺亚孤舟 阅读(735) 评论(0) 推荐(0) 编辑

2012年2月25日 #

C#基础概要笔记

摘要: C#基础概要笔记 阅读全文

posted @ 2012-02-25 14:50 诺亚孤舟 阅读(322) 评论(0) 推荐(0) 编辑

2012年2月18日 #

PHP运行出现Notice : Use of undefined constant 的完美解决方案

摘要: Notice: Use of undefined constant title - assumed 'title' in F:\wamp\www\load_myweb.php on line 22Notice: Use of undefined constant content - assumed 'content' in F:\wamp\www\load_myweb.php on line 22进入网站会出现大量类似下面的提示,但是可以正常显示和运行 Notice: Use of undefined constant title - assumed ' 阅读全文

posted @ 2012-02-18 14:39 诺亚孤舟 阅读(37241) 评论(0) 推荐(0) 编辑

2012年2月7日 #

Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 错误解决

摘要: 兴冲冲的下载了一个Tomcat,跑到bin看到一个startup.bat就去执行,结果提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program。好,再去下载个最新版本的JDK,Install完成之后却还是提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At leas. 阅读全文

posted @ 2012-02-07 16:18 诺亚孤舟 阅读(45700) 评论(0) 推荐(0) 编辑