/ 雑記帳

rpm を使いこなす道具_3

一つのディレクトリーにソースと成果をまとめられる。
#!/bin/sh

echo "-----------------------------------"
ls *.src.rpm
echo "-----------------------------------"
echo ""
echo "Build file_name"
echo ""
read file1
echo ""
##########
echo "rpm 格納 Dir name?"
echo ""
read dir1
mkdir $dir1
##########
echo ""
#rpmbuild --rebuild --ba $file1 | tee build.log
rpmbuild --rebuild --ba --define="__check_files %{nil}" $file1 | tee build.log
echo "-----------------------------------"
#######echo "sakura" | sed -e "s|sakura|$HOME|"
plce=`pwd`
echo "$plce"
echo ""
grep "書き込み完了" build.log | ¥
sed 's/書き込み完了:/mv /g' | ¥
sed "s|$| $plce|g" | ¥
sed "s|$|¥/|g" | ¥
sed "s|$|$dir1|g" | ¥
sed "s|$|¥/|g" > move_rpm.sh
echo "-----------------------------------"
cat move_rpm.sh
echo "-----------------------------------"
chmod +x move_rpm.sh
./move_rpm.sh
mv $file1 $dir1/
echo "-----------------------------------"
ls -lrt $dir1/
echo "-----------------------------------"

— posted by くま at 08:29 am   pingTrackBack [0]

 

rpm を使いこなす道具_2

# vi .bashrc
       
----省略----
alias rrb='rpmbuild --rebuild'
alias pacoinstall='paco -lD make install'
alias yump='yum provides'
alias yumie=' yum install --enablerepo'
alias yumue=' yum update --enablerepo'

— posted by くま at 08:21 am   pingTrackBack [0]

 

rpm を使いこなす道具_1

このスクリプトを使うとインストールしたパッケージを検索し易い。
       
#!/bin/csh

set list1=$PWD/centos`uname -r`-`date +%Y-%m-%d`.lst
#
if ( -e $list1 ) then
echo "リストが存在、続行します。"
else
case2:
echo "####################"
echo "# リスト作成中.... #"
echo "####################"
rpm -qa --last > $list1
endif
echo ""
#
case1:
echo ""
echo "このリストで良いですか?"
echo "*************************************************"
head $list1
echo "*************************************************"
echo ""
echo "y or n ?"
set yn = $<
if ( "$yn" == n ) then
rm -i $list1
goto case2
else
#exit
#endif
echo ""
echo "What rpm-Packege-name Key-Word"
echo ""
set key = $<
echo ""
echo "*************************************************"
grep $key $list1 | sort
echo "**************************************************"
echo ""
#
echo ""
echo "続けますか?"
echo "y or n ?"
set yn = $<
if ( "$yn" == y ) then
goto case1
else
exit
endif

— posted by くま at 08:14 am   pingTrackBack [0]

レジューム付きでコピー

rsync -av -e ssh --progress --partial --append 226.48.255.251:/home/hoge/linux.ova ./

— posted by くま at 09:52 pm   pingTrackBack [0]

 

これが再現できない...

https://www.youtube.com/watch?v=ainjV3X6wqQ

— posted by くま at 02:30 pm   pingTrackBack [0]

 

CentOS6 ハードディスク UUID 確認

# rpm -ivh vol_id-085-30.10.i586.rpm
準備中... ########################################### [100%]
1:vol_id ########################################### [100%]
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb2 76625608 8870644 63862852 13% /
tmpfs 969012 240 968772 1% /dev/shm
/dev/sdb1 297485 62847 219278 23% /boot
/dev/sda1 480720592 151285628 305015688 34% /var/video
/dev/sr0 210640 210640 0 100% /media/virt-p2v-0.9.9
# vol_id
usage: vol_id [--export|-t|-l|-u]
--export
-t filesystem type
-l filesystem label
-u filesystem uuid
    
# vol_id /dev/sdb2
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=4868943e-52ed-4449-a15b-d890768a7499
ID_FS_LABEL=
ID_FS_LABEL_SAFE=

— posted by くま at 02:05 pm   pingTrackBack [0]

CentOS6.5

このサーバーをCentOS6.5へ

desktop



— posted by くま at 07:46 am   pingTrackBack [0]

 

/etc/crontab うまく動作しないのでいじってみた

# yum -y install cronie-noanacron
# yum -y remove cronie-anacron
# vi /etc/crontab
     
# run-parts
01 * * * * root run-parts /etc/cron.hourly
42 7 * * * root run-parts /etc/cron.daily
44 7 * * 0 root run-parts /etc/cron.weekly
45 7 1 * * root run-parts /etc/cron.monthly
25 22 * * * root /root/clamav.sh
     
$ cat /etc/cron.d/dailyjobs
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
     
# run-parts
25 7 * * * root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily
05 6 * * 0 root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.weekly
20 6 1 * * root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.monthl
     
参考:http://t0463.blogspot.jp/2013/03/centos60crontab.html

— posted by くま at 07:34 am   pingTrackBack [0]

CentOS6.5 i386 java Chrome

cd /opt/chromium-browser/plugins
ln -s /usr/java/jre1.7.0_51/lib/i386/libnpjp2.so

— posted by くま at 09:25 pm   pingTrackBack [0]

 

PS3 Media server 起動アイコン

gnome-terminal --working-directory=/home/kkuma -e "sudo /usr/local/bin/pms-1.90.1/PMS.sh"

— posted by くま at 04:54 pm   pingTrackBack [0]

<< 2024.11 >>
SMTWTFS
     12
3456789
10111213141516
1718 1920212223
2425262728 2930
 
























T: Y: ALL: Online:
ThemePanel
Created in 0.0450 sec.