Linux 的归档

Ubuntu 10.04 LTS 无法添加计算机的问题

今天装了个Ubuntu 10.04 LTS,完全是为了体验传说中的 Ubuntu One……

按照以下说明进行安装:

https://one.ubuntu.com/support/installation/

到第七步时死活找不到 “Add this Computer button” 这个按钮,郁闷了挺久。

还好在他们的 WIKI 中有人提到这个问题:

https://wiki.ubuntu.com/UbuntuOne/Status

继续阅读本文……

发表评论

Gentoo 下搭建 Nginx+ MySQL + PHP (fastcgi) 环境

安装 Nginx

* 一条命令搞定:

USE=fastcgi emerge nginx

* 新建用户和组:

groupadd www

useradd www -g www

Nginx 安装好后默认会添加 nginx 组和 nginx 用户,不过我本身还是习惯新建个 www 组和 www 用户来做 HTTP 服务用户。若今后 HTTP 服务器更换为 apache 或是 lighttpd 时,用户名和用户组可以不变。

继续阅读本文……

发表评论

emerge glib 出错

emerge glib 时出错:

gconvert.c:55:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv
make[4]: *** [gconvert.lo] Error 1
make[4]: Leaving directory `/var/tmp/portage/dev-libs/glib-2.20.5-r1/work/glib-2.20.5/glib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-libs/glib-2.20.5-r1/work/glib-2.20.5/glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/dev-libs/glib-2.20.5-r1/work/glib-2.20.5/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-libs/glib-2.20.5-r1/work/glib-2.20.5'
make: *** [all] Error 2
*
* ERROR: dev-libs/glib-2.20.5-r1 failed.
* Call stack:
* ebuild.sh, line 49: Called src_compile
* environment, line 3004: Called _eapi2_src_compile
* ebuild.sh, line 634: Called die

继续阅读本文……

发表评论

Gentoo 安装记录

晚上在虚拟机上重新装了下 gentoo,用了当前最新版的 gentoo,把安装过程记录下来备用。

下载安装包

下载安装 CD 和 stage3 包:

http://www.gentoo.org/main/en/where.xml

发表评论

配置 Linux 内核,并利用 iptables 作端口映射

  • 主机 IP:192.168.1.100
  • 目标机 IP:192.168.2.101

要求将到主机 192.168.1.100:11101 的请求映射到内部网目标机的 sshd 服务端口上,即:192.168.2.101:22。

配置内核(以 2.6.18 为例)

如果执行 iptable -L 出现以下信息,那么就需要重新配置和编译内核:

iptables v1.4.2: can't initialize iptables table `filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.

继续阅读本文……

发表评论

Ubuntu 下安装配置 fcitx 输入法

安装:

apt-get install fcitx

默认输入法引擎为 SCIM,需要切换输入法引擎为 fcitx:

im-switch -s fcitx

编译 fcitx 配置文件中的中文字体,否则输入法上的汉字会显示为方块:

gedit ~/.fcitx/config

中文字体改为:

显示字体(中)=WenQuanYi Zen Hei

“WenQuanYi Zen Hei”是我系统上已安装的字体,你可以使用 xlsfonts 或 fc-list 命令查看可用的字体列表。

保存设置后,按 Ctrl + Alt + Backspace 重启 X。

继续阅读本文……

发表评论

Debian 源的设置

用了几年 cn99 的源,现在 cn99 挂了,设置起源就比较麻烦了,不知道到底哪个源比较快了。还好有了 apt-spy,可以自动测试到哪个源的下载速度最快。

当然,刚装完系统时是没有 apt-spy 的,这时候我们可以暂时先找个可用的源代替,如(写在 /etc/apt/sources.list 中):

deb http://http.us.debian.org/debian/ stable main

执行以下命令更新软件包列表:

apt-get update

然后执行以下命令安装 apt-spy:

apt-get install apt-spy

继续阅读本文……

发表评论 (2)