2011/11/15

[VLC Player Install]

-->Repository

# yum --enablerepo=atrpms install vlc

[Repository - atrpms]

$ vi /etc/yum.repos.d/atrpms.repo

[atrpms]
name=Redhat Enterprise Linux $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
enabled=0
gpgcheck=1
gpgkey=http://atrpms.net/RPM-GPG-KEY.atrpms

$ rpm --import http://atrpms.net/RPM-GPG-KEY.atrpms

2011/09/21

[NVIDIA Driver Install for CentOS6]

-->Repository

# yum --enablerepo=elrepo install kmod-nvidia.i686 nvidia-x11-drv.i686

[Repository - elrepo]

http://elrepo.org/tiki/tiki-index.php

# rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm
# vi /etc/yum.repos.d/elrepo.repo
念のため変更
enabled=1 --> enabled=0

2011/09/08

[NTFS Format]

-->Repository

# yum --enablerepo=dag install ntfsprogs fuse-ntfs-3g

・fdiskで領域のシステムIDを7に変更しておく
# mkntfs /dev/sdb1
# mount -t ntfs /dev/sdb1 /mnt/ntfs

2011/09/01

【motion install】

-->Repository

# yum -y --enablerepo=dag motion
# vi /etc/motion/motion.conf


# /etc/init.d/motion start



起動していないなともったらログにエラーが出てる...
kernel: usb 1-3: new high speed USB device using ehci_hcd and address 3
kernel: usb 1-3: configuration #1 chosen from 1 choice
kernel: uvcvideo: Found UVC 1.00 device (046d:0821)
kernel: input: UVC Camera (046d:0821) as /class/input/input4
motion: [0] Processing thread 0 - config file /etc/motion/motion.conf
motion: [0] Created process id file /var/run/motion.pid. Process ID is 5801
motion: [0] Motion running as daemon process
motion: [0] Thread 1 is from /etc/motion/motion.conf
motion: [1] ioctl(VIDIOCGMBUF) - Error device does not support memory map
motion: [1] V4L capturing using read is deprecated!
motion: [1] Motion only supports mmap.
motion: [1] Capture error calling vid_start
motion: [1] Removed process id file (pid file).

2011/08/31

【UVC Install】


参考URL:http://www.ideasonboard.org/uvc/

# git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git uvcvideo
# cd uvcvideo
# git remote add uvcvideo git://linuxtv.org/pinchartl/uvcvideo.git
# git remote update
# git checkout -b uvcvideo-master uvcvideo/uvcvideo-next

# modprobe uvcvideo
# lsmod | grep uvcvideo
uvcvideo 53833 0
compat_ioctl32 5569 1 uvcvideo
videodev 25793 1 uvcvideo
v4l1_compat 16069 2 uvcvideo,videodev
v4l2_common 24385 2 uvcvideo,videodev

【git install】


-->Repository

# yum -y --enablerepo=dag install git
 ・
 ・
Downloading Packages:
(1/3): perl-Git-1.7.6-1.el5.rf.i386.rpm
(2/3): perl-DBI-1.52-2.el5.i386.rpm
(3/3): git-1.7.6-1.el5.rf.i386.rpm
 ・
 ・

#

2011/04/12

【unzipのsjis対応】

windowsで圧縮したファイル名・フォルダ名などはsjisになっていて
文字化け多発(・・;

色々調べた結果convmvを使用して解凍後変換という手もあるが
やはり文字化け多発・・・

unzipにパッチを与えるのがよさげでした。
参考HP:http://d.hatena.ne.jp/t2y-1979/20090628/1246157403

・準備
1.unzipのPRMソースを拾ってくる
unzip-5.52-3.el5.src.rpm

2.unzip-jaパッチを拾ってくる
wget 'http://ebuild.gentoo.gr.jp/open.php?mode=download&type=files&cat=app-arch&app=unzip&arg=unzip-5.52-ubuntuja.patch&visible=' -O unzip-5.52-sjis.patch

# rpm -ivh unzip-5.52-3.el5.src.rpm
# cp -p unzip-5.52-sjis.patch /usr/src/redhat/SOURCES/
# cd /usr/src/redhat/SPECS/
# cp -p unzip.spec unzip.spec.orig
# vi unzip.spec
Release: 3%{?dist}
↓
Release: 3%{?dist}.1ja

追記
Patch12: unzip-5.52-sjis.patch

追記
%patch12 -p1 -b .sjis

# rpmbuild -ba unzip.spec
# rpm -Uvh ../RPMS/i386/unzip-5.52-3.1ja.i386.rpm
# rpm -q unzip
unzip-5.52-3.1ja

2011/03/30

【ゲストOSの時刻の進みが速すぎる場合の対処】

vi /etc/vmware/config
host.cpukHz = 30000000 <-- CPU 3000MHzの場合
host.noTSC = TRUE
ptsc.noTSC = TRUE

環境にもよるとおもうが、
全ての速度がすごく早くなってたゲームがあったので
Flashゲームなど高速化できるということに。

2011/03/14

【シグナルを受け取るシェルスクリプト】

$ kill -l
 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL
 5) SIGTRAP      6) SIGABRT      7) SIGBUS       8) SIGFPE
 9) SIGKILL     10) SIGUSR1     11) SIGSEGV     12) SIGUSR2
