一直用proftpd的,今偷懒就用了centos自带的vsftpd,以前老觉得vsftpd功能少,也就没在意。
修改/etc/vsftpd/vsftpd.conf
问题出在了设置被动模式上
一上手直接加了下边几行。
pasv_addr_resolve=YES
pasv_address=myhostname
pasv_min_port=60000
pasv_max_port=61000
然后给iptables加了20跟60000-61000的端口段。
本机测试,没问题,本以为OK了
结果,其他内网机器都访问不了被动模式,自己用另外一台机子通过filezilla访问居然返回的是:
Response: 227 Entering Passive Mode (127,0,0,1,235,14)
Command: LIST
Error: Transfer channel can’t be opened. Reason: 対象のコンピュータによって拒否されたため、接続できませんでした。
Error: Could not retrieve directory listing
iptables没问题
那就出在vsftpd的配置了。
搞来搞去,把pasv_address改成ip地址,结果好使了,但是俺这机子IP是自动获取啊。
上边几个关于被动模式的参数也改了改试试,没啥进展。
最后一怒,把
pasv_addr_resolve=YES
pasv_address=myhostname
都给注释掉了,重启服务,居然好了。。
汗了一会,码字留念。
PS:
如果是
pasv_addr_resolve=NO
pasv_address=myhostname
的话,报500错误。
返回消息为 500 OOPS: invalid pasv_address
yum install scim-lang-chinese
yum install scim-lang-japanese
然后更改前端全局变量 热键 为CTRL+SPACE
sudo gedit /etc/X11/xinit/xinput.d/zh_CN
将对应行修改为
GTK_IM_MODULE=scim
QT_IM_MODULE=scim
很简单
sudo apt-get install rar unrar
OK了,可以直接双击rar文件解压缩了。
sudo apt-get install emerald compizconfig-settings-manager
安装完成之后,通过“系统” – “首选项” – “Advanced Desktop Effects Settings”打开Compiz Fusion设置
1,$ wget -O – http://morgoth.free.fr/files/morgoth-signkey.gpg.asc | sudo apt-key add -
2,sudo gedit /etc/apt/sources.list
在文件中加入一行
deb http://morgoth.free.fr/ubuntu feisty-backports main
3,sudo apt-get update
4, $ sudo apt-get install audacious audacious-mac audacious-plugins
OK了
1,配置源(可选)
gedit /etc/apt/sources.list在任意位置,加入这两行源,然后保存并退出
deb http://archive.ubuntu.com/ubuntu gutsy universe multiverse
deb-src http://archive.ubuntu.com/ubuntu gutsy universe multiverse
2,安装mplayer:
sudo apt-get update
sudo apt-get install mplayer
3,取得钥匙
sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/medibuntu.list
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -
4,更新系统
sudo apt-get update
5,安装w32codecs
sudo apt-get install w32codecs libdvdcss2
原来是为了skype装回windows,这回是为了skype装了linux
http://www.skype.com/download/skype/linux/choose/
终于他妈的出来正式版了。
不过发现sony的本装linux那个不舒坦,老死机,fedora,ubuntu,opensuse,centos,统统不好使
看来还是老老实实给老婆当小说阅读器吧。
因为安装的时候选择了DHCP获得IP地址,虽然家里路由常年不动,多少有点不放心,怕万一停电之类的IP地址变了,那端口映射,域名解析可就全完了,就尝试着手动改一下吧。
1,先搜索了一下,得到以下解释
IP IP地址
Netmark 子网掩码
Gateway 默认网关
HostName 主机名称
DomainName 域名
DNS DNS的IP
2,需要修改的文件常有
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/resolv.conf
/etc/hosts
以下是我的设置
/etc/sysconfig/network
这里主要是指定了网关
NETWORKING=yes
NETWORKING_IPV6=no
GATEWAY=192.168.1.1
HOSTNAME=localhost.localdomain
/etc/sysconfig/network-scripts/ifcfg-eth0
这里主要指定IP获得方式(static),ip地址,子网掩码,网络类型
# Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express
DEVICE=eth0
#BOOTPROTO=dhcp
BOOTPROTO=static
IPADDR=192.168.1.21
NETMASK=255.255.255.0
TYPE=Ethernet
HWADDR=XX:XX:XX:XX:XX:XX
ONBOOT=yes
/etc/resolv.conf
指定DNS(我在这里就吃了亏,没设置前网络地址怎么也无法解析)
search localdomain
nameserver 192.168.1.1
/etc/hosts
我没设置,是用来定义主机名的。
This doesn’t seem to be terribly well documented, so I thought I’d post it here for those googling for a solution.
Problem
Installing Ruby on Rails on CentOS (or Redhat), the RubyGems part of the official installation instructions (or the instructions listed in this excellent SitePoint book which I’m working through at the moment) may yield this result:
# cd /usr/local/src/rubygems-0.9.2
# ruby setup.rb
< --- lib
/usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:4:in `require': no such file to load — zlib (LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:4
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:8:in `require’
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:8
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:501:in `require’
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:501
from /usr/local/src/rubygems-0.9.2/./post-install.rb:81:in `require’
from /usr/local/src/rubygems-0.9.2/./post-install.rb:81:in `install_sources’
from /usr/local/src/rubygems-0.9.2/./post-install.rb:116:in `try_run_hook’
from setup.rb:584:in `run_hook’
from setup.rb:1322:in `exec_task_traverse’
from setup.rb:1175:in `exec_install’
from setup.rb:894:in `exec_install’
from setup.rb:712:in `invoke’
from setup.rb:681:in `invoke’
from setup.rb:1359
Solution
A zlib error? Hrm. Double check zlib and zlib-devel are installed (I’m not sure if zlib-devel is needed but I installed it for good measure).
# yum install zlib zlib-devel
Then:
# cd /usr/local/src/ruby-1.8.5-p2/ext/zlib/
# ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
# make
# make install
Next, install RubyGems. Note that running “ruby setup.rb” on it’s own doesn’t seem to work, try this:
# cd /usr/local/src/rubygems-0.9.2/
# ruby setup.rb config
# ruby setup.rb setup
# ruby setup.rb install
All’s good in the hood. Now continue with the rest of the installation.
# gem install rails --include-dependencies
Enjoy.
link from :http://lucaschan.com/weblog/2007/03/22/installing-ruby-on-rails-on-centosredhat-4x/
近期评论