随笔分类 -  Linux

摘要:比如说,我有一个启动程序,想在桌面上面放一个图标,直接双击就可以打开。在桌面建立文件 my_app.desktop,注意后缀名是 .desktop,然后如下的代码:[DesktopEntry]Encoding=UTF-8Name=MyAPPComment=MyAPPiswonderfulExec=/bin/sh"/home/davidhhuan/Software/myapp/bin/myapp"Icon=/home/davidhhuan/Software/myapp/myapp.pngCategories=Application;Development;Java;IDEVe 阅读全文
posted @ 2012-08-15 11:02 DavidHHuan 阅读(430) 评论(0) 推荐(1)
摘要:I have reinstalled my system to Ubuntu 12.04, after installed mysql, i found that there is an error when start mysql:Accessdeniedforuser‘debian-sys-maint’@'localhost’(usingpassword:YES)After searching the reason via google, i at last found the reason, here is it:That’sbecausedebianhasamysqlaccou 阅读全文
posted @ 2012-05-19 10:34 DavidHHuan 阅读(2319) 评论(0) 推荐(0)
摘要:Let say you installed PHP and run it for a month, but now you want to use curl in PHP.But so bad that you didn't install this extension when you installed PHP. That is to say, now you want to add PHP extension. Here is an example to install curl extension.apache2 is in/usr/local/apache2php is in 阅读全文
posted @ 2012-01-09 15:53 DavidHHuan 阅读(561) 评论(0) 推荐(0)
摘要:Ubuntu系统升级到11.10,mysql启动不了,提示ERROR2002(HY000):Can'tconnecttolocalMySQLserverthroughsocket'/var/run/mysqld/mysqld.sock'(2)找来找去,发现原来真的没有这个文件。。。只有用终极办法,重装mysql卸载:sudoapt-getautoremove--purgemysql-server-5.0sudoapt-getremovemysql-serversudoapt-getautoremovemysql-serversudoapt-getremovemysql- 阅读全文
posted @ 2011-10-15 10:41 DavidHHuan 阅读(370) 评论(0) 推荐(1)
摘要:The article comes from:http://www.apaddedcell.com/easy-php-debugging-ubuntu-using-xdebug-and-vimA debugger helps greatly when testing or bug fixing in... 阅读全文
posted @ 2011-09-28 22:18 DavidHHuan 阅读(879) 评论(0) 推荐(0)
摘要:如以下命令:查找/home/davidhhuan/www/tao文件夹下面所有包含StorebaseApp字眼的php文件find/home/davidhhuan/www/tao-typef-name"*.php"|xargsgrep"StorebaseApp" 阅读全文
posted @ 2011-09-22 14:45 DavidHHuan 阅读(974) 评论(0) 推荐(0)
摘要:just follow the steps below:First step:sudovim/etc/apache2/sites-available/defaultModify the code from<Directory/>OptionsFollowSymLinksAllowOverrideNone</Directory>to<Directory/>OptionsFollowSymLinksAllowOverrideNone</Directory><Directory/>OptionsFollowSymLinksAllowOver 阅读全文
posted @ 2011-09-21 11:23 DavidHHuan 阅读(286) 评论(0) 推荐(0)
摘要:众所周知,Ubuntu11.04使用sudo apt-get 安装好的php版本是5.3.5,很多网站都是不兼容的,所以要找个办法降级。还好借助google,把问题都搞掂了~创建一个php_version.sh,然后输入下面内容。#!/bin/bash#byRubenBarkow(rubo77)http://www.entikey.z11.de/#OriginallyPostedbyBachstelzehttp://ubuntuforums.org/showthread.php?p=9080474#post9080474#OK,here'showtodotheAptmagictoget 阅读全文
posted @ 2011-09-20 18:51 DavidHHuan 阅读(495) 评论(0) 推荐(0)
摘要:众所周知,在window下面打包的zip在linux下面是不能直接解压的,因为zip在linux下面是按照系统默认的字符集来解压的。不过也无碍,其实zip本来是可以指定解压的字符集的。如使用下面命令unzip-OGBKmycpmpressfile.zip(用CP936,GB18030也可以) 阅读全文
posted @ 2011-09-16 17:55 DavidHHuan 阅读(469) 评论(0) 推荐(0)
摘要:我的PHP环境是由apache+php+mysql+phpmyadmin搭建起来的,详情请参考我的另一篇文章:[Ubuntu] 转载:Ubuntu下安装apache+php+mysql+phpmyadmin但由于我是使用win7+ubuntu的,虽然基本上开发都在ubuntu下面,但有时也需要在win7下面运行一下网站的,所以我就要把mysql转移到ntfs上面去,但其中遇到了比较麻烦的问题,就是ntfs挂载在ubuntu下面的文件权限都是777的,具体操作过程遇到的问题和解决如下:1. 修改 /etc/mysql/my.cnf将datadir=/var/lib/mysql改为datadir= 阅读全文
posted @ 2011-09-12 23:42 DavidHHuan 阅读(523) 评论(0) 推荐(0)
摘要:原文地址:http://blog.haohtml.com/archives/4522通过这篇文章,让我这个菜鸟成功的安装好了webserver需要的各种软件,特此转载下。在windows xp系统中可以傻瓜化安装amp,即安装wamp server这个把apache、php、mysql、phpmyadmin集成在一起的套装即可,而且在选择apache模块时还特别方便,真是可以不 用动脑了。由于ubuntu现在的操作也基本傻瓜化了,安装lamp也同样方便,但由于其linux血统,有的地方还需要注意一下。以下简单说明步骤:1、安装apahce2。sudo apt-get install apach 阅读全文
posted @ 2011-09-12 19:38 DavidHHuan 阅读(477) 评论(0) 推荐(0)
摘要:这是我觉得写得比较好的文章,原文地址是:http://blog.csdn.net/pureshf/article/details/3942189ubuntu apache2配置1.apache2.conf 是主配置文件,httpd.conf 用户配置文件2.虚拟目录在 httpd.conf 中<VirtualHost *>DocumentRoot "路径"ServerName 名称<Directory "路径"> allow from all Options +Indexes </Directory></Virt 阅读全文
posted @ 2011-09-06 16:28 DavidHHuan 阅读(333) 评论(0) 推荐(0)
摘要:Yes, in fact that you can download the source package, and uninstall the firefox 3.6 in Ubuntu and then install the 4.0 version, but how about when you want to own 3.6 and 4.0 at the same time?Here is a way to do it.Add the source.sudoadd-apt-repositoryppa:ubuntu-mozilla-daily/ppaUpdate the sources. 阅读全文
posted @ 2011-03-29 10:27 DavidHHuan 阅读(254) 评论(0) 推荐(0)
摘要:That is just an example, but do not use it to send the spam email la! :P#!/bin/bashcleari=1while(($i<10))do/usr/sbin/sendmail-v-t-oi-ftestla@testla.com<<EOFFrom:testla@testla.comTo:testla@testla.comSubject:AutomatedDeviceVerificationtest.EOFi=$(($i+1))done 阅读全文
posted @ 2011-03-16 14:53 DavidHHuan 阅读(253) 评论(0) 推荐(0)
摘要:For example, i have there projects folders in/var/www/project_1/var/www/project_2/var/www/project_3In a common method, I have to set the virtualhost of the three projects as:<VirtualHost*:80><Directory"/var/www/project_1"></Directory>DocumentRoot"/var/www/project_1&q 阅读全文
posted @ 2011-03-10 15:07 DavidHHuan 阅读(238) 评论(0) 推荐(0)
摘要:本本是ThinkPad T410i,安装了ubuntu 10.10之后,发现调节屏幕亮度的功能没了,每次调节亮度之后要重启才能够生效,而且下次重启之后,就又失效了。强大的google帮助了我,我帖一下我的解决方法。在终端一下输入下面命令,修改xorg.confsudovim/etc/X11/xorg.conf原来的内容如下:Section"Screen"Identifier"DefaultScreen"DefaultDepth24EndSectionSection"Module"Load"glx"EndSectio 阅读全文
posted @ 2011-03-09 00:08 DavidHHuan 阅读(1429) 评论(0) 推荐(0)
摘要:用vim转换M$文本中的换行符^M在 Dos/Windows 里,文本文件的换行符为 \r\n ,而在*nix系统里则为\n,所以 DOS/Windows 里编辑过的文本文件到了 *nix 里,每一行都多了个 ^M 。删掉该字符可以在 VI 里用下面的方法试试:%s/^M$//g # 去掉行尾的^M。:%s/^M//g # 去掉所有的^M。:%s/^M/[ctrl-v]+[enter]/g # 将^M替换成回车。:%s/^M/\r/g # 将^M替换成回车。注意 ^M 的输入用 Ctrl+v,再按回车,或者是 Ctrl+v, Ctrl+m。删除文件内容:1,100d # 删除文件第 1 行到第 阅读全文
posted @ 2011-01-27 14:05 DavidHHuan 阅读(381) 评论(0) 推荐(0)
摘要:when using Ubuntu, we can add a "Main Menu" item to the panelWhere to add / modify the menu items? Here we go!In fact that the items of Main Menu are stored under /usr/share/applications , here we will try toadd a laucher of eclipse for example.[代码]In the file, add these code:[代码]Then you will see t 阅读全文
posted @ 2011-01-17 17:23 DavidHHuan 阅读(390) 评论(0) 推荐(0)
摘要:The reason for this error is that i am editing a html file, and it seems that gvim does not konw how to handle it.At last i found this solution. Add the code to the /etc/vim/gvimrc代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--filetypepluginindent 阅读全文
posted @ 2011-01-11 22:09 DavidHHuan 阅读(1931) 评论(0) 推荐(0)
摘要:What i need to download:zlib-1.2.5.tar.gzhttp://zlib.net/zlib-1.2.5.tar.gzlibxml2-2.7.2.tar.gzftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gzphp-5.3.4.tar.bz2http://ar.php.net/distributions/php-5.3.4.tar.bz2memcache-2.2.6.tgzhttp://pecl.php.net/get/memcache-2.2.6.tgzlibevent-2.0.10-stable.tar.gzhttp: 阅读全文
posted @ 2011-01-07 01:00 DavidHHuan 阅读(2612) 评论(1) 推荐(0)