2008/05/15

Fedora 9最小安裝 minimal install

以文字模式安裝,所有套件全部不選,而且要點到選擇各套件的選項,然後每一個都不勾,
這樣下來預設的最小安裝有403個rpm,也近900多MB;
因不用任何的Xorg相關的東西,也沒有用volume raid等東西,
竟可移除剩302個rpm;敢移除的是因知道確實不會用到而移除,
有些像wireless-tools想移,但又會與其他的rpm綁在一起,所以就沒得去移,
以下是移掉除預設最小安裝外的其他可移的rpm:
alsa-lib-1.0.16-3.fc9.x86_64
avahi-0.6.22-10.fc9.x86_64
avahi-compat-libdns_sd-0.6.22-10.fc9.x86_64
avahi-glib-0.6.22-10.fc9.x86_64
bluez-gnome-0.25-1.fc9.x86_64
bluez-libs-3.30-1.fc9.x86_64
bluez-utils-3.30-2.fc9.x86_64
cairo-1.6.4-1.fc9.x86_64
ccid-1.2.1-4.fc9.x86_64
ConsoleKit-0.2.10-3.fc9.x86_64
coolkey-1.1.0-6.fc9.x86_64
cups-1.3.7-1.fc9.x86_64
cups-libs-1.3.7-1.fc9.x86_64
desktop-file-utils-0.15-1.fc9.x86_64
dhclient-4.0.0-14.fc9.x86_64
dhcpv6-client-1.0.14-1.fc9.x86_64
dump-0.4b41-7.1.fc9.x86_64
GConf2-2.22.0-1.fc9.x86_64
giflib-4.1.3-9.x86_64
gnome-keyring-2.22.1-1.fc9.x86_64
gpm-1.20.1-90.fc9.x86_64
gtk2-2.12.9-5.fc9.x86_64
gvfs-0.2.3-11.fc9.x86_64
hal-0.5.11-0.7.rc2.fc9.x86_64
hal-info-20080317-6.fc9.noarch
hicolor-icon-theme-0.10-4.noarch
ifd-egate-0.05-20.x86_64
irda-utils-0.9.18-4.fc9.x86_64
isdn4k-utils-3.2-58.fc9.x86_64
java-1.5.0-gcj-1.5.0.0-21.fc9.x86_64
java-1.6.0-openjdk-1.6.0.0-0.10.b09.fc9.x86_64
java-1.6.0-openjdk-plugin-1.6.0.0-0.10.b09.fc9.x86_64
java_cup-0.10-0.k.6jpp.2.x86_64
jpackage-utils-1.7.5-1jpp.1.fc9.noarch
libgcj-4.3.0-8.x86_64
libICE-1.0.4-3.fc9.x86_64
libnotify-0.4.4-10.fc9.x86_64
libogg-1.1.3-9.fc9.x86_64
libSM-1.0.2-5.fc9.x86_64
libsmbclient-3.2.0-1.pre3.9.fc9.x86_64
libvorbis-1.2.0-3.fc9.x86_64
libwnck-2.22.1-1.fc9.x86_64
libX11-1.1.4-1.fc9.x86_64
libXau-1.0.3-5.fc9.x86_64
libxcb-1.1-4.fc9.x86_64
libXcomposite-0.4.0-4.fc9.x86_64
libXcursor-1.1.9-2.fc9.x86_64
libXdamage-1.1.1-4.fc9.x86_64
libXdmcp-1.0.2-5.fc9.x86_64
libXext-1.0.4-1.fc9.x86_64
libXfixes-4.0.3-3.fc9.x86_64
libXft-2.1.12-5.fc9.x86_64
libXi-1.1.3-4.fc9.x86_64
libXinerama-1.0.3-1.fc9.x86_64
libXrandr-1.2.2-3.fc9.x86_64
libXrender-0.9.4-3.fc9.x86_64
libXres-1.0.3-4.fc9.x86_64
libXt-1.0.4-5.fc9.x86_64
libXtst-1.0.3-3.fc9.x86_64
libXxf86vm-1.0.1-5.fc9.x86_64
lrzsz-0.12.20-23.fc9.x86_64
mesa-libGL-7.1-0.29.fc9.x86_64
minicom-2.3-2.fc9.x86_64
mozplugger-1.10.1-1.x86_64
nano-2.0.6-4.fc9.x86_64
NetworkManager-0.7.0-0.9.3.svn3623.fc9.x86_64
NetworkManager-glib-0.7.0-0.9.3.svn3623.fc9.x86_64
nfs-utils-1.1.2-2.fc9.x86_64
nfs-utils-lib-1.1.1-3.fc9.x86_64
notification-daemon-0.3.7-9.fc9.x86_64
nscd-2.8-3.x86_64
nss_ldap-259-3.fc9.x86_64
obex-data-server-0.3.1-1.fc9.x86_64
ORBit2-2.14.12-3.fc9.x86_64
pam_smb-1.1.7-8.2.2.x86_64
pango-1.20.1-1.fc9.x86_64
paps-0.6.8-5.fc9.x86_64
paps-libs-0.6.8-5.fc9.x86_64
pcsc-lite-1.4.4-3.fc9.x86_64
pinfo-0.6.9-7.fc9.x86_64
pm-utils-1.1.0-7.fc9.x86_64
ppp-2.4.4-6.fc9.x86_64
radeontool-1.5-3.fc9.x86_64
redhat-lsb-3.1-19.fc8.x86_64
rmt-0.4b41-7.1.fc9.x86_64
rpcbind-0.1.4-14.fc9.x86_64
rp-pppoe-3.8-3.fc9.x86_64
samba-common-3.2.0-1.pre3.9.fc9.x86_64
samba-winbind-3.2.0-1.pre3.9.fc9.x86_64
sinjdoc-0.5-6.fc9.x86_64
smartmontools-5.38-2.fc9.x86_64
smartmontools-config-5.38-2.fc9.x86_64
sox-14.0.1-1.fc9.x86_64
startup-notification-0.9-4.fc9.x86_64
tzdata-java-2008b-1.fc9.noarch
wpa_supplicant-0.6.3-5.fc9.x86_64
wvdial-1.60-5.fc9.x86_64
xdg-utils-1.0.2-4.fc9.noarch
xorg-x11-filesystem-7.3-1.fc9.noarch
ypbind-1.20.4-4.fc9.x86_64
yp-tools-2.9-3.x86_64

