Tag: Linux

  • 在Ubuntu上安装fprint实现指纹识别

    实验室配的新电脑有指纹识别,才装好Ubuntu没两天,正好折腾了一下。 因为没有在网上找到很有效的教程,走了很多弯路,这里总结一下,其实很简单。 废话不多说,上代码: [shell] sudo add-apt-repository ppa:fingerprint/fprint # 添加 PPA sudo apt-get update # 更新软件源 sudo apt-get install libfprint0 fprint-demo libpam-fprintd gksu-polkit # 安装软件 [/shell] 是的,就这三步,此时如果安装没有问题,在 “System Settings” -> “User Accounts” 里会多一个 “Fingerprint Login”,照着提示进行设置就可以了。 我也写了一个简单的安装脚本,拷贝到单独的文件,直接”sudo sh 文件名”就可以了。 需要注意的是,要注意区分fprint和fprintd,Ubuntu原来的软件源中有libpam-fprint(最后没有d,d代表Dbus接口),但不是一个东西。 其他Linux发行版应该也是找到对应软件的安装来源,注意区分一下fprint和fprintd就行

  • VPS杂记

    入手VPS好久了,用的是LNMP架构,在Evernote中压了一些笔记,一一贴出来示众~ 安装lnmp 注:版本可能有更新,0.7为截至2011/06/03的最新版 [shell] wget http://soft.vpser.net/lnmp/lnmp0.7.tar.gz tar zxvf lnmp0.7.tar.gz cd lnmp0.7/ ./ubuntu.sh [/shell] 创建虚拟主机 [shell] /root/vhost.sh [/shell] root账户的使用 平时使用普通账户登录,需要使用root权限的时候用su命令,然后再输入root命令,使用完root权限之后可以用ctrl+D退出权限,继续使用普通账户权限,这样可以防止权限的混乱 安装OpenVPN [shell] wget http://vpsnoc.com/scripts/debian-openvpn.sh chmod +x debian-openvpn.sh ./debian-openvpn.sh [/shell] 按照提示安装完成后下载keys.tgz,将其解压到OpenVPN安装目录下的config子目录,然后启动OpenVPN就可以使用了 wordpress的rewrite问题 默认的规则有点小问题,替换为以下的即可: [shell] if (!-e $request_filename) { rewrite (.*) /index.php; } [/shell] WordPress文件权限 [shell] chown -R www.www /blog [/shell]

  • Shell 自动补全

    1) /etc/passwd It shows like this [shell]huxuan:x:1002:1002::/home/huxuan:/bin/bash[/shell] in format of [shell]Username:Password:User ID (UID):Group ID (GID):User ID Info:Home directory:Command/shell[/shell] Make sure the Command/shell is the “/bin/bash” and not the “/bin/sh” which may be the default value. 2) $HOME$/.bashrc or /etc/bash.bashrc Make sure the code blew is not commented out. [shell]if [ -f /etc/bash_completion ] && !…