随笔分类 -  linux

摘要:如果是系统自带的程序,默认的桌面图标放在 /usr/share/applications/下面,可以直接将对应的图标放到当前用户的~/Desktop/目录下即可如果是从网上下载已编译的二进制文件(eclipse之类的),可以进行手动的创建将以下代码放在一个sublime.desktop的文件中,并复... 阅读全文
posted @ 2014-07-03 10:44 涛光 阅读(9652) 评论(0) 推荐(0)
摘要:实现思路:将两个redis-server作为后端,然后通过haproxy做为负载均衡器,每个redis-server的机器上配置配置一个用于健康检查的shell,并通过xinetd将这个shell设置为服务监听9981端口并进行管理。haproxy通过redis-server机器上的9981端口进行健康检查,如果检查失败,就直接移除该redis-server,恢复后又自动添加haproxy.confglobal maxconn 2# debug quiet user zhxia group zhxia nbpro... 阅读全文
posted @ 2012-11-13 09:31 涛光 阅读(8015) 评论(0) 推荐(0)
摘要:inotity-tools是用于监视linux文件系统变化的工具,非常适合于一些要求实时同步的场合,在linux内核为2.6.13版本以上的内核才支持,使用uanme -r 查看,我使用的是ubuntuzhxia@ubuntu-zhxia:/var/www/test$uname-r2.6.35-22-generic-pae首先安装inotify-tools,可以自行下载源码包安装,但我使用ubuntu的apt-get方式安装sudoapt-getinstallinotify-tools一下shell是将 /var/www目录同步到 /tmp/下 #!/bin/bashsrc=/var/wwwd 阅读全文
posted @ 2012-11-13 09:27 涛光 阅读(863) 评论(0) 推荐(0)
摘要:shell:#!/bin/bash#==========================================================# this example show you how to get data from pipe#========================... 阅读全文
posted @ 2012-11-13 09:27 涛光 阅读(280) 评论(0) 推荐(0)
摘要:Beanstalkd,一个高性能、轻量级的分布式内存队列系统,最初设计的目的是想通过后台异步执行耗时的任务来降低高容量Web应用系统的页面访问延迟,支持过有9.5 million用户的Facebook Causes应用。wget https://github.com/downloads/kr/beanstalkd/beanstalkd-1.6.tar.gztar -xzvf beanstalkd-1.6.tar.gzmake && make install安装php扩展git clone https://github.com/nil-zhang/php-beanstalk.gi 阅读全文
posted @ 2012-11-01 21:59 涛光 阅读(3460) 评论(1) 推荐(0)
摘要:Thunderbird 默认在对邮件进行回复或回复所有时,回复内容与签名是在邮件内容下方的,与我们阅读邮件的传统思维是不一样的,因此需要按照下面的方式稍加设置:选择“Edit”->"Account Settings" ->当前的帐号->右下角的"Manage Identities"->弹出框 选择"Edit" ,在新的对话框中选择这个tab “Composition & Addressing”,选择“Automatically quote the original message when replyi 阅读全文
posted @ 2012-10-22 12:18 涛光 阅读(3637) 评论(0) 推荐(0)
摘要:sudo visudo在root ALL=(ALL)ALL行下添加XXX ALL=(ALL)ALL,XXX为你的用户名例如:# User privilege specificationroot ALL=(ALL:ALL) ALLzhxia ALL=(ALL:ALL) ALL 阅读全文
posted @ 2012-08-16 11:03 涛光 阅读(150) 评论(0) 推荐(0)
摘要:在将自己的公钥添加到要登陆的机器上时,仍然不能免密码登陆,并出现以下提示:Agent admitted failure to sign using the key.需要进行以下操作即可解决:ssh-add 阅读全文
posted @ 2012-07-26 14:18 涛光 阅读(1633) 评论(0) 推荐(1)
摘要:wget--mirror-w2-p--html-extension--convert-links-P site http://www.example.com--mirror: Specifies to mirror the site. Wget will recursively follow all links on the site and download all necessary files. It will also only get files that have changed since the last mirror, which is handy in that it... 阅读全文
posted @ 2012-06-08 19:23 涛光 阅读(1289) 评论(0) 推荐(0)
摘要:打开文件/etc/ssh/sshd_config,将以下两行注释掉,可以加快ssh登录的速度#GSSAPIAuthenticationyes#GSSAPICleanupCredentialsyes 阅读全文
posted @ 2012-03-18 21:55 涛光 阅读(314) 评论(0) 推荐(0)
摘要:sudo apt-get install mutt sudo apt-get install msmtp 安装好了这两个包之后,就是进行相关配置文件的配置了: 首先配置 mutt,系统全局设置配置文件在 /etc/Muttrc,如果使用某个系统用户,可以在~/.muttc中设置,没有该文件,就自己创 阅读全文
posted @ 2011-04-15 12:24 涛光 阅读(6503) 评论(0) 推荐(0)
摘要:具体解决办法如下:在“我的电脑” 上单击右键,选择“硬件--设备管理器”,在设备管理器中选择“计算机”展开,选择“ACPI Multiprocessor PC” ,在该项上点击右键,选择“更新驱动程序”,选择“从列表或置顶位置安装”,下一步,选择“不要搜索,我要自己选择安装的驱动程序”,下一步,选择“Standard PC”,接着下一步,完成安装。 阅读全文
posted @ 2010-10-27 09:53 涛光 阅读(2074) 评论(0) 推荐(0)