Fedora笔记

2009年06月24日

Mark:Google.com最近时好时坏,今晚已经完全上不去了,包括gmail等服务

类归于: mark — 标签:, , — xiaomao101 @ 11:32 上午

2009年06月24日晚,google.com上不去,但是google.cn还是可以上去的,包括gmail,reader等服务均无法使用。

苏州电信用户。

2009年06月19日

让别人改不了你的Word文档(给Word加把锁)

类归于: Windows, 工具技巧 — 标签:, , , — xiaomao101 @ 2:09 上午
Lock word file

Lock word file

在“工具栏”右键找到“窗体”(图片中为繁体中文系统的“表单”),这样就会在“工具栏”加入“窗体”工具项了,然后黄色的“小锁”就可以将Word文档设置为别人无法编辑了,但是如果别人也知道了这个方法,只要他再点击一次“小锁”标志,则Word文档又变成可以编辑的了。

2009年06月17日

Firefox宽带web认证登录(对linux下的firefox同样适用)

类归于: Uncategorized — xiaomao101 @ 12:26 下午

我用的是沈阳网通,只要在地址栏输入以下网址:
[i]http://202.96.75.14/queryPort.jsp?userIp=221.200.216.87&newbl=1[/i]
把下划线部分改成自己主机自动获取的IP地址即可。
[b]http://202.96.75.14[/b]是我门学校登陆验证首页。

linux下屏幕录制软件(GIF格式)

类归于: Uncategorized — xiaomao101 @ 12:26 下午