移掉這些後大概700MB左右吧,
在這樣環境下才再裝其他需要的套件。

Labels: , , ,

2007/09/23

Fedora 7 上安裝 V-Gear的WebCam: Live TalkCam

前一陣子買了便宜的webcam:
V-Gear TalkCam Live激
V-Gear 拍拍看 Live激
http://v-gear.com.tw/products/intro.asp?CATEGORY1_ID=D01&CATENAME=WebCam+%BA%F4%B8%F4%C4%E1%BCv%BE%F7&PROD_ID=AMVG1-010-063-02-G
http://buy.yahoo.com.tw/gdsale/gdsale.asp?gdid=422433

參考了這篇:
How To Set Up A Debian Linux WebCam Server Using a USB Web Cam
http://www.aboutdebian.com/webcam.htm

想在Fedora 7 上跑webcam,
無法馬上抓到該設備,
參閱網路上的一些說明而OK。

1.
# lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 002: ID 0c45:612c Microdia
得知 USB的ID序號是 0c45:612c

2.
# lsusb -d 0c45:612c -v |less
Bus 001 Device 002: ID 0c45:612c Microdia
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0c45 Microdia
idProduct 0x612c
bcdDevice 1.01
iManufacturer 0
iProduct 1 USB camera
iSerial 0
bNumConfigurations 1
......

3.
安裝以下兩工具可控制webcam
yum install v4l2-tool xawtv

為了compiling新的driver而要裝kernerl的source
yum install kernel-devel

4.
抓相容許多usb webcam的driver並compiling
wget http://mxhaard.free.fr/spca50x/Download/gspcav1-20070508.tar.gz
tar zxvf gspcav1-20070508.tar.gz
cd gspcav1-20070508
make
make install

5.
modprobe gspca
就可抓到webcam,
然後下指令看到更詳細的資料:
xawtv -hwscan
This is xawtv-3.95, running on Linux/i686 (2.6.22.5-76.fc7)
looking for available devices
/dev/video0: OK [ -device /dev/video0 ]
type : v4l
name : Typhoon Easy Cam 1.3 MPix
flags: capture

6.
參考:
http://ubuntuforums.org/archive/index.php/t-38215.html
v4lctl -c /dev/video0 list
看到更詳細的資訊:
attribute | type | current | default | comment
-----------+--------+---------+---------+-------------------------------------
input | choice | (null) | SN9CXXX | SN9CXXX
norm | choice | PAL | PAL | PAL NTSC SECAM AUTO
bright | int | 4144 | 0 | range is 0 => 65535
hue | int | 0 | 0 | range is 0 => 65535
color | int | 32768 | 0 | range is 0 => 65535
contrast | int | 16128 | 0 | range is 0 => 65535

7.
把webcam抓到的畫面放到某web,
透過ftp,就裝vsftpd:
yum install vsftpd