13) SIGPIPE     14) SIGALRM     15) SIGTERM     16) SIGSTKFLT
17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU
25) SIGXFSZ     26) SIGVTALRM   27) SIGPROF     28) SIGWINCH
29) SIGIO       30) SIGPWR      31) SIGSYS      34) SIGRTMIN
35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3  38) SIGRTMIN+4
39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8
43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12
47) SIGRTMIN+13 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14
51) SIGRTMAX-13 52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10
55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7  58) SIGRTMAX-6
59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2
63) SIGRTMAX-1  64) SIGRTMAX

$ vi test.sh
#!/bin/sh
trap "echo SIGNAL QUIT; SIG=QUIT;" 3
while :;
do
    if [ "x${SIG}" != "x" ]; then
        exit 3;
    fi
    sleep 1
done

$ sh test.sh &
$ ps ax|grep test.sh
 8888 pts/0    S+     0:00 sh test.sh
$ kill -QUIT 8888

2011/03/04

【エラーの出ているブロックを使用しないようにする】

エラー箇所の出力
# badblocks -vs -o hda1.bad.txt /dev/hda1

使用しないように反映
# fsck -l hda1.bad.txt /dev/hda1

2011/02/24

[ffmpeg-php install]

# http://ffmpeg-php.sourceforge.net/
# tar jxf ffmpeg-php-0.6.0.tbz2
# cd ffmpeg-php-0.6.0
# vi ffmpeg_frame.c
PIX_FMT_RGBA32 --> PIX_FMT_RGB32
# phpize
# ./configure
# make
# make install
...
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
...


# vi /usr/local/lib/php.ini
extension_dir="/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
extension=ffmpeg.so

or

# cp /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so /usr/local/lib/

[ffmpeg install]

# tar zxf ffmpeg-0.6.1.tar.gz
# cd ffmpeg-0.6.1
# export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

# ./configure --enable-shared --enable-gpl --enable-nonfree --enable-libx264 --enable-libmp3lame --enable-libfaac --enable-libfaad
# make
# make install

# vi /etc/ld.so.conf.d/ffmpeg-lib-path.conf
/usr/local/lib

# ldconfig

[h264 install]

http://www.videolan.org/developers/x264.html
# tar jxf last_x264.tar.bz2
# cd x264-snapshot-20110222-2245
# ./configure --enable-shared
# make
# make install

[gpac install]

http://gpac.wp.institut-telecom.fr/
tar zxf gpac-gpac.tar.gz
cd gpac
# ./configure
# make
# make install

[YASM Install]

http://www.tortall.net/projects/yasm/wiki/Download
# tar zxf yasm-1.1.0.tar.gz
# cd yasm-1.1.0
# ./configure
# make
# make install

[NASM Install]

http://www.nasm.us/pub/nasm/releasebuilds/
# tar jxf nasm-2.09.05.tar.bz2
# cd nasm-2.09.05
# ./configure
# make
# make install

[FAAD2/FAAC install]

http://www.audiocoding.com/downloads.html
# tar zxf faac-1.28.tar.gz
# cd faac-1.28
# ./configure
# make
# make install

# tar zxf faad2-2.7.tar.gz
# cd faad2-2.7
# ./configure
# make
# make install

[opencore-amr install]

http://sourceforge.net/projects/opencore-amr/
# tar zxf opencore-amr-0.1.2.tar.gz
# cd opencore-amr-0.1.2
# ./configure
# make
# make install

[Lame install]

http://sourceforge.net/projects/lame/files/lame/
# yum install gtk+ gtk+-devel
# tar zxf lame-3.98.4.tar.gz
# cd lame-3.98.4
# ./configure
# make
# make install

2011/02/22

【HDD取り外し時のエラー】

HDDをはずして起動させようとすると
fsck.ext3: Unable to resolve 'LABEL=/xxxxx'
とでるので、割り当てていたマウントを削除させる必要がある

メンテナンスモードでは読み込み専用になっているので
マウントしなおしてからファイルを編集

書き込み可能で最マウント
# mount -o remount,rw /

対象の行を削除
# vi /etc/fstab

【yum の高速化】

# yum -y install yum-fastestmirror

2011/02/20

【高速なブラウザ?】

PCスペック依存で快適な環境

1.RAMディスクを作成
 http://www10.atwiki.jp/gavotterd/
 http://www.iodata.jp/promo/soft/ram/ramphantom.htm
 などを使用してRAMドライブを作成する

 設定例)RAMドライブ:R:\\

2.Google Chrome PortableをRAMディスクにインストール
 http://portableapps.com/apps/internet/google_chrome_portable

 設定例)インストール先 R:\GoogleChromePortable\

3.Chromeの設定
 ショートカットを作成してプロパティを開き、キャッシュオプションを付け加える

 設定例)
  リンク先:R:\GoogleChromePortable\GoogleChromePortable.exe --disk-cache-dir="R:\ChromePortableCache"
  作業フォルダ:R:\GoogleChromePortable

4.最後に
・再起動するたびにRAMドライブに入っているものは消えてしまうのでフォルダを別のドライブにバックアップ
・フォルダをR:\GoogleChromePortable2、R:\GoogleChromePortable3などとコピーしてリンク先などを変更でブラウザゲームなど多重起動可能に。