软件名称:Byzanz
官方网站:[url=http://www.advogato.org/person/company/diary.html?start=18]http://www.advogato.org/person/company/diary.html?start=18[/url]

Fedora 中文字体美化(文泉驿中文字体)

类归于: Uncategorized — xiaomao101 @ 12:26 下午

安装并使用“文泉驿正黑体”获得更好的显示效果
[i]# yum install wqy-zenhei-fonts[/i]

文泉驿官方网站:[url=http://wqy.sourceforge.net]http://wqy.sourceforge.net[/url]

设置VNCServer服务并突破防火墙(SELinux)

类归于: Uncategorized — xiaomao101 @ 12:26 下午

我的系统是Fedora Core 5

1。打开系统服务设置
+—————————————————————————————-+
[root@cat xiaomao101]# serviceconf
[i]Launching a SCIM daemon with Socket FrontEnd…
Loading simple Config module …
Creating backend …
Loading socket FrontEnd module …
Starting SCIM as daemon …
GTK Panel of SCIM 1.4.4[/i]

+—————————————————————————————-+

2。启动VNC服务,并设置成开机启动
3。修改VNCServer配置文件,
+—————————————————————————————-+
|[root@cat xiaomao101]# cd /etc/sysconfig/
|[root@cat sysconfig]# ls
|amd diskdump kdump network-scripts syslog
|apmd dund kdump.rpmnew ntpd sysstat
|apm-scripts firstboot kernel pand sysstat.ioconf
|arpwatch grub keyboard pgsql system-config-securitylevel
|auditd hidd kudzu pm system-config-users
|authconfig hsqldb lm_sensors prelink tux
|autofs httpd modules rhn [b]vncservers[/b]
|bluetooth hwconf named samba vncservers_backup
|cbq i18n named.rpmnew saslauthd wpa_supplicant
|clock init netdump selinux xinetd
|console iptables netdump_id_dsa sendmail
|crond iptables-config netdump_id_dsa.pub smartmontools
|daemons irda network spamassassin
|desktop irqbalance networking squid
|[root@cat sysconfig]# vi vncservers
+—————————————————————————————-+

vncservers文件内容,红色部分为已经修改了的
+—————————————————————————————-+
|# The VNCSERVERS variable is a list of display:user pairs.
|#
|# Uncomment the lines below to start a VNC server on display :2
|# as my ‘myusername’ (adjust this to your own). You will also
|# need to set a VNC password; run ‘man vncpasswd’ to see how
|# to do that.
|#
|# DO NOT RUN THIS SERVICE if your local area network is
|# untrusted! For a secure way of using VNC, see
|# .
|
|# Use “-nolisten tcp” to prevent X connections to your VNC server via TCP.
|
|# Use “-nohttpd” to prevent web-based VNC clients connecting.
|
|# Use “-localhost” to prevent remote VNC clients connecting except when
|# doing so through a secure tunnel. See the “-via” option in the
|# `man vncviewer’ manual page.
|
|[b]VNCSERVERS=”2:xiaomao101″[/b]
|# VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”
+—————————————————————————————-+
注:
“2:xiaomao101”表示以xiaomao101登录,并且端口是5802

4。防火墙设置
打开端口5802,5902(因为不知道是UDP还是TCP的,所以5802的UDP和TCP我都选上了)
注:
vncview通信用到端口5802,IE通过JAVA访问VNCServer用到端口5902

5。IE端需要安装MS的JAVA插件

常用解压缩命令

类归于: Uncategorized — xiaomao101 @ 12:26 下午

gunzip -c divx4linux-std-20030428[b].tar.gz[/b] | tar xvf -
bzip2 -cd xvidcore-1.1.0[b].tar.bz2[/b] | tar xvf -
bzip2 -cd Blue-1.5[b].tar.bz2[/b] | tar xvf – -C /usr/share/mplayer/Skin/

命令ifconfig和route的使用方法

类归于: Uncategorized — xiaomao101 @ 12:26 下午

多网卡的设置

静态路由器的配置

Linux下最常用的指定路由规则的命令是route,当然也有些图形化的工具可以使用,我们下面一个一个介绍。

route命令的使用

route工具主要功能是管理Linux系统内核中的路由表。它最大的用途就是用来设定静态的路由表项,通常是在系统用ifconfig配置网络接口(例如网卡等)后,用它来设定主机或者一网段的IP地址应该通过什么接口发送等。

Route工具有复杂的调用参数。

调用格式如下:
route [-CFvnee]

route [-v] [-A family] add [-net|-host] target [netmask
Nm] [gw Gw] [metric N] [mss M] [window W] [irtt I]
[reject] [mod] [dyn] [reinstate] [[dev] If]

route [-v] [-A family] del [-net|-host] target [gw Gw]
[netmask Nm] [metric N] [[dev] If]

route [-V] [--version] [-h] [--help]

主要参数说明如下:
-v 使用冗余输出模式。
-A family
指定特定的地址族(例如”inet”、”inet6″)。
-n 使用数字显示的地址(例如,202.38.75.75)而不是去解释域名。
-e 使用与netstat相同的输出格式。
-ee 参数会产生很长的输出,包括内核路由表的几乎所有信息。
-net 目标(target)是一个网段。
-host 目标(target)是一个单独的主机。
-F 显示内核FIB路由表。结果可能被-e 和-ee参数改变。
-C 显示内核中路由缓存信息。
del 删除一个路由表项。
add 增加一个路由表项。
target 配置的目的网段或者主机。可以是IP,或者是网络或主机名。
netmask Nm
用来指明要添加的路由表项的网络掩码。
gw Gw 任何通往目的(target )的IP分组都要通过这个网关。
metric M
设置路由表中该项的尺度域(metric field)为M。
mss M 设置TCP的最大分片长度(MSS)M bytes。
系统缺省值是536。
window W
设置TCP发送窗口的尺寸为W bytes。
irtt I 设置TCP的初始化回路时间(irtt)I毫秒(1-12000)。
缺省情况下按照RFC 1122 规定是300ms。
reject 安装一个阻塞型的路由,这样可能会有路由查找失败。
mod, dyn, reinstate
添加或者修改一个动态路由表项。主要用来测试和诊断。
dev If 强行使用某个特定的输出接口(If),而不用系统去寻找接口。

下面举几个配置的例子:

route add -net 192.56.76.0 netmask 255.255.255.0 gw 192.168.0.1 dev eth0
添加一条路由表项,网段192.56.76.x 应该从接口”eth0″走,网关是192.168.0.1。

route add default gw mango-gw
添加一条缺省路由(如果没有其他匹配的路由项,就使用这个路由规则)。
“mango-gw”是一个主机名, 而通往这个主机的路由规则应该事先已经设置好了。

route add ipx4 sl0
给主机”ipx4″添加一条路由规则,使用SLIP接口sl0。

Route命令的输出结果

输出的格式有以下几栏:

Destination
目标网段或者主机。

Gateway
网关地址,如果没有设置,则是”*”表示。

Genmask
网络掩码。

Flags 一些可能的标记如下:
U (路由是活动的)
H (目标是一个主机)
G (使用网关(gateway))
R (reinstate route 动态路由产生的表项)
D (dynamically installed by daemon or redirect)
M (modified from routing daemon or rederict)
! (reject route)

Metric 路由距离。

Ref 路由项引用次数。(linux内核中没有使用)

Use 查找路由项的次数。.

Iface 该路由表项对应的输出接口。

MSS 缺省的TCP最大分片尺寸。

Window 缺省的TCP窗口的尺寸。

irtt 缺省的TCP回路时间。

HH (cached only)
ARP入口的数目。

Arp (cached only)
该路由项对应的物理地址是否过期等信息。

下面是route -n的输出实例:

tarn:~$ /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
202.38.64.3 202.38.75.62 255.255.255.255 UGH 0 0 0 eth0
202.38.75.75 0.0.0.0 255.255.255.255 UH 0 0 0 eth2
202.38.75.0 0.0.0.0 255.255.255.128 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.75.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
159.226.0.0 202.38.75.62 255.255.0.0 UG 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 202.38.75.62 0.0.0.0 UG 1 0 0 eth0

上面的输出中我们可以看出,该路由器配置的缺省网关是202.38.75.62,它上面有3个以太网接口(eth0、eth1和eth2)。其中第一条和第二条路由规则是针对一个主机的,其他的都是针对一个网段的,这可以重掩码看出。

Linux下看当前进程的命令

类归于: Uncategorized — xiaomao101 @ 12:26 下午

ps -ax

fedora core 6 下FTP服务器vsftp的安装与配置

类归于: Uncategorized — xiaomao101 @ 12:26 下午

安装
[i]yum install vsftp[/i]
配置
安装完事默认配置是允许匿名用户访问/var/ftp/目录,权限是只读
要开放本地用户的访问权限需要修改/etc/vsftpd/vsftpd.conf文件,

[i]# Uncomment this to allow local users to log in.
#local_enable=YES[/i]
的注释去掉即可。

/etc/vsftpd/vsftpd.conf内容如下:
[i]# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd’s
# capabilities.
#
# Allow anonymous FTP? (Beware – allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd’s)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages – messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using “root” for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command “SIZE /big/file” in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the “-R” option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as “ncftp” and “mirror” assume
# the presence of the “-R” option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When “listen” directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES[/i]
/etc/vsftpd/vsftpd.conf内容如上;

早前文章 »

WordPress 所驱动