|
|
| TopPage > Linuxいろいろ(SW編) > Linuxいろいろ(SW編1) |
[hogeuser]# rpm -ivh apt-0.5.5cnc6-fr0.rh80.1.i386.rpm [警告].....(このバージョンをインストールしたら警告でたけど無視) ##############(100%) ##############(100%) |
# Red Hat Linux 9 #rpm http://ayo.freshrpms.net redhat/9/i386 os updates freshrpms #rpm-src http://ayo.freshrpms.net redhat/9/i386 os updates freshrpms # Red Hat Linux 8.0 RedHat公式のrpmのみ欲しい場合はfreshrpmsの文字を削除する。↓ rpm http://ayo.freshrpms.net redhat/8.0/i386 os updates freshrpms ↓ソースも欲しい場合は、コメントをはずす。 #rpm-src http://ayo.freshrpms.net redhat/8.0/i386 os updates freshrpms # Red Hat Linux 7.3 #rpm http://ayo.freshrpms.net redhat/7.3/i386 os updates freshrpms #rpm-src http://ayo.freshrpms.net redhat/7.3/i386 os updates freshrpms |
APT{
Clean-Installed "false";
Get {
Assume-Yes "false";
Download-Only "false";
Show-Upgraded "true";
Fix-Broken "false";
Ignore-Missing "false";
Compile "false";
};
};
Acquire {
Retries "0";
Http {
プロキシを使う場合に記述↓
Proxy ""; // http://user:pass@host:port/
}
};
RPM {
Ignore { };
もしUpdateを行ないたくないパッケージがあればHold { }の中に""でくくって記述。
Hold { };
Allow-Duplicated { "^kernel$"; "^kernel-"; "^kmodule-"; "^gpg-pubkey$" };
Options { };
Install-Options "";
Erase-Options "";
Source {
Build-Command "rpmbuild --rebuild";
};
};
|
[hogeuser]# apt-get update 。。。。。。。。。。。。。 |
[hogeuser]# apt-cache search xxxx (xxxxのところにパッケジ名を入力) 。。。。。。。。。。。。。 |
[hogeuser]# apt-cache search --names-only xxxx (xxxxのところにパッケジ名を入力) 。。。。。。。。。。。。。 |
[hogeuser]# apt-cache show xxxx (xxxxのところにパッケジ名を入力) 。。。。。。。。。。。。。 |
[hogeuser]# apt-get install xxxx (xxxxのところにパッケジ名を入力) 。。。。。。。。。。。。。 |
[hogeuser]# apt-get remove xxxx (xxxxのところにパッケジ名を入力) 。。。。。。。。。。。。。 |
[hogeuser]# apt-get remove --purge xxxx (xxxxのところにパッケジ名を入力) 。。。。。。。。。。。。。 |
[hogeuser]# apt-get upgrade 。。。。。。。。。。。。。(Y/n) |
[hogeuser]# rpm --import /usr/share/doc/centos-release-4/RPM-GPG-KEY |
[hogeuser]# rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt |
[dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag gpgcheck=1 |
commands & parameters |
note |
| check-update | 現在のupdateできるパッケージの取得 |
| update | 対象(check-updateで表示される)となる全パッケージのupdate |
| update hogehoge | 対象(check-updateで表示される)パッケージの中でhogehogeのみupdate |
| list installed | yumでinstallしたパッケージの一覧表示 |
| list available | yumで使用可能な全てのパッケージの一覧表示 |
| list | yumで使用可能なパッケージと既にinstallしたパッケージ全ての一覧表示 |
| search hogehoge | hogehoge文字列を検索。パッケージDescription内も合わせてhogehogeという文字列を検索する。 |
| info hoge.package | hoge.packageというパッケージの詳細説明表示 |
| install hoge.package | hoge.packageのinstall |
| remove hoge.package | hoge.packageパッケージの削除。commandはeraseでも同じである。 |
| clean (all) | cacheディレクトリに置いてあるダウンロードしたパッケージ全てとheaders全ての削除。 |
Another app is currently holding the yum lock; waiting for it to exit... The other application is: PackageKit ...... |
[hogeuser]# ps aux | grep yum
root pid xx xx xxxx xx x x
x:x 0:00 xxxxxxxx /usr/share/PackageKit/helpers/yum/yumBackend.py get-updates none
|
[hogeuser]# kill pid |
[hogeuser]# /sbin/chkconfig --level 2345 yum-updatesd off |
[hogeuser]# yum search AAAAAA* |
[hogeuser]# yum info R-* |
[hogeuser]# rpmbuild --rebuild xxx.src.rpm |
........
if [ -x /sbin/dhcpcd ] && /sbin/dhcpcd ${DHCPCDARGS} ${DEVICE} -t 20 ;
......
|
| 内容 | 値 | |
| 第1フィールド | minute | 0-59 (設定しない場合は*) |
| 第2フィールド | hour | 0-23 (設定しない場合は*) |
| 第3フィールド | day | 0-31 (設定しない場合は*) |
| 第4フィールド | month | 1-12 (設定しない場合は*) |
| 第5フィールド | week | 0-7[0:Sunday,1:Monday,...,7:Sunday] (設定しない場合は*) |
| 第6フィールド | user | user name (必須ではない) |
| 第7フィールド | service | サービス名(スクリプト名) |
|
| 内容 | 値 | |
| 第1フィールド | period | コマンドの実行頻度(日単位) |
| 第2フィールド | | 遅延時間(分単位) |
|
| 第3フィールド | job-identifier | タスクの説明(空白以外の任意の文字) |
| 第4フィールド | command | 実行するコマンド |
| at関係のcommand | 内容 |
| at now | すぐにatで設定したスクリプトを実行する |
| at now + [time] | 設定したときから[time]時間後に設定したスクリプトを実行する [time]=xx minutes/hours/days |
| at noon | 設定した日の正午12時に設定したスクリプトを実行する |
| at [time] | 設定した時間から見て指定時間[time]になったら設定したスクリプトを実行する [time]=HH:MMam/pm (HHは、時間。MMは、分を示す) |
| atq | atで設定したjobの一覧を表示する。 rootで実行すると全てのユーザの未実行jobが表示される |
| atrm | atqで表示されたjob番号を指定(同時に複数指定可)して実行すると、そのjobが削除される |
[hogeuser]$ at 22:06
at>/home/hoge_user/wawa.sh
(CTL+D)
at>
|
[hogeuser]$ atq zz at 2005-xx-xx 22:06 a hoge_user [hogeuser]$ |
[hogeuser]$ atr zz (xxは、atqで表示されたjobの番号) |
| at関係のcommand | 内容 |
| at now | すぐにatで設定したスクリプトを実行する |
| at now + [time] | 設定したときから[time]時間後に設定したスクリプトを実行する [time]=xx minutes/hours/days |
| at noon | 設定した日の正午12時に設定したスクリプトを実行する |
| at [time] | 設定した時間から見て指定時間[time]になったら設定したスクリプトを実行する [time]=HH:MMam/pm (HHは、時間。MMは、分を示す) |
| atq | atで設定したjobの一覧を表示する。 rootで実行すると全てのユーザの未実行jobが表示される |
| atrm | atqで表示されたjob番号を指定(同時に複数指定可)して実行すると、そのjobが削除される |
[hogeuser]$ at 22:06
at>/home/hoge_user/wawa.sh
(CTL+D)
at>
|
[hogeuser]$ atq zz at 2005-xx-xx 22:06 a hoge_user [hogeuser]$ |
[hogeuser]$ atr zz (xxは、atqで表示されたjobの番号) |
まず自分のアカウントの内容を確認 [hoge]$ id uid=567(hoge) gid=567(hoge) 所属グループ=567(hoge),14(uucp),18(dialout),54(lock)...... gid=567(hoge)であることより現在のプライマリグループが567(hoge)であることがわかる で、プライマリグループをdialoutに変更したい場合 [hoge]$ newgrp dialout 結果を確認 [hoge]$ id uid=567(hoge) gid=18(dialout) 所属グループ=567(hoge),14(uucp),18(dialout),54(lock)...... 確認すればわかるが、この変更はこのコマンドを実行したターミナルの中のみ有効で他のターミナルには反映されていない また、実行ターミナルでもexitすれば元のプライマリグループに戻る。 |
| TopPage > Linuxいろいろ(SW編) > Linuxいろいろ(SW編1) |