随笔分类 - Linux
摘要:ubuntu从12.10升级到13.04,发现使用skype和wps for linux时,不能调用输入法了。曾经怀疑是ibus的问题,然后卸载了,装上fcitx(顺便说一句,fcitx配合sogou原来是这么好用的!)问题还是没有解决~google之,原来不光是升级到13.04才有这个问题,很多版本都会出现类似的情况,大概找到不能调用输入法的原因是,这两个软件的界面是使用QT开发的,所以才出现这样的问题。解决方法如下:修改~/.xprofile,如果没有 ~/.xprofile,先建一个,输入如下内容:export LC_ALL=zh_CN.utf8 #这个不是必须加上的export XMO
阅读全文
摘要:ubuntu系统从12.10升级到13.04,猛然发现多桌面/工作区不见了,以前按 ctrl+alt+方向键的时候,是可以切换不同的工作区的,现在完全没有反应了,也没有工作区了!google了一下,原来ubuntu13.04默认是不开启多桌面/多工作区的,要手动开启!方法如下:system settings --> appearance --> Behavior --> Enable workspacesHave fun with ubuntu!
阅读全文
摘要:1. Download the phpmanual_for_vimhttp://pan.baidu.com/share/link?shareid=256523&uk=28021265722. Uncompress the file to a directory, for example, ~/.vim/doc/phpmanual3. set the configure of .vimrcset runtimepath+=~/.vim/doc/phpmanualautocmd BufNewFile,Bufread *.ros,*.inc,*.php set keywordprg=&quo
阅读全文
摘要:I found a good plugin for vim, that isYii API manual for Vim, which you can checkthe api in vim!here is the website:https://github.com/vim-scripts/Yii-API-manual-for-VimBut that, why i write this article is that, when iCreatting custom version follows:git clone https://github.com/yiisoft/yii.git /me
阅读全文
摘要:CentOS的cronjob日志是放在/var/log/cron那么ubuntu的cronjob默认是不开启日志功能的,要先开启它sudo vim /etc/rsyslog.d/50-default.conf ### 将文件中的 cron.* 前面的 # 去掉sudo service rsyslog restart ### 重启rsyslog服务service cron restart ### 重启cron服务现在就可以通过查看 /var/log/cron.log 查看cronjob的日志了。
阅读全文
摘要:平时都有用着vim,安装的都是自己下载然后解压装到vim里面的。刚才无意中看到一篇文章,说用Vundle可以管理vim的插件,于是试了一下,感觉很爽!原文地址:http://williamherry.com/blog/2012/07/16/master-vim-01-vundle/Vundle利用g...
阅读全文
摘要:1. install vsftpd, the version here is2.3.5sudo apt-get install vsftpd2. create a user as a ftp accountsudo mkdir /var/www/ftpuseradd –s /sbin/nologin –d /var/www/ftp ftpuserpasswd ftpusersudo chown –R ftpuser:ftpuser /var/www/ftp3. modify the setting of vsftpdlocal_enable=YESwrite_enable=YESchroot_
阅读全文
摘要:1. 安装 redis serversudo apt-get install aptitudesudo aptitude install redis-server2. 安装phpredis 扩展sudo apt-get install php5-devgit clone git://github.com/nicolasff/phpredis.git phprediscd phpredisphpize./configuremakesudo -s make install3. 在 php.ini 设置 redis 路径[redis]extension=/usr/lib/php5/20100525/
阅读全文
摘要:As we know, in Ubuntu12.10, the user interface is Unity, it is really not so conveience to use.For example, when i installed the skype, i found i can NOT see the skype icon in the notification bar in the top of the desktop.After googling for a while, at last i find and success to find it back.In you
阅读全文
摘要:情景如下:http://sh.test.local 指向 test_sh 目录http://gz.test.local 指向 test_gz 目录使用域名 http://img.test.local专门用来放图片,以便浏览器加载的,但事实上是,http://img.test.local 是要根据不同主访问来指定不同的图片目录的,比如说,通过http://sh.test.local 的时候,访问的是 test_sh/upload/images 里面的文件通过http://gz.test.local 的时候,访问的是 test_gz/upload/images 里面的文件这时候,就要通过迂回的方法
阅读全文
摘要:git跟svn的原理是不一样的,svn可以直接 svn up file/to/path,而git由于在远程和本地都有一个代码库,所以操作起来麻烦一点gitfetchgitcheckoutorigin/master--path/to/file
阅读全文
摘要:1. At first you should download the java fromhttp://java.com/en/download/index.jspextract it, here i locate it in ~/Software/jdk2. Make sure that there is the folder ~/.mozilla/plugins which once you have install firefox3. ln the extension.sudo ln -s ~/Software/jdk/lib/amd64/libnpjp2.so ~/.mozilla/p
阅读全文
摘要:At first, you have to install the xdebug, for the details, you can check anthoer article:http://www.cnblogs.com/davidhhuan/archive/2011/09/28/2194851.htmlinstall pythoninstallgraphvizsudo apt-get install graphviz2. download the webgrindhttps://github.com/jokkedk/webgrinduncompress it, and locate it
阅读全文
摘要:搭建的FTP服务器vsftpd,用户上传的文件用给其它用户查看,这个要怎样修改上传的文件的默认权限呢?打开配置文件sudo vim /etc/vsftpd/vsftpd.conf修改(通常都是去掉注释)local_umask=022这样就可以了Have fun with CentOS!
阅读全文
摘要:When i set the virtualhost as:VirtualDocumentRoot/var/www/%1<VirtualHost*:80>DocumentRoot/var/wwwServerNamemyhost</VirtualHost>I got these error: Syntaxerroronline33of/etc/apache2/sites-enabled/000-default:Invalidcommand'VirtualDocumentRoot',perhapsmisspelledordefinedbyamodulenot
阅读全文
摘要:here is the code for example:#!/bin/bashecho-e"your_password\nyour_password"|sudo/home/davidhhuan/the_shell_you_want_to_run.sh
阅读全文
摘要:原文地址:http://www.myhack58.com/Article/sort099/sort0102/2011/31794.htm一、搭建环境:1、CentOS 6.0虚拟机(最小安装)2、putty3、ssh shell二、准备工作:1、源码包autoconf ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xzfreetype http://nchc.dl.sourceforge.net/project/freetype/freetype2/2.4.10/freetype-2.4.10.tar.bz2gd http://case...
阅读全文
摘要:一、安装并配置MySQL1.1 执行yum命令安装MySQLyum -y install mysql mysql-server1.2 把添加MySQL进开机启动项,并立即启动MySQLchkconfig --levels 235 mysqld on/etc/init.d/mysqld start1.3 设置MySQL root帐号密码mysql_secure_installation二、安装Apache2.1 使用yum命令安装Apacheyum –y install httpd2.2 设置开机启动Apachechkconfig --levels 235 httpd on2.3 启动Apach
阅读全文
摘要:gvim是一个神器,不过用它来管理项目的话,有点麻烦,主要是每次关闭了gvim,里面打开的文件记录都会没了,下次打开的时候,又要重新去打开。下面介绍一种方法,用来保存整个项目的文件打开情况。1. 建立文件夹 /home/your_home_folder/.vimsession2. 编辑 /etc/vim/gvimrc"保存/加载项目letg:sessionPath="/home/davidhhuan/.vimsession/""保存当前项目的文件打开情况functionSaveProject()letprojectName=input("ple
阅读全文
摘要:After updated the Ubuntu12.04 with the update-package, i run the virtualbox with Win7, then igot these errors: Failedtoopenasessionforthevirtualmachinewin7.Thevirtualmachine'win7'hasterminatedunexpectedlyduringstartupwithexitcode1.ResultCode:NS_ERROR_FAILURE(0x80004005)Component:MachineInter
阅读全文

浙公网安备 33010602011771号