8.
參考:
http://phorum.study-area.org/viewtopic.php?t=20881
設定Virtual User:
http://gentoo-wiki.com/HOWTO_vsftpd#Virtual_Users
編輯/etc/vsftpd/vsftpd.conf

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_local_user=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
guest_enable=YES
guest_username=virtual_user_name
anon_upload_enable=YES

9.
在Xwindow上執行:
xawtv
即可看到畫面。

10.
編輯.webcamrc

[grab]
device = /dev/video0
width = 320
height = 240
delay = 0
input = SN9CXXX
norm = pal
quality = 75
trigger = 180

[ftp]
host = localhost
user = virtual_user_name_for_ftp
pass = password_for_login
dir = /where/web/html/directory
file = webcam.jpeg
tmp = uploading.jpeg
local = 1

11.
執行webcam
就會不斷更新webcam.jpeg了!

Labels: , , , , , ,

2007/08/17

How to Install and configure Clamav-milter on Fedora 7

If install clamav-milter by yum,
will install the following rpm packages:

fedora-usermgmt-default-fedora-setup.noarch
fedora-usermgmt-core.noarch
fedora-usermgmt-shadow-utils.noarch
fedora-usermgmt.noarch
clamav-filesystem.i386
clamav-data.i386
clamav-lib.i386
clamav-milter.i386
clamav-milter-sysv.i386
clamav-update.i386

but the installed clamav version is 0.90.3-1.fc7 out of date.

I want to install new 0.91.1 version clamav-milter by rpm,
and finding here:
http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/7/i386/
with some new version 0.91.1 clamav-milter.
and some release or bug information here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=248482

the following is installing steps:
1.
remove the mentioned rpm packages.

2.
yum install fedora-usermgmt, because this package is nessary to install clamav-milter.

3.
get these rpm files:
clamav-lib-0.91.1-1.fc7.i386.rpm
clamav-data-0.91.1-1.fc7.i386.rpm
clamav-filesystem-0.91.1-1.fc7.i386.rpm
clamav-milter-0.91.1-1.fc7.i386.rpm
clamav-milter-sysv-0.91.1-1.fc7.i386.rpm
clamav-update-0.91.1-1.fc7.i386.rpm
from:
http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/7/i386/

4.
import rpm gpg key:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test

5.
rpm install up mentioned packages.

6.
edit /etc/freshclam.conf
change following lines to:
#Example
DatabaseDirectory /var/lib/clamav
PidFile /var/run/freshclam.pid
DatabaseOwner clamav

7.
edit /etc/clamd.d/milter.conf
change following lines to:
#Example
LogTime yes
LogSyslog yes
PidFile /var/run/clamav-milter/clamd.pid
TemporaryDirectory /tmp
DatabaseDirectory /var/lib/clamav
#LocalSocket /var/run/clamav.milter/clamd.sock

8.
edit /etc/sysconfig/clamav-milter
====================================
CLAMAV_FLAGS=" --config-file=/etc/clamd.d/milter.conf \
--quiet \
--dont-wait \
--noreject \
--force-scan \
--local \
--outgoing \
local:/var/run/clamav-milter/clamav.sock \
"
=======================================
NOTICE:
some directories in these config file are not consistent,
if something wrong when executing,
check these directory name!

9.
edit /etc/sysconfig/freshclam
to make new virus pattern update enable.
add mark this line:
#FRESHCLAM_DELAY=disabled-warn # REMOVE ME

10.
configure the sendmail.cf
go to /usr/share/sendmail-cf/cf
if no these directory
yum install sendmail-cf

edit sendmail.mc
==========================
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#

#
# This is a generic configuration file for Linux.
# It has support for local and SMTP mail only. If you want to
# customize it, copy it to a name appropriate for your environment
# and do the modifications there.
#

divert(0)dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
DOMAIN(generic)dnl
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
MASQUERADE_AS(XXX.xxx.com)dnl
define(`confBAD_RCPT_THROTTLE', `3')dnl
define(`confTO_IDENT',`0s')dnl
define(`confMILTER_LOG_LEVEL',`1')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
FEATURE(local_procmail)dnl
INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav.sock, F=, T=S:4m;R:4m')dnl
define(`confINPUT_MAIL_FILTERS', `clamav')dnl
define(`SMART_HOST',`XXXhost')dnl
define(`STATUS_FILE',`/etc/mail/statistics')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
FEATURE(`access_db', `hash -T -o /etc/mail/access')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl
FEATURE(`blacklist_recipients')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
=========================
Notice:
make sure the socket string is same as /etc/sysconfig/clamav-milter

./Build sendmail.cf
cp sendmail.cf /etc/mail/sendmail.cf

11.
cd /etc/init.d/
chkconfig clamav-milter on
./clamav-milter start
./sendmail start

Labels: , , , , , ,