Cent_CUPS
の編集
index.php?Cent_CUPS
[
トップ
] [
編集
|
差分
|
履歴
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
(no template pages)
#contents() *** CPUS パッケージの確認 [#mf42d353] - Cent OS インストール時に CPUS 関係のプログラムが初期導入されていることを確認 [root@spirit ~]# yum list cups Setting up repositories Reading repository metadata in from local files Excluding Packages in global exclude list Finished Installed Packages cups.i386 1:1.1.22-0.rc1.9.10 installed *** &ref(cupsd.conf,center,環境設定ファイル); (/etc/cpus/cupsd.conf) の編集 [#be18ee50] - ローカルネット内からの設定、プリンター利用の許可 (snip) <Location /> Order Deny,Allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1.0/24 <---- ローカルネットを指定 (snip) ## Restrict access to local domain Order Deny,Allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1.0/24 <---- ローカルネットを指定 (snip) Browsing On BrowseProtocols cups BrowseOrder Deny,Allow BrowseAllow from @LOCAL Listen 127.0.0.1:631 Listen 192.168.1.22:631 <------ プリントサーバーの IPアドレスを追加指定 *** &ref(mime.types,center,環境設定ファイル); (/etc/cpus/mime.types) の編集 [#iea2cd7f] - RAW Printer の有効化 (Windows 側のドライバーで Binary を作成するモード) - 下記の部分の先頭のコメントを削除して octed-stream (無編集のバイナリーデーター受信)を有功化 application/octet-stream *** &ref(mime.convs,center,環境設定ファイル); (/etc/cpus/mime.convs) の編集 [#t7e2f09d] - RAW Printer の有効化 (Windows 側のドライバーで Binary を作成するモード) - 下記の部分の先頭のコメントを削除して octed-stream (無編集のバイナリーデーター受信)を有功化 pplication/octet-stream application/vnd.cups-raw 0 - *** CUPS の起動設定 [#g490b8ea] - service で CUPS を機動する [root@spirit ~]# service cups start cups を起動中: [ OK ] - システム起動時に CUPS が自動起動するように設定する [root@spirit ~]# chkconfig cups on [root@spirit ~]# chkconfig --list cups cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off *** Printer の接続 (自動認識) [#eb5e19ee] - CUPS が機動された状態で USB で HP Deskjet 895cxi を接続して再起動する - kundz が自動検出してドライバーのインストールとローカルプリンター(Linux マシンでの印刷に利用する)が登録された *** CUPS 環境設定 [#h2cca211] - Browser から [[環境設定プログラム >http://spirit.hmuna.com:631]] の起動確認~ &ref(win_pri_0.JPG); ~~ - [Do Administration Tasks] を選択し、サーバーの root ユーザーアカウントでログイン~ &ref(win_pri_02.JPG); ~~ - [Add Printer] を選択して Printer を追加する~ &ref(win_pri_03.jpg); ~~ - ネットワークから利用するプリンターを設定する~ &ref(win_pri_04.JPG); -- Name = プリンター識別名(重要) -- Location = 任意 (サーバーの場所が判る内容) -- Description = 任意 (プリンターの説明) ~ - Printer の定義を確認 - CENT OS が自動認識したプリンターもリストアップされている → Linux ではこちらを利用する~ &ref(win_pri_01.JPG); *** Windows 側の設定 [#kc1f72ee] - [コントロールパネル] → [プリンターその他のハードウエア] → [プリンターを追加する]~ &ref(win_pri_1.JPG); ~~ - 3番目のネットワークプリンターを選択~ &ref(win_pri_2.JPG); ~~ - ネットワークアドレスに &color(red){http://spirit.hmuna.com:631/printers/895cxi}; を指定する - 最後の 895cxi は上記の CPUS の Printer 追加時に RAW Printer に設定した名前である~ &ref(win_pri_3.JPG); ~~ - Windows のプリンタードライバーをインストールする~ &ref(win_pri_4.JPG); ~~ *** Redhat EL4 (= Cent 4.x)固有の環境自動設定について ← 下記 [傷害解析]の結果 [#q85a33ae] - プリンター情報の設定方法 ( [[Redhat EL4 System Administration Guide:http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-printing-save-config.html]] より) When the printer configuration is saved using the Printer Configuration Tool, the application creates~ its own configuration file that is used to create the files in the /etc/cups/ directory. ~ You can use the command line options to save or restore the Printer Configuration Tool file. ~ &color(red){If the /etc/cups/ directory is saved and restored to the same locations, the printer configuration~ is not restored because each time the printer daemon is restarted, it creates a new /etc/printcap~ file from the Printer Configuration Tool configuration file.}; When creating a backup of the system's~ configuration files, use the following method to save the printer configuration files.~ To save your printer configuration, type this command as root: /usr/sbin/system-config-printer-tui --Xexport > settings.xml Your configuration is saved to the file settings.xml.~ If this file is saved, it can be used to restore the printer settings. This is useful~ if the printer configuration is deleted, if Red Hat Enterprise Linux is reinstalled, ~ or if the same printer configuration is needed on multiple systems. ~ The file should be saved on a different system before reinstalling. ~ To restore the configuration, type this command as root: /usr/sbin/system-config-printer-tui --Ximport < settings.xml - 変更前の /etc/cups [root@spirit cups]# ls -tl 合計 136 drwx--x--x 2 root sys 4096 6月 22 22:25 certs -rw-r--r-- 1 root root 5924 6月 22 21:57 mime.types -rw-r----- 1 root sys 22280 6月 22 21:56 cupsd.conf -rw-r--r-- 1 root root 112 6月 22 21:56 lpoptions drwxr-xr-x 2 root sys 4096 6月 22 21:56 ppd -rw-r----- 1 root sys 592 6月 22 21:56 printers.conf -rw-r--r-- 1 root root 5924 6月 22 21:56 mime.types_munabackup -rw-r--r-- 1 root root 22280 5月 23 16:20 cupsd.conf.save -rw-r--r-- 1 root root 5924 5月 23 08:10 mime.types_muna -rw-r--r-- 1 root root 4586 5月 22 08:47 mime.convs -rw-r--r-- 1 root root 9840 5月 12 22:33 ppds.dat -rw-r--r-- 1 root root 947 1月 12 03:50 pstoraster.convs -rw-r----- 1 root sys 2421 1月 12 03:50 classes.conf -rw-r--r-- 1 root root 2333 1月 12 03:50 client.conf drwxr-xr-x 2 root root 4096 1月 12 03:50 interfaces - system-config-printer-tui の実行 (とりあえず /etc/cups でやってみる) [root@spirit cups]# /usr/sbin/system-config-printer-tui --Xexport > settings.xml - 確かに settings.xml は出来た.....が、 raw printer の設定が見あたらない [root@spirit cups]# ls -tl 合計 140 -rw-r--r-- 1 root root 2872 6月 22 22:38 settings.xml drwx--x--x 2 root sys 4096 6月 22 22:35 certs -rw-r--r-- 1 root root 5924 6月 22 21:57 mime.types -rw-r----- 1 root sys 22280 6月 22 21:56 cupsd.conf ( snip ) - 再起動してみたが、予想通り raw printer の設定は無効になっている *** Redhat 版の cups の削除 [#udfdfbcf] - 既存の Redhat 版 cups の uninstall ( yum remove ) [root@spirit cups-1.3svn-r5675]# yum remove cups Setting up Remove Process Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package cups.i386 1:1.1.22-0.rc1.9.10 set to be erased --> Running transaction check Setting up repositories update 100% |=========================| 951 B 00:00 addons 100% |=========================| 951 B 00:00 Reading repository metadata in from local files Excluding Packages in global exclude list Finished Excluding Packages in global exclude list Finished --> Processing Dependency: cups for package: libgnomecups --> Processing Dependency: /usr/bin/lp for package: redhat-lsb --> Processing Dependency: cups for package: desktop-printing --> Processing Dependency: /usr/bin/lpr for package: redhat-lsb --> Processing Dependency: cups for package: hal-cups-utils --> Processing Dependency: cups >= 1.1.17-4 for package: system-config-printer --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package system-config-printer.i386 0:0.6.116.5-1 set to be erased ---> Package libgnomecups.i386 0:0.1.12-5 set to be erased ---> Package hal-cups-utils.i386 0:0.5.2-8 set to be erased ---> Package redhat-lsb.i386 0:3.0-8.EL set to be erased ---> Package desktop-printing.i386 0:0.17-3.EL.1 set to be erased --> Running transaction check --> Processing Dependency: libgnomecups-1.0.so.1 for package: libgnomeprint22 --> Processing Dependency: libgnomecups >= 0.1.11-2 for package: libgnomeprint22 --> Processing Dependency: system-config-printer = 0.6.116.5-1 for package: system-config-printer-gui --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package libgnomeprint22.i386 0:2.8.0-3 set to be erased ---> Package system-config-printer-gui.i386 0:0.6.116.5-1 set to be erased --> Running transaction check --> Processing Dependency: libgnomeprint-2-2.so.0 for package: gedit --> Processing Dependency: libgnomeprint-2-2.so.0 for package: libgal2 --> Processing Dependency: libgnomeprint-2-2.so.0 for package: gtkhtml3 --> Processing Dependency: libgnomeprint-2-2.so.0 for package: libgnomeprintui22 --> Processing Dependency: libgnomeprint-2-2.so.0 for package: gthumb --> Processing Dependency: libgnomeprint-2-2.so.0 for package: gtksourceview --> Processing Dependency: libgnomeprint22 >= 2.7.1 for package: gtkhtml3 --> Processing Dependency: libgnomeprint-2-2.so.0 for package: gpdf --> Processing Dependency: libgnomeprint22 for package: gpdf --> Processing Dependency: libgnomeprint-2-2.so.0 for package: librsvg2 --> Processing Dependency: libgnomeprint22 >= 2.8.0 for package: libgnomeprintui22 --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package gtksourceview.i386 0:1.1.0-4 set to be erased ---> Package librsvg2.i386 0:2.8.1-1.el4.1 set to be erased ---> Package libgnomeprintui22.i386 0:2.8.0-1 set to be erased ---> Package libgal2.i386 2:2.2.3-10 set to be erased ---> Package gtkhtml3.i386 0:3.3.2-6.EL set to be erased ---> Package gthumb.i386 0:2.4.2-7 set to be erased ---> Package gpdf.i386 0:2.8.2-7.4 set to be erased ---> Package gedit.i386 1:2.8.1-4 set to be erased --> Running transaction check --> Processing Dependency: librsvg-2.so.2 for package: gdm --> Processing Dependency: librsvg2 = 2.8.1-1.el4.1 for package: librsvg2-devel --> Processing Dependency: librsvg2 >= 0:2.0.1 for package: gdm --> Processing Dependency: gthumb for package: gnome-volume-manager --> Processing Dependency: librsvg2 >= 2.0.1 for package: eel2 --> Processing Dependency: librsvg-2.so.2 for package: nautilus --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package librsvg2-devel.i386 0:2.8.1-1.el4.1 set to be erased ---> Package gdm.i386 1:2.6.0.5-7.rhel4.12 set to be erased ---> Package eel2.i386 0:2.8.1-2 set to be erased ---> Package nautilus.i386 0:2.8.1-4 set to be erased ---> Package gnome-volume-manager.i386 0:1.1.0-5 set to be erased --> Running transaction check --> Processing Dependency: libnautilus.so.2 for package: control-center --> Processing Dependency: libnautilus-extension.so.1 for package: nautilus-cd-burner --> Processing Dependency: libeel-2.so.2 for package: nautilus-cd-burner --> Processing Dependency: gnome-volume-manager for package: gnome-session --> Processing Dependency: librsvg2-devel >= 2.0.1 for package: eel2-devel --> Processing Dependency: libeel-2.so.2 for package: control-center --> Processing Dependency: libeel-2.so.2 for package: eog --> Processing Dependency: libeel-2.so.2 for package: nautilus-media --> Processing Dependency: eel2 = 2.8.1 for package: eel2-devel --> Processing Dependency: libnautilus.so.2 for package: nautilus-media --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package control-center.i386 1:2.8.0-12.rhel4.2 set to be erased ---> Package gnome-session.i386 0:2.8.0-5.centos4 set to be erased ---> Package nautilus-media.i386 0:0.8.1-3 set to be erased ---> Package eel2-devel.i386 0:2.8.1-2 set to be erased ---> Package eog.i386 0:2.8.1-2 set to be erased ---> Package nautilus-cd-burner.i386 0:2.8.3-6 set to be erased --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Removing: cups i386 1:1.1.22-0.rc1.9.10 installed 3.8 M Removing for dependencies: control-center i386 1:2.8.0-12.rhel4.2 installed 6.7 M desktop-printing i386 0.17-3.EL.1 installed 240 k eel2 i386 2.8.1-2 installed 1.1 M eel2-devel i386 2.8.1-2 installed 223 k eog i386 2.8.1-2 installed 1.6 M gdm i386 1:2.6.0.5-7.rhel4.12 installed 7.6 M gedit i386 1:2.8.1-4 installed 7.0 M gnome-session i386 2.8.0-5.centos4 installed 1.1 M gnome-volume-manager i386 1.1.0-5 installed 567 k gpdf i386 2.8.2-7.4 installed 2.1 M gthumb i386 2.4.2-7 installed 4.3 M gtkhtml3 i386 3.3.2-6.EL installed 2.8 M gtksourceview i386 1.1.0-4 installed 837 k hal-cups-utils i386 0.5.2-8 installed 94 k libgal2 i386 2:2.2.3-10 installed 2.1 M libgnomecups i386 0.1.12-5 installed 199 k libgnomeprint22 i386 2.8.0-3 installed 1.1 M libgnomeprintui22 i386 2.8.0-1 installed 830 k librsvg2 i386 2.8.1-1.el4.1 installed 350 k librsvg2-devel i386 2.8.1-1.el4.1 installed 222 k nautilus i386 2.8.1-4 installed 12 M nautilus-cd-burner i386 2.8.3-6 installed 733 k nautilus-media i386 0.8.1-3 installed 565 k redhat-lsb i386 3.0-8.EL installed 21 k system-config-printer i386 0.6.116.5-1 installed 2.4 M system-config-printer-gui i386 0.6.116.5-1 installed 439 k Transaction Summary ============================================================================= Install 0 Package(s) Update 0 Package(s) Remove 27 Package(s) Total download size: 0 Is this ok [y/N]: - 印刷が出来なくても使いたいもの (gedit など)が削除されるのは関心しないので このまま実行するのは悩ましいが、とりあえずこの画面が残っていれば復活はできる。 - えぃ! 一端削除してみよう Is this ok [y/N]: y Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Removing : libgnomecups ####################### [ 1/27] Removing : gdm ####################### [ 2/27] warning: /etc/alchemist/namespace/printconf/local.adl saved as /etc/alchemist/namespace/printconf/local.adl.rpmsave Removing : system-config-printer ####################### [ 3/27] Removing : librsvg2-devel ####################### [ 4/27] Removing : nautilus ####################### [ 5/27] Removing : gthumb ####################### [ 6/27] Removing : gtksourceview ####################### [ 7/27] Removing : eel2 ####################### [ 8/27] Removing : control-center ####################### [ 9/27] Removing : gpdf ####################### [10/27] Removing : gnome-session ####################### [11/27] Removing : hal-cups-utils ####################### [12/27] Removing : libgnomeprintui22 ####################### [13/27] Removing : libgnomeprint22 ####################### [14/27] Removing : nautilus-media ####################### [15/27] Removing : eel2-devel ####################### [16/27] Removing : gtkhtml3 ####################### [17/27] Removing : libgal2 ####################### [18/27] Removing : eog ####################### [19/27] Removing : librsvg2 ####################### [20/27] warning: /etc/xinetd.d/cups-lpd saved as /etc/xinetd.d/cups-lpd.rpmsave Removing : cups ####################### [21/27] Removing : gedit ####################### [22/27] Removing : system-config-printer-gui ####################### [23/27] Removing : redhat-lsb ####################### [24/27] Removing : gnome-volume-manager ####################### [25/27] Removing : nautilus-cd-burner ####################### [26/27] Removing : desktop-printing ####################### [27/27] Removed: cups.i386 1:1.1.22-0.rc1.9.10 Dependency Removed: control-center.i386 1:2.8.0-12.rhel4.2 desktop-printing.i386 0:0.17-3.EL.1 eel2.i386 0:2.8.1-2eel2-devel.i386 0:2.8.1-2 eog.i386 0:2.8.1-2 gdm.i386 1:2.6.0.5-7.rhel4.12 gedit.i386 1:2.8.1-4 gnome-session.i386 0:2.8.0-5.centos4 gnome-volume-manager.i386 0:1.1.0-5 gpdf.i386 0:2.8.2-7.4 gthumb.i386 0:2.4.2-7 gtkhtml3.i386 0:3.3.2-6.EL gtksourceview.i386 0:1.1.0-4 hal-cups-utils.i386 0:0.5.2-8 libgal2.i386 2:2.2.3-10 libgnomecups.i386 0:0.1.12-5 libgnomeprint22.i386 0:2.8.0-3 libgnomeprintui22.i386 0:2.8.0-1 librsvg2.i386 0:2.8.1-1.el4.1 librsvg2-devel.i386 0:2.8.1-1.el4.1 nautilus.i386 0:2.8.1-4 nautilus-cd-burner.i386 0:2.8.3-6 nautilus-media.i386 0:0.8.1-3 redhat-lsb.i386 0:3.0-8.EL system-config-printer.i386 0:0.6.116.5-1 system-config-printer-gui.i386 0:0.6.116.5-1 Complete! - 恐れをなして nautilus は再インストール -&color(red){しかし、ここで cups が必須といわれると何をやっているんだか..... 後で cups は上書きしてしまうが}; [root@spirit cups-1.3svn-r5675]# yum install nautilus Setting up Install Process Setting up repositories Reading repository metadata in from local files Excluding Packages in global exclude list Finished Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package nautilus.i386 0:2.8.1-4 set to be updated --> Running transaction check --> Processing Dependency: eog >= 1.0.0 for package: nautilus --> Processing Dependency: libeel-2.so.2 for package: nautilus --> Processing Dependency: librsvg-2.so.2 for package: nautilus --> Processing Dependency: eel2 >= 2.7.92 for package: nautilus --> Processing Dependency: nautilus-cd-burner for package: nautilus --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package librsvg2.i386 0:2.8.1-1.el4.1 set to be updated ---> Package eog.i386 0:2.8.1-2 set to be updated ---> Package nautilus-cd-burner.i386 0:2.8.3-6 set to be updated ---> Package eel2.i386 0:2.8.1-2 set to be updated --> Running transaction check --> Processing Dependency: libgnomeprint-2-2.so.0 for package: librsvg2 --> Processing Dependency: libgnomeprintui-2-2.so.0 for package: librsvg2 --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package libgnomeprint22.i386 0:2.8.0-3 set to be updated ---> Package libgnomeprintui22.i386 0:2.8.0-1 set to be updated --> Running transaction check --> Processing Dependency: libgnomecups-1.0.so.1 for package: libgnomeprint22 --> Processing Dependency: libgnomecups >= 0.1.11-2 for package: libgnomeprint22 --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package libgnomecups.i386 0:0.1.12-5 set to be updated --> Running transaction check --> Processing Dependency: cups for package: libgnomecups --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package cups.i386 1:1.1.22-0.rc1.9.10 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: nautilus i386 2.8.1-4 base 4.1 M Installing for dependencies: cups i386 1:1.1.22-0.rc1.9.10 base 1.5 M eel2 i386 2.8.1-2 base 363 k eog i386 2.8.1-2 base 592 k libgnomecups i386 0.1.12-5 base 64 k libgnomeprint22 i386 2.8.0-3 base 326 k libgnomeprintui22 i386 2.8.0-1 base 245 k librsvg2 i386 2.8.1-1.el4.1 base 143 k nautilus-cd-burner i386 2.8.3-6 base 212 k Transaction Summary ============================================================================= Install 9 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 7.5 M Is this ok [y/N]: Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: cups ######################### [1/9] Installing: libgnomecups ######################### [2/9] Installing: libgnomeprint22 ######################### [3/9] Installing: libgnomeprintui22 ######################### [4/9] Installing: librsvg2 ######################### [5/9] Installing: eel2 ######################### [6/9] Installing: eog ######################### [7/9] Installing: nautilus-cd-burner ######################### [8/9] Installing: nautilus ######################### [9/9] Installed: nautilus.i386 0:2.8.1-4 Dependency Installed: cups.i386 1:1.1.22-0.rc1.9.10 eel2.i386 0:2.8.1-2 eog.i386 0:2.8.1-2 libgnomecups.i386 0:0.1.12-5 libgnomeprint22.i386 0:2.8.0-3 libgnomeprintui22.i386 0:2.8.0-1 librsvg2.i386 0:2.8.1-1.el4.1 nautilus-cd-burner.i386 0:2.8.3-6 Complete! - gedit もインストールしておこう [root@spirit cups-1.3svn-r5675]# yum install gedit Setting up Install Process Setting up repositories Reading repository metadata in from local files Excluding Packages in global exclude list Finished Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package gedit.i386 1:2.8.1-4 set to be updated --> Running transaction check --> Processing Dependency: gtksourceview >= 1.1 for package: gedit --> Processing Dependency: libgtksourceview-1.0.so.0 for package: gedit --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package gtksourceview.i386 0:1.1.0-4 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: gedit i386 1:2.8.1-4 base 2.2 M Installing for dependencies: gtksourceview i386 1.1.0-4 base 245 k Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 2.4 M Is this ok [y/N]: y Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: gtksourceview ######################### [1/2] Installing: gedit ######################### [2/2] Installed: gedit.i386 1:2.8.1-4 Dependency Installed: gtksourceview.i386 0:1.1.0-4 Complete! *** 最新版の cups を ソースから ビルド [#fce14a35] [root@spirit Downloads]# ls -l cups-1.3svn-r5675-source.tar.gz -rw-r--r-- 1 root root 4026753 6月 22 23:08 cups-1.3svn-r5675-source.tar.gz [root@spirit Downloads]# tar xzvf cups-1.3svn-r5675-source.tar.gz [root@spirit Downloads]# cd cups-1.3svn-r5675 [root@spirit cups-1.3svn-r5675]# ./configure [root@spirit cups-1.3svn-r5675]# make [root@spirit cups-1.3svn-r5675]# make install Installing in cups... Installing in backend... Installing in berkeley... Installing in cgi-bin... Installing in filter... Installing in locale... Installing in man... Converting man pages to HTML... cancel.1.gz... cups-config.1.gz... cupstestdsc.1.gz... cupstestppd.1.gz... lp.1.gz... lpoptions.1.gz... lppasswd.1.gz... lpq.1.gz... lprm.1.gz... lpr.1.gz... lpstat.1.gz... classes.conf.5.gz... client.conf.5.gz... cups-snmp.conf.5.gz... cupsd.conf.5.gz... mime.convs.5.gz... mime.types.5.gz... printers.conf.5.gz... subscriptions.conf.5.gz... backend.7.gz... filter.7.gz... accept.8.gz... cupsaddsmb.8.gz... cups-deviced.8.gz... cups-driverd.8.gz... cups-lpd.8.gz... cups-polld.8.gz... cupsd.8.gz... cupsenable.8.gz... lpadmin.8.gz... lpinfo.8.gz... lpmove.8.gz... lpc.8.gz... Installing cancel.1.gz in /usr/share/man/man1... Installing cups-config.1.gz in /usr/share/man/man1... Installing cupstestdsc.1.gz in /usr/share/man/man1... Installing cupstestppd.1.gz in /usr/share/man/man1... Installing lp.1.gz in /usr/share/man/man1... Installing lpoptions.1.gz in /usr/share/man/man1... Installing lppasswd.1.gz in /usr/share/man/man1... Installing lpq.1.gz in /usr/share/man/man1... Installing lprm.1.gz in /usr/share/man/man1... Installing lpr.1.gz in /usr/share/man/man1... Installing lpstat.1.gz in /usr/share/man/man1... Installing classes.conf.5.gz in /usr/share/man/man5... Installing client.conf.5.gz in /usr/share/man/man5... Installing cups-snmp.conf.5.gz in /usr/share/man/man5... Installing cupsd.conf.5.gz in /usr/share/man/man5... Installing mime.convs.5.gz in /usr/share/man/man5... Installing mime.types.5.gz in /usr/share/man/man5... Installing printers.conf.5.gz in /usr/share/man/man5... Installing subscriptions.conf.5.gz in /usr/share/man/man5... Installing backend.7.gz in /usr/share/man/man7... Installing filter.7.gz in /usr/share/man/man7... Installing accept.8.gz in /usr/share/man/man8... Installing cupsaddsmb.8.gz in /usr/share/man/man8... Installing cups-deviced.8.gz in /usr/share/man/man8... Installing cups-driverd.8.gz in /usr/share/man/man8... Installing cups-lpd.8.gz in /usr/share/man/man8... Installing cups-polld.8.gz in /usr/share/man/man8... Installing cupsd.8.gz in /usr/share/man/man8... Installing cupsenable.8.gz in /usr/share/man/man8... Installing lpadmin.8.gz in /usr/share/man/man8... Installing lpinfo.8.gz in /usr/share/man/man8... Installing lpmove.8.gz in /usr/share/man/man8... Installing lpc.8.gz in /usr/share/man/man8... Installing in monitor... Installing in notifier... Installing in pdftops... Installing in scheduler... Creating /usr/sbin... Installing cupsd in /usr/sbin... Creating /usr/lib/cups... Creating /usr/lib/cups/daemon... Installing cups-deviced, cups-driverd, cups-lpd, and cups-polld in /usr/lib/cups/daemon... Creating /usr/lib/cups/driver... Creating /etc/cups... Creating /etc/cups/interfaces... Creating /etc/cups/ppd... Creating /var/run/cups... Creating /var/run/cups/certs... Creating /var/log/cups... Creating /var/spool/cups... Creating /var/spool/cups/tmp... Creating /var/cache/cups... Installing in systemv... Installing in test... Installing in conf... Installing in data... Installing in doc... Installing in fonts... Installing in ppd... Installing in templates... Installing cups-config script... Installing init scripts... Installing xinetd configuration file for cups-lpd... Installing desktop icons... *** X 起動しない対策 [#b85def74] - yum による大胆なプログラム削除の副作用で X 起動しなくなった - コンソール起動できないが、リモートでのログインはできた - 上の削除情報をもとに yum でパッケージを追加していった - 以下のパッケージリストで -- * 印は nautilus、gedit のインストールで入っていたもの (これだけでは不足している) -- □■ 印は追加でいれたもの ・・・・ ここまで入れたら正常にログイン画面出るようになった LEFT: |□| control-center i386 1:2.8.0-12.rhel4.2 installed 6.7 M| | |desktop-printing i386 0.17-3.EL.1 installed 240 k| |*| eel2 i386 2.8.1-2 installed 1.1 M| |■| eel2-devel i386 2.8.1-2 installed 223 k| |*| eog i386 2.8.1-2 installed 1.6 M| |■| gdm i386 1:2.6.0.5-7.rhel4.12 installed 7.6 M| |*| gedit i386 1:2.8.1-4 installed 7.0 M| |□| gnome-session i386 2.8.0-5.centos4 installed 1.1 M| |□| gnome-volume-manager i386 1.1.0-5 installed 567 k| || gpdf i386 2.8.2-7.4 installed 2.1 M| |□| gthumb i386 2.4.2-7 installed 4.3 M| || gtkhtml3 i386 3.3.2-6.EL installed 2.8 M| |*| gtksourceview i386 1.1.0-4 installed 837 k| || hal-cups-utils i386 0.5.2-8 installed 94 k| |■| libgal2 i386 2:2.2.3-10 installed 2.1 M| |*| libgnomecups i386 0.1.12-5 installed 199 k| |*| libgnomeprint22 i386 2.8.0-3 installed 1.1 M| |*| libgnomeprintui22 i386 2.8.0-1 installed 830 k| |*| librsvg2 i386 2.8.1-1.el4.1 installed 350 k| |■| librsvg2-devel i386 2.8.1-1.el4.1 installed 222 k| |*| nautilus i386 2.8.1-4 installed 12 M| |*| nautilus-cd-burner i386 2.8.3-6 installed 733 k| || nautilus-media i386 0.8.1-3 installed 565 k| || redhat-lsb i386 3.0-8.EL installed 21 k| || system-config-printer i386 0.6.116.5-1 installed 2.4 M| || system-config-printer-gui i386 0.6.116.5-1 installed 439 k| *** 関連ファイルの再設定 [#s24206bc] + /etc/cups/cupsd.conf + /etc/cups/mime.convs + /etc/cups/mime.types &color(red){CUPS を入れ替えた結果(余計なプログラムが介入しないように削除した結果)懸案の mime.types が書き換わる問題は解消 !!}; *** 傷害解析 [#e0797efc] - Windows からの印刷が出来なくなった -- http://spirit.hmuna.com:631 へのアクセスが出来なくなっていた -- 上記サイトへのアクセスはサーバーからも出来なくなっている -- サーバーから 127.0.0.1:631 へのアクセスは出来る (CUPS は動作している) -- 上記サイトでプリンターを確認すると /usb/lp0 として3番目のプリンターが 追加されている ー- &color(red){[原因]/etc/cups/cupsd.conf が自動編集され 192.168.1.22:631 へのアクセス許可追加が消されていた}; -- &color(red){[対策]/etc/cups/cupsd.conf にアクセス許可をマニュアルで再追加}; Browsing On BrowseProtocols cups BrowseOrder Deny,Allow BrowseAllow from @LOCAL Listen 127.0.0.1:631 Listen 192.168.1.22:631 - その後色々やったが、最終的に cupsd.conf には -- /etc/cups/cupsd.conf の最後の部分の編集はしない -- <Location /> に Allow From @LOCAL を追加 -- <Location /admin> にも同様に Allow From @LOCAL を追加 -- @LOCAL は # The @LOCAL address broadcasts to all non point-to-point interfaces. # For example, if you have a LAN and a dial-up link, @LOCAL would # send printer updates to the LAN but not to the dial-up link. ---- - さらに検証した結果 -- 192.168.1.22:631 のアクセス問題は上記の @LOCAL 設定で解決しているようだ -- &color(red){サーバー再起動時に /etc/cups/mime.type が更新されて octed-stream (raw printer) の設定が消されてしまうことがわかった}; -- この結果、再起動で windows からのプリントが出来なくなる現象がまだ発生する -- cups-config-daemon を無効にしてもこの問題は解決しなかった [root@spirit ~]# ls -tl /etc/cups/ 合計 120 -rw-r--r-- 1 root root 112 5月 22 08:51 lpoptions -rw-r----- 1 root sys 22280 5月 22 08:51 cupsd.conf -rw-r--r-- 1 root root 5926 5月 22 08:51 mime.types drwxr-xr-x 2 root sys 4096 5月 22 08:51 ppd -rw-r----- 1 root sys 538 5月 22 08:51 printers.conf drwx--x--x 2 root sys 4096 5月 22 08:50 certs -rw-r--r-- 1 root root 4586 5月 22 08:47 mime.convs -rw-r--r-- 1 root root 22280 5月 22 08:16 cupsd.conf.save -rw-r--r-- 1 root root 9840 5月 12 22:33 ppds.dat -rw-r--r-- 1 root root 947 1月 12 03:50 pstoraster.convs -rw-r----- 1 root sys 2421 1月 12 03:50 classes.conf -rw-r--r-- 1 root root 2333 1月 12 03:50 client.conf drwxr-xr-x 2 root root 4096 1月 12 03:50 interfaces - 上記の 上から5つのファイルはサーバー起動時に生成されていることがわかる - chmod で書き込み禁止にしてもワーニングもでないので、誰がどこで書いているのか調査が必要 - 同じ問題 → http://www.linuxprinting.org/pipermail/general-list/2005q1/006223.html -- 起動ログの解析で終わっていて解決に至っていない ・・・・ 残念 ! //- 当面の打開策として、rc.local でパッチを当てて自動修正させる //-- パッチの作成 // // [root@spirit cups]# diff mime.types_auto mime.types > mime.types_patch // [root@spirit cups]# cat mime.types_patch // 158c158 // < # application/octet-stream // --- // > application/octet-stream //-- パッチの適用 ( /etc/rc.local へ追加 ) // // # Patch /etc/cups/mime.types to enable raw-printer // echo "Patch to /etc/cups/mime.types" // cd /etc/cups // patch < mime.types_patch // cd - rc.local で mime.types を書き戻す処理(下記)を入れてみたが.... # recover etc/cups/mime.types echo "resumeautoupdated /etc/cups/mime.types" cp /etc/cups/mime.types /etc/cups/mime.types_munabackup cp /etc/cups/mime.types_muna /etc/cups/mime.types - &color(red){rc.local でファイルを書き戻した後で mime.types が生成されていることがタイムスタンプでわかった}; - %% &color(black){gnome の起動時に上書きされてしまうようだ.....};%% - サーバー側でログインプロンプトが出た時点で別端末からテキストログインしたらもう mime.types が書き換わっていた。 - &color(red){X は立ち上がっているが、gnome は立ち上がっていない時点 → X の初期化の問題 ?}; [root@spirit cups]# ls -l [ ファイル名順 ] 合計 136 drwx--x--x 2 root sys 4096 5月 23 08:14 certs -rw-r----- 1 root sys 2421 1月 12 03:50 classes.conf -rw-r--r-- 1 root root 2333 1月 12 03:50 client.conf -rw-r----- 1 root sys 22280 5月 23 08:15 cupsd.conf -rw-r--r-- 1 root root 22280 5月 22 08:16 cupsd.conf.save drwxr-xr-x 2 root root 4096 1月 12 03:50 interfaces -rw-r--r-- 1 root root 112 5月 23 08:15 lpoptions -rw-r--r-- 1 root root 4586 5月 22 08:47 mime.convs -rw-r--r-- 1 root root 5926 5月 23 08:15 mime.types -rw-r--r-- 1 root root 5926 5月 23 00:14 mime.types_autoupdate <---- rc.local の実行時間 -rw-r--r-- 1 root root 5924 5月 23 08:10 mime.types_muna <---------- 書き戻し用ファイル drwxr-xr-x 2 root sys 4096 5月 23 08:15 ppd -rw-r--r-- 1 root root 9840 5月 12 22:33 ppds.dat -rw-r----- 1 root sys 538 5月 23 08:15 printers.conf -rw-r--r-- 1 root root 947 1月 12 03:50 pstoraster.convs [root@spirit cups]# ls -lt [ ファイル更新時間順 ] 合計 136 drwx--x--x 2 root sys 4096 5月 23 08:19 certs --------------+ -rw-r--r-- 1 root root 112 5月 23 08:15 lpoptions | このつのファイルが全て -rw-r----- 1 root sys 22280 5月 23 08:15 cupsd.conf +-- Gnome が自動生成している ? -rw-r--r-- 1 root root 5926 5月 23 08:15 mime.types | rc.local 実行以降に作成されているから drwxr-xr-x 2 root sys 4096 5月 23 08:15 ppd | -rw-r----- 1 root sys 538 5月 23 08:15 printers.conf ----------+ -rw-r--r-- 1 root root 5924 5月 23 08:10 mime.types_muna -rw-r--r-- 1 root root 5926 5月 23 00:14 mime.types_autoupdate -rw-r--r-- 1 root root 4586 5月 22 08:47 mime.convs -rw-r--r-- 1 root root 22280 5月 22 08:16 cupsd.conf.save -rw-r--r-- 1 root root 9840 5月 12 22:33 ppds.dat -rw-r--r-- 1 root root 947 1月 12 03:50 pstoraster.convs -rw-r----- 1 root sys 2421 1月 12 03:50 classes.conf -rw-r--r-- 1 root root 2333 1月 12 03:50 client.conf drwxr-xr-x 2 root root 4096 1月 12 03:50 interfaces [root@spirit cups]# ---- - /etc/cups/mime.types のパーミションを 444 (= root の書き込み禁止) に変更してみる [root@spirit ~]# ls -l /etc/cups/mime.types -rw-r--r-- 1 root root 5924 6月 22 21:14 /etc/cups/mime.types [root@spirit ~]# chmod 444 /etc/cups/mime.types [root@spirit ~]# ls -l /etc/cups/mime.types -r--r--r-- 1 root root 5924 6月 22 21:14 /etc/cups/mime.types - &color(red){効き目なし、ファイルが上書きされてしまった}; [root@spirit ~]# ls -l /etc/cups/mime.types -rw-r--r-- 1 root root 5926 6月 22 21:24 /etc/cups/mime.types ---- - &color(red){ガーン、[[7.8. Red Hat Enterprise Linux 固有の情報:http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ja/admin-guide/s1-printers-rhlspec.htm]]}; ⇒ そういう仕様なんだ....! 重要 /etc/printcap ファイル、または/etc/cups/ ディレクトリ内のファイルを編集しないでください。 プリンタデーモン (cups) が起動/再起動する度に、新しい設定ファイルが動的に生成されます。 このファイルは プリンタ設定ツール に変更が適用された時にも動的に生成されます。 - [[Red Hat Enterprise Linux システム管理ガイド(英文):http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/ch-printing.html]] ---- - fuser (ファイルをオープンしているプロセスを調べるコマンド、但し close してしまったプロセスはわかりません) fuser -a /etc/cups/mime.types - ファイルオープンの瞬間に情報を表示したい場合、カーネルのopen()エントリポイントにprintk()するのがよい linux/fs/open.c: sys_open()で if (!strcmp(filename, "/etc/cups/mime.types")) printk("mime.types ACCESSED!! PID: %d\n", current->pid); ---- - GUI の [アプリケーション]−[システム設定]−[印刷]で -- [操作(A)]−[共有]−[全般] で "LPD プロトコルを有効にする" をチェック -- [操作(A)]−[共有]−[プリンタ]で"このプリンタは他のコンピュータで利用できます" をチェック - GUI の [アプリケーション]−[セキュリティレベルの設定]で -- 他のポートに 515:tcp, 515:udp を追加する - /etc/xinetd.d/cups-lpd があるか確認 # default: off # description: Allow applications using the legacy lpd protocol to communicate with CUPS service printer { disable = no socket_type = stream protocol = tcp wait = no user = lp server = /usr/lib/cups/daemon/cups-lpd } *** 参考URL [#qe82e2dc] - [[はじめての自宅サーバー構築(Print Server 編) >http://kajuhome.com/cups.shtml]] - [[Cent OS>http://yap.nucl.ap.titech.ac.jp/~shimada/ja/CentOS.html]]
タイムスタンプを変更しない
#contents() *** CPUS パッケージの確認 [#mf42d353] - Cent OS インストール時に CPUS 関係のプログラムが初期導入されていることを確認 [root@spirit ~]# yum list cups Setting up repositories Reading repository metadata in from local files Excluding Packages in global exclude list Finished Installed Packages cups.i386 1:1.1.22-0.rc1.9.10 installed *** &ref(cupsd.conf,center,環境設定ファイル); (/etc/cpus/cupsd.conf) の編集 [#be18ee50] - ローカルネット内からの設定、プリンター利用の許可 (snip) <Location /> Order Deny,Allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1.0/24 <---- ローカルネットを指定 (snip) ## Restrict access to local domain Order Deny,Allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1.0/24 <---- ローカルネットを指定 (snip) Browsing On BrowseProtocols cups BrowseOrder Deny,Allow BrowseAllow from @LOCAL Listen 127.0.0.1:631 Listen 192.168.1.22:631 <------ プリントサーバーの IPアドレスを追加指定 *** &ref(mime.types,center,環境設定ファイル); (/etc/cpus/mime.types) の編集 [#iea2cd7f] - RAW Printer の有効化 (Windows 側のドライバーで Binary を作成するモード) - 下記の部分の先頭のコメントを削除して octed-stream (無編集のバイナリーデーター受信)を有功化 application/octet-stream *** &ref(mime.convs,center,環境設定ファイル); (/etc/cpus/mime.convs) の編集 [#t7e2f09d] - RAW Printer の有効化 (Windows 側のドライバーで Binary を作成するモード) - 下記の部分の先頭のコメントを削除して octed-stream (無編集のバイナリーデーター受信)を有功化 pplication/octet-stream application/vnd.cups-raw 0 - *** CUPS の起動設定 [#g490b8ea] - service で CUPS を機動する [root@spirit ~]# service cups start cups を起動中: [ OK ] - システム起動時に CUPS が自動起動するように設定する [root@spirit ~]# chkconfig cups on [root@spirit ~]# chkconfig --list cups cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off *** Printer の接続 (自動認識) [#eb5e19ee] - CUPS が機動された状態で USB で HP Deskjet 895cxi を接続して再起動する - kundz が自動検出してドライバーのインストールとローカルプリンター(Linux マシンでの印刷に利用する)が登録された *** CUPS 環境設定 [#h2cca211] - Browser から [[環境設定プログラム >http://spirit.hmuna.com:631]] の起動確認~ &ref(win_pri_0.JPG); ~~ - [Do Administration Tasks] を選択し、サーバーの root ユーザーアカウントでログイン~ &ref(win_pri_02.JPG); ~~ - [Add Printer] を選択して Printer を追加する~ &ref(win_pri_03.jpg); ~~ - ネットワークから利用するプリンターを設定する~ &ref(win_pri_04.JPG); -- Name = プリンター識別名(重要) -- Location = 任意 (サーバーの場所が判る内容) -- Description = 任意 (プリンターの説明) ~ - Printer の定義を確認 - CENT OS が自動認識したプリンターもリストアップされている → Linux ではこちらを利用する~ &ref(win_pri_01.JPG); *** Windows 側の設定 [#kc1f72ee] - [コントロールパネル] → [プリンターその他のハードウエア] → [プリンターを追加する]~ &ref(win_pri_1.JPG); ~~ - 3番目のネットワークプリンターを選択~ &ref(win_pri_2.JPG); ~~ - ネットワークアドレスに &color(red){http://spirit.hmuna.com:631/printers/895cxi}; を指定する - 最後の 895cxi は上記の CPUS の Printer 追加時に RAW Printer に設定した名前である~ &ref(win_pri_3.JPG); ~~ - Windows のプリンタードライバーをインストールする~ &ref(win_pri_4.JPG); ~~ *** Redhat EL4 (= Cent 4.x)固有の環境自動設定について ← 下記 [傷害解析]の結果 [#q85a33ae] - プリンター情報の設定方法 ( [[Redhat EL4 System Administration Guide:http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-printing-save-config.html]] より) When the printer configuration is saved using the Printer Configuration Tool, the application creates~ its own configuration file that is used to create the files in the /etc/cups/ directory. ~ You can use the command line options to save or restore the Printer Configuration Tool file. ~ &color(red){If the /etc/cups/ directory is saved and restored to the same locations, the printer configuration~ is not restored because each time the printer daemon is restarted, it creates a new /etc/printcap~ file from the Printer Configuration Tool configuration file.}; When creating a backup of the system's~ configuration files, use the following method to save the printer configuration files.~ To save your printer configuration, type this command as root: /usr/sbin/system-config-printer-tui --Xexport > settings.xml Your configuration is saved to the file settings.xml.~ If this file is saved, it can be used to restore the printer settings. This is useful~ if the printer configuration is deleted, if Red Hat Enterprise Linux is reinstalled, ~ or if the same printer configuration is needed on multiple systems. ~ The file should be saved on a different system before reinstalling. ~ To restore the configuration, type this command as root: /usr/sbin/system-config-printer-tui --Ximport < settings.xml - 変更前の /etc/cups [root@spirit cups]# ls -tl 合計 136 drwx--x--x 2 root sys 4096 6月 22 22:25 certs -rw-r--r-- 1 root root 5924 6月 22 21:57 mime.types -rw-r----- 1 root sys 22280 6月 22 21:56 cupsd.conf -rw-r--r-- 1 root root 112 6月 22 21:56 lpoptions drwxr-xr-x 2 root sys 4096 6月 22 21:56 ppd -rw-r----- 1 root sys 592 6月 22 21:56 printers.conf -rw-r--r-- 1 root root 5924 6月 22 21:56 mime.types_munabackup -rw-r--r-- 1 root root 22280 5月 23 16:20 cupsd.conf.save -rw-r--r-- 1 root root 5924 5月 23 08:10 mime.types_muna -rw-r--r-- 1 root root 4586 5月 22 08:47 mime.convs -rw-r--r-- 1 root root 9840 5月 12 22:33 ppds.dat -rw-r--r-- 1 root root 947 1月 12 03:50 pstoraster.convs -rw-r----- 1 root sys 2421 1月 12 03:50 classes.conf -rw-r--r-- 1 root root 2333 1月 12 03:50 client.conf drwxr-xr-x 2 root root 4096 1月 12 03:50 interfaces - system-config-printer-tui の実行 (とりあえず /etc/cups でやってみる) [root@spirit cups]# /usr/sbin/system-config-printer-tui --Xexport > settings.xml - 確かに settings.xml は出来た.....が、 raw printer の設定が見あたらない [root@spirit cups]# ls -tl 合計 140 -rw-r--r-- 1 root root 2872 6月 22 22:38 settings.xml drwx--x--x 2 root sys 4096 6月 22 22:35 certs -rw-r--r-- 1 root root 5924 6月 22 21:57 mime.types -rw-r----- 1 root sys 22280 6月 22 21:56 cupsd.conf ( snip ) - 再起動してみたが、予想通り raw printer の設定は無効になっている *** Redhat 版の cups の削除 [#udfdfbcf] - 既存の Redhat 版 cups の uninstall ( yum remove ) [root@spirit cups-1.3svn-r5675]# yum remove cups Setting up Remove Process Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package cups.i386 1:1.1.22-0.rc1.9.10 set to be erased --> Running transaction check Setting up repositories update 100% |=========================| 951 B 00:00 addons 100% |=========================| 951 B 00:00 Reading repository metadata in from local files Excluding Packages in global exclude list Finished Excluding Packages in global exclude list Finished --> Processing Dependency: cups for package: libgnomecups --> Processing Dependency: /usr/bin/lp for package: redhat-lsb --> Processing Dependency: cups for package: desktop-printing --> Processing Dependency: /usr/bin/lpr for package: redhat-lsb --> Processing Dependency: cups for package: hal-cups-utils --> Processing Dependency: cups >= 1.1.17-4 for package: system-config-printer --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package system-config-printer.i386 0:0.6.116.5-1 set to be erased ---> Package libgnomecups.i386 0:0.1.12-5 set to be erased ---> Package hal-cups-utils.i386 0:0.5.2-8 set to be erased ---> Package redhat-lsb.i386 0:3.0-8.EL set to be erased ---> Package desktop-printing.i386 0:0.17-3.EL.1 set to be erased --> Running transaction check --> Processing Dependency: libgnomecups-1.0.so.1 for package: libgnomeprint22 --> Processing Dependency: libgnomecups >= 0.1.11-2 for package: libgnomeprint22 --> Processing Dependency: system-config-printer = 0.6.116.5-1 for package: system-config-printer-gui --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package libgnomeprint22.i386 0:2.8.0-3 set to be erased ---> Package system-config-printer-gui.i386 0:0.6.116.5-1 set to be erased --> Running transaction check --> Processing Dependency: libgnomeprint-2-2.so.0 for package: gedit --> Processing Dependency: libgnomeprint-2-2.so.0 for package: libgal2 --> Processing Dependency: libgnomeprint-2-2.so.0 for package: gtkhtml3 --> Processing Dependency: libgnomeprint-2-2.so.0 for package: libgnomeprintui22 --> Processing Dependency: libgnomeprint-2-2.so.0 for package: gthumb --> Processing Dependency: libgnomeprint-2-2.so.0 for package: gtksourceview --> Processing Dependency: libgnomeprint22 >= 2.7.1 for package: gtkhtml3 --> Processing Dependency: libgnomeprint-2-2.so.0 for package: gpdf --> Processing Dependency: libgnomeprint22 for package: gpdf --> Processing Dependency: libgnomeprint-2-2.so.0 for package: librsvg2 --> Processing Dependency: libgnomeprint22 >= 2.8.0 for package: libgnomeprintui22 --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package gtksourceview.i386 0:1.1.0-4 set to be erased ---> Package librsvg2.i386 0:2.8.1-1.el4.1 set to be erased ---> Package libgnomeprintui22.i386 0:2.8.0-1 set to be erased ---> Package libgal2.i386 2:2.2.3-10 set to be erased ---> Package gtkhtml3.i386 0:3.3.2-6.EL set to be erased ---> Package gthumb.i386 0:2.4.2-7 set to be erased ---> Package gpdf.i386 0:2.8.2-7.4 set to be erased ---> Package gedit.i386 1:2.8.1-4 set to be erased --> Running transaction check --> Processing Dependency: librsvg-2.so.2 for package: gdm --> Processing Dependency: librsvg2 = 2.8.1-1.el4.1 for package: librsvg2-devel --> Processing Dependency: librsvg2 >= 0:2.0.1 for package: gdm --> Processing Dependency: gthumb for package: gnome-volume-manager --> Processing Dependency: librsvg2 >= 2.0.1 for package: eel2 --> Processing Dependency: librsvg-2.so.2 for package: nautilus --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package librsvg2-devel.i386 0:2.8.1-1.el4.1 set to be erased ---> Package gdm.i386 1:2.6.0.5-7.rhel4.12 set to be erased ---> Package eel2.i386 0:2.8.1-2 set to be erased ---> Package nautilus.i386 0:2.8.1-4 set to be erased ---> Package gnome-volume-manager.i386 0:1.1.0-5 set to be erased --> Running transaction check --> Processing Dependency: libnautilus.so.2 for package: control-center --> Processing Dependency: libnautilus-extension.so.1 for package: nautilus-cd-burner --> Processing Dependency: libeel-2.so.2 for package: nautilus-cd-burner --> Processing Dependency: gnome-volume-manager for package: gnome-session --> Processing Dependency: librsvg2-devel >= 2.0.1 for package: eel2-devel --> Processing Dependency: libeel-2.so.2 for package: control-center --> Processing Dependency: libeel-2.so.2 for package: eog --> Processing Dependency: libeel-2.so.2 for package: nautilus-media --> Processing Dependency: eel2 = 2.8.1 for package: eel2-devel --> Processing Dependency: libnautilus.so.2 for package: nautilus-media --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package control-center.i386 1:2.8.0-12.rhel4.2 set to be erased ---> Package gnome-session.i386 0:2.8.0-5.centos4 set to be erased ---> Package nautilus-media.i386 0:0.8.1-3 set to be erased ---> Package eel2-devel.i386 0:2.8.1-2 set to be erased ---> Package eog.i386 0:2.8.1-2 set to be erased ---> Package nautilus-cd-burner.i386 0:2.8.3-6 set to be erased --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Removing: cups i386 1:1.1.22-0.rc1.9.10 installed 3.8 M Removing for dependencies: control-center i386 1:2.8.0-12.rhel4.2 installed 6.7 M desktop-printing i386 0.17-3.EL.1 installed 240 k eel2 i386 2.8.1-2 installed 1.1 M eel2-devel i386 2.8.1-2 installed 223 k eog i386 2.8.1-2 installed 1.6 M gdm i386 1:2.6.0.5-7.rhel4.12 installed 7.6 M gedit i386 1:2.8.1-4 installed 7.0 M gnome-session i386 2.8.0-5.centos4 installed 1.1 M gnome-volume-manager i386 1.1.0-5 installed 567 k gpdf i386 2.8.2-7.4 installed 2.1 M gthumb i386 2.4.2-7 installed 4.3 M gtkhtml3 i386 3.3.2-6.EL installed 2.8 M gtksourceview i386 1.1.0-4 installed 837 k hal-cups-utils i386 0.5.2-8 installed 94 k libgal2 i386 2:2.2.3-10 installed 2.1 M libgnomecups i386 0.1.12-5 installed 199 k libgnomeprint22 i386 2.8.0-3 installed 1.1 M libgnomeprintui22 i386 2.8.0-1 installed 830 k librsvg2 i386 2.8.1-1.el4.1 installed 350 k librsvg2-devel i386 2.8.1-1.el4.1 installed 222 k nautilus i386 2.8.1-4 installed 12 M nautilus-cd-burner i386 2.8.3-6 installed 733 k nautilus-media i386 0.8.1-3 installed 565 k redhat-lsb i386 3.0-8.EL installed 21 k system-config-printer i386 0.6.116.5-1 installed 2.4 M system-config-printer-gui i386 0.6.116.5-1 installed 439 k Transaction Summary ============================================================================= Install 0 Package(s) Update 0 Package(s) Remove 27 Package(s) Total download size: 0 Is this ok [y/N]: - 印刷が出来なくても使いたいもの (gedit など)が削除されるのは関心しないので このまま実行するのは悩ましいが、とりあえずこの画面が残っていれば復活はできる。 - えぃ! 一端削除してみよう Is this ok [y/N]: y Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Removing : libgnomecups ####################### [ 1/27] Removing : gdm ####################### [ 2/27] warning: /etc/alchemist/namespace/printconf/local.adl saved as /etc/alchemist/namespace/printconf/local.adl.rpmsave Removing : system-config-printer ####################### [ 3/27] Removing : librsvg2-devel ####################### [ 4/27] Removing : nautilus ####################### [ 5/27] Removing : gthumb ####################### [ 6/27] Removing : gtksourceview ####################### [ 7/27] Removing : eel2 ####################### [ 8/27] Removing : control-center ####################### [ 9/27] Removing : gpdf ####################### [10/27] Removing : gnome-session ####################### [11/27] Removing : hal-cups-utils ####################### [12/27] Removing : libgnomeprintui22 ####################### [13/27] Removing : libgnomeprint22 ####################### [14/27] Removing : nautilus-media ####################### [15/27] Removing : eel2-devel ####################### [16/27] Removing : gtkhtml3 ####################### [17/27] Removing : libgal2 ####################### [18/27] Removing : eog ####################### [19/27] Removing : librsvg2 ####################### [20/27] warning: /etc/xinetd.d/cups-lpd saved as /etc/xinetd.d/cups-lpd.rpmsave Removing : cups ####################### [21/27] Removing : gedit ####################### [22/27] Removing : system-config-printer-gui ####################### [23/27] Removing : redhat-lsb ####################### [24/27] Removing : gnome-volume-manager ####################### [25/27] Removing : nautilus-cd-burner ####################### [26/27] Removing : desktop-printing ####################### [27/27] Removed: cups.i386 1:1.1.22-0.rc1.9.10 Dependency Removed: control-center.i386 1:2.8.0-12.rhel4.2 desktop-printing.i386 0:0.17-3.EL.1 eel2.i386 0:2.8.1-2eel2-devel.i386 0:2.8.1-2 eog.i386 0:2.8.1-2 gdm.i386 1:2.6.0.5-7.rhel4.12 gedit.i386 1:2.8.1-4 gnome-session.i386 0:2.8.0-5.centos4 gnome-volume-manager.i386 0:1.1.0-5 gpdf.i386 0:2.8.2-7.4 gthumb.i386 0:2.4.2-7 gtkhtml3.i386 0:3.3.2-6.EL gtksourceview.i386 0:1.1.0-4 hal-cups-utils.i386 0:0.5.2-8 libgal2.i386 2:2.2.3-10 libgnomecups.i386 0:0.1.12-5 libgnomeprint22.i386 0:2.8.0-3 libgnomeprintui22.i386 0:2.8.0-1 librsvg2.i386 0:2.8.1-1.el4.1 librsvg2-devel.i386 0:2.8.1-1.el4.1 nautilus.i386 0:2.8.1-4 nautilus-cd-burner.i386 0:2.8.3-6 nautilus-media.i386 0:0.8.1-3 redhat-lsb.i386 0:3.0-8.EL system-config-printer.i386 0:0.6.116.5-1 system-config-printer-gui.i386 0:0.6.116.5-1 Complete! - 恐れをなして nautilus は再インストール -&color(red){しかし、ここで cups が必須といわれると何をやっているんだか..... 後で cups は上書きしてしまうが}; [root@spirit cups-1.3svn-r5675]# yum install nautilus Setting up Install Process Setting up repositories Reading repository metadata in from local files Excluding Packages in global exclude list Finished Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package nautilus.i386 0:2.8.1-4 set to be updated --> Running transaction check --> Processing Dependency: eog >= 1.0.0 for package: nautilus --> Processing Dependency: libeel-2.so.2 for package: nautilus --> Processing Dependency: librsvg-2.so.2 for package: nautilus --> Processing Dependency: eel2 >= 2.7.92 for package: nautilus --> Processing Dependency: nautilus-cd-burner for package: nautilus --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package librsvg2.i386 0:2.8.1-1.el4.1 set to be updated ---> Package eog.i386 0:2.8.1-2 set to be updated ---> Package nautilus-cd-burner.i386 0:2.8.3-6 set to be updated ---> Package eel2.i386 0:2.8.1-2 set to be updated --> Running transaction check --> Processing Dependency: libgnomeprint-2-2.so.0 for package: librsvg2 --> Processing Dependency: libgnomeprintui-2-2.so.0 for package: librsvg2 --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package libgnomeprint22.i386 0:2.8.0-3 set to be updated ---> Package libgnomeprintui22.i386 0:2.8.0-1 set to be updated --> Running transaction check --> Processing Dependency: libgnomecups-1.0.so.1 for package: libgnomeprint22 --> Processing Dependency: libgnomecups >= 0.1.11-2 for package: libgnomeprint22 --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package libgnomecups.i386 0:0.1.12-5 set to be updated --> Running transaction check --> Processing Dependency: cups for package: libgnomecups --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package cups.i386 1:1.1.22-0.rc1.9.10 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: nautilus i386 2.8.1-4 base 4.1 M Installing for dependencies: cups i386 1:1.1.22-0.rc1.9.10 base 1.5 M eel2 i386 2.8.1-2 base 363 k eog i386 2.8.1-2 base 592 k libgnomecups i386 0.1.12-5 base 64 k libgnomeprint22 i386 2.8.0-3 base 326 k libgnomeprintui22 i386 2.8.0-1 base 245 k librsvg2 i386 2.8.1-1.el4.1 base 143 k nautilus-cd-burner i386 2.8.3-6 base 212 k Transaction Summary ============================================================================= Install 9 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 7.5 M Is this ok [y/N]: Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: cups ######################### [1/9] Installing: libgnomecups ######################### [2/9] Installing: libgnomeprint22 ######################### [3/9] Installing: libgnomeprintui22 ######################### [4/9] Installing: librsvg2 ######################### [5/9] Installing: eel2 ######################### [6/9] Installing: eog ######################### [7/9] Installing: nautilus-cd-burner ######################### [8/9] Installing: nautilus ######################### [9/9] Installed: nautilus.i386 0:2.8.1-4 Dependency Installed: cups.i386 1:1.1.22-0.rc1.9.10 eel2.i386 0:2.8.1-2 eog.i386 0:2.8.1-2 libgnomecups.i386 0:0.1.12-5 libgnomeprint22.i386 0:2.8.0-3 libgnomeprintui22.i386 0:2.8.0-1 librsvg2.i386 0:2.8.1-1.el4.1 nautilus-cd-burner.i386 0:2.8.3-6 Complete! - gedit もインストールしておこう [root@spirit cups-1.3svn-r5675]# yum install gedit Setting up Install Process Setting up repositories Reading repository metadata in from local files Excluding Packages in global exclude list Finished Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package gedit.i386 1:2.8.1-4 set to be updated --> Running transaction check --> Processing Dependency: gtksourceview >= 1.1 for package: gedit --> Processing Dependency: libgtksourceview-1.0.so.0 for package: gedit --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package gtksourceview.i386 0:1.1.0-4 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: gedit i386 1:2.8.1-4 base 2.2 M Installing for dependencies: gtksourceview i386 1.1.0-4 base 245 k Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 2.4 M Is this ok [y/N]: y Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: gtksourceview ######################### [1/2] Installing: gedit ######################### [2/2] Installed: gedit.i386 1:2.8.1-4 Dependency Installed: gtksourceview.i386 0:1.1.0-4 Complete! *** 最新版の cups を ソースから ビルド [#fce14a35] [root@spirit Downloads]# ls -l cups-1.3svn-r5675-source.tar.gz -rw-r--r-- 1 root root 4026753 6月 22 23:08 cups-1.3svn-r5675-source.tar.gz [root@spirit Downloads]# tar xzvf cups-1.3svn-r5675-source.tar.gz [root@spirit Downloads]# cd cups-1.3svn-r5675 [root@spirit cups-1.3svn-r5675]# ./configure [root@spirit cups-1.3svn-r5675]# make [root@spirit cups-1.3svn-r5675]# make install Installing in cups... Installing in backend... Installing in berkeley... Installing in cgi-bin... Installing in filter... Installing in locale... Installing in man... Converting man pages to HTML... cancel.1.gz... cups-config.1.gz... cupstestdsc.1.gz... cupstestppd.1.gz... lp.1.gz... lpoptions.1.gz... lppasswd.1.gz... lpq.1.gz... lprm.1.gz... lpr.1.gz... lpstat.1.gz... classes.conf.5.gz... client.conf.5.gz... cups-snmp.conf.5.gz... cupsd.conf.5.gz... mime.convs.5.gz... mime.types.5.gz... printers.conf.5.gz... subscriptions.conf.5.gz... backend.7.gz... filter.7.gz... accept.8.gz... cupsaddsmb.8.gz... cups-deviced.8.gz... cups-driverd.8.gz... cups-lpd.8.gz... cups-polld.8.gz... cupsd.8.gz... cupsenable.8.gz... lpadmin.8.gz... lpinfo.8.gz... lpmove.8.gz... lpc.8.gz... Installing cancel.1.gz in /usr/share/man/man1... Installing cups-config.1.gz in /usr/share/man/man1... Installing cupstestdsc.1.gz in /usr/share/man/man1... Installing cupstestppd.1.gz in /usr/share/man/man1... Installing lp.1.gz in /usr/share/man/man1... Installing lpoptions.1.gz in /usr/share/man/man1... Installing lppasswd.1.gz in /usr/share/man/man1... Installing lpq.1.gz in /usr/share/man/man1... Installing lprm.1.gz in /usr/share/man/man1... Installing lpr.1.gz in /usr/share/man/man1... Installing lpstat.1.gz in /usr/share/man/man1... Installing classes.conf.5.gz in /usr/share/man/man5... Installing client.conf.5.gz in /usr/share/man/man5... Installing cups-snmp.conf.5.gz in /usr/share/man/man5... Installing cupsd.conf.5.gz in /usr/share/man/man5... Installing mime.convs.5.gz in /usr/share/man/man5... Installing mime.types.5.gz in /usr/share/man/man5... Installing printers.conf.5.gz in /usr/share/man/man5... Installing subscriptions.conf.5.gz in /usr/share/man/man5... Installing backend.7.gz in /usr/share/man/man7... Installing filter.7.gz in /usr/share/man/man7... Installing accept.8.gz in /usr/share/man/man8... Installing cupsaddsmb.8.gz in /usr/share/man/man8... Installing cups-deviced.8.gz in /usr/share/man/man8... Installing cups-driverd.8.gz in /usr/share/man/man8... Installing cups-lpd.8.gz in /usr/share/man/man8... Installing cups-polld.8.gz in /usr/share/man/man8... Installing cupsd.8.gz in /usr/share/man/man8... Installing cupsenable.8.gz in /usr/share/man/man8... Installing lpadmin.8.gz in /usr/share/man/man8... Installing lpinfo.8.gz in /usr/share/man/man8... Installing lpmove.8.gz in /usr/share/man/man8... Installing lpc.8.gz in /usr/share/man/man8... Installing in monitor... Installing in notifier... Installing in pdftops... Installing in scheduler... Creating /usr/sbin... Installing cupsd in /usr/sbin... Creating /usr/lib/cups... Creating /usr/lib/cups/daemon... Installing cups-deviced, cups-driverd, cups-lpd, and cups-polld in /usr/lib/cups/daemon... Creating /usr/lib/cups/driver... Creating /etc/cups... Creating /etc/cups/interfaces... Creating /etc/cups/ppd... Creating /var/run/cups... Creating /var/run/cups/certs... Creating /var/log/cups... Creating /var/spool/cups... Creating /var/spool/cups/tmp... Creating /var/cache/cups... Installing in systemv... Installing in test... Installing in conf... Installing in data... Installing in doc... Installing in fonts... Installing in ppd... Installing in templates... Installing cups-config script... Installing init scripts... Installing xinetd configuration file for cups-lpd... Installing desktop icons... *** X 起動しない対策 [#b85def74] - yum による大胆なプログラム削除の副作用で X 起動しなくなった - コンソール起動できないが、リモートでのログインはできた - 上の削除情報をもとに yum でパッケージを追加していった - 以下のパッケージリストで -- * 印は nautilus、gedit のインストールで入っていたもの (これだけでは不足している) -- □■ 印は追加でいれたもの ・・・・ ここまで入れたら正常にログイン画面出るようになった LEFT: |□| control-center i386 1:2.8.0-12.rhel4.2 installed 6.7 M| | |desktop-printing i386 0.17-3.EL.1 installed 240 k| |*| eel2 i386 2.8.1-2 installed 1.1 M| |■| eel2-devel i386 2.8.1-2 installed 223 k| |*| eog i386 2.8.1-2 installed 1.6 M| |■| gdm i386 1:2.6.0.5-7.rhel4.12 installed 7.6 M| |*| gedit i386 1:2.8.1-4 installed 7.0 M| |□| gnome-session i386 2.8.0-5.centos4 installed 1.1 M| |□| gnome-volume-manager i386 1.1.0-5 installed 567 k| || gpdf i386 2.8.2-7.4 installed 2.1 M| |□| gthumb i386 2.4.2-7 installed 4.3 M| || gtkhtml3 i386 3.3.2-6.EL installed 2.8 M| |*| gtksourceview i386 1.1.0-4 installed 837 k| || hal-cups-utils i386 0.5.2-8 installed 94 k| |■| libgal2 i386 2:2.2.3-10 installed 2.1 M| |*| libgnomecups i386 0.1.12-5 installed 199 k| |*| libgnomeprint22 i386 2.8.0-3 installed 1.1 M| |*| libgnomeprintui22 i386 2.8.0-1 installed 830 k| |*| librsvg2 i386 2.8.1-1.el4.1 installed 350 k| |■| librsvg2-devel i386 2.8.1-1.el4.1 installed 222 k| |*| nautilus i386 2.8.1-4 installed 12 M| |*| nautilus-cd-burner i386 2.8.3-6 installed 733 k| || nautilus-media i386 0.8.1-3 installed 565 k| || redhat-lsb i386 3.0-8.EL installed 21 k| || system-config-printer i386 0.6.116.5-1 installed 2.4 M| || system-config-printer-gui i386 0.6.116.5-1 installed 439 k| *** 関連ファイルの再設定 [#s24206bc] + /etc/cups/cupsd.conf + /etc/cups/mime.convs + /etc/cups/mime.types &color(red){CUPS を入れ替えた結果(余計なプログラムが介入しないように削除した結果)懸案の mime.types が書き換わる問題は解消 !!}; *** 傷害解析 [#e0797efc] - Windows からの印刷が出来なくなった -- http://spirit.hmuna.com:631 へのアクセスが出来なくなっていた -- 上記サイトへのアクセスはサーバーからも出来なくなっている -- サーバーから 127.0.0.1:631 へのアクセスは出来る (CUPS は動作している) -- 上記サイトでプリンターを確認すると /usb/lp0 として3番目のプリンターが 追加されている ー- &color(red){[原因]/etc/cups/cupsd.conf が自動編集され 192.168.1.22:631 へのアクセス許可追加が消されていた}; -- &color(red){[対策]/etc/cups/cupsd.conf にアクセス許可をマニュアルで再追加}; Browsing On BrowseProtocols cups BrowseOrder Deny,Allow BrowseAllow from @LOCAL Listen 127.0.0.1:631 Listen 192.168.1.22:631 - その後色々やったが、最終的に cupsd.conf には -- /etc/cups/cupsd.conf の最後の部分の編集はしない -- <Location /> に Allow From @LOCAL を追加 -- <Location /admin> にも同様に Allow From @LOCAL を追加 -- @LOCAL は # The @LOCAL address broadcasts to all non point-to-point interfaces. # For example, if you have a LAN and a dial-up link, @LOCAL would # send printer updates to the LAN but not to the dial-up link. ---- - さらに検証した結果 -- 192.168.1.22:631 のアクセス問題は上記の @LOCAL 設定で解決しているようだ -- &color(red){サーバー再起動時に /etc/cups/mime.type が更新されて octed-stream (raw printer) の設定が消されてしまうことがわかった}; -- この結果、再起動で windows からのプリントが出来なくなる現象がまだ発生する -- cups-config-daemon を無効にしてもこの問題は解決しなかった [root@spirit ~]# ls -tl /etc/cups/ 合計 120 -rw-r--r-- 1 root root 112 5月 22 08:51 lpoptions -rw-r----- 1 root sys 22280 5月 22 08:51 cupsd.conf -rw-r--r-- 1 root root 5926 5月 22 08:51 mime.types drwxr-xr-x 2 root sys 4096 5月 22 08:51 ppd -rw-r----- 1 root sys 538 5月 22 08:51 printers.conf drwx--x--x 2 root sys 4096 5月 22 08:50 certs -rw-r--r-- 1 root root 4586 5月 22 08:47 mime.convs -rw-r--r-- 1 root root 22280 5月 22 08:16 cupsd.conf.save -rw-r--r-- 1 root root 9840 5月 12 22:33 ppds.dat -rw-r--r-- 1 root root 947 1月 12 03:50 pstoraster.convs -rw-r----- 1 root sys 2421 1月 12 03:50 classes.conf -rw-r--r-- 1 root root 2333 1月 12 03:50 client.conf drwxr-xr-x 2 root root 4096 1月 12 03:50 interfaces - 上記の 上から5つのファイルはサーバー起動時に生成されていることがわかる - chmod で書き込み禁止にしてもワーニングもでないので、誰がどこで書いているのか調査が必要 - 同じ問題 → http://www.linuxprinting.org/pipermail/general-list/2005q1/006223.html -- 起動ログの解析で終わっていて解決に至っていない ・・・・ 残念 ! //- 当面の打開策として、rc.local でパッチを当てて自動修正させる //-- パッチの作成 // // [root@spirit cups]# diff mime.types_auto mime.types > mime.types_patch // [root@spirit cups]# cat mime.types_patch // 158c158 // < # application/octet-stream // --- // > application/octet-stream //-- パッチの適用 ( /etc/rc.local へ追加 ) // // # Patch /etc/cups/mime.types to enable raw-printer // echo "Patch to /etc/cups/mime.types" // cd /etc/cups // patch < mime.types_patch // cd - rc.local で mime.types を書き戻す処理(下記)を入れてみたが.... # recover etc/cups/mime.types echo "resumeautoupdated /etc/cups/mime.types" cp /etc/cups/mime.types /etc/cups/mime.types_munabackup cp /etc/cups/mime.types_muna /etc/cups/mime.types - &color(red){rc.local でファイルを書き戻した後で mime.types が生成されていることがタイムスタンプでわかった}; - %% &color(black){gnome の起動時に上書きされてしまうようだ.....};%% - サーバー側でログインプロンプトが出た時点で別端末からテキストログインしたらもう mime.types が書き換わっていた。 - &color(red){X は立ち上がっているが、gnome は立ち上がっていない時点 → X の初期化の問題 ?}; [root@spirit cups]# ls -l [ ファイル名順 ] 合計 136 drwx--x--x 2 root sys 4096 5月 23 08:14 certs -rw-r----- 1 root sys 2421 1月 12 03:50 classes.conf -rw-r--r-- 1 root root 2333 1月 12 03:50 client.conf -rw-r----- 1 root sys 22280 5月 23 08:15 cupsd.conf -rw-r--r-- 1 root root 22280 5月 22 08:16 cupsd.conf.save drwxr-xr-x 2 root root 4096 1月 12 03:50 interfaces -rw-r--r-- 1 root root 112 5月 23 08:15 lpoptions -rw-r--r-- 1 root root 4586 5月 22 08:47 mime.convs -rw-r--r-- 1 root root 5926 5月 23 08:15 mime.types -rw-r--r-- 1 root root 5926 5月 23 00:14 mime.types_autoupdate <---- rc.local の実行時間 -rw-r--r-- 1 root root 5924 5月 23 08:10 mime.types_muna <---------- 書き戻し用ファイル drwxr-xr-x 2 root sys 4096 5月 23 08:15 ppd -rw-r--r-- 1 root root 9840 5月 12 22:33 ppds.dat -rw-r----- 1 root sys 538 5月 23 08:15 printers.conf -rw-r--r-- 1 root root 947 1月 12 03:50 pstoraster.convs [root@spirit cups]# ls -lt [ ファイル更新時間順 ] 合計 136 drwx--x--x 2 root sys 4096 5月 23 08:19 certs --------------+ -rw-r--r-- 1 root root 112 5月 23 08:15 lpoptions | このつのファイルが全て -rw-r----- 1 root sys 22280 5月 23 08:15 cupsd.conf +-- Gnome が自動生成している ? -rw-r--r-- 1 root root 5926 5月 23 08:15 mime.types | rc.local 実行以降に作成されているから drwxr-xr-x 2 root sys 4096 5月 23 08:15 ppd | -rw-r----- 1 root sys 538 5月 23 08:15 printers.conf ----------+ -rw-r--r-- 1 root root 5924 5月 23 08:10 mime.types_muna -rw-r--r-- 1 root root 5926 5月 23 00:14 mime.types_autoupdate -rw-r--r-- 1 root root 4586 5月 22 08:47 mime.convs -rw-r--r-- 1 root root 22280 5月 22 08:16 cupsd.conf.save -rw-r--r-- 1 root root 9840 5月 12 22:33 ppds.dat -rw-r--r-- 1 root root 947 1月 12 03:50 pstoraster.convs -rw-r----- 1 root sys 2421 1月 12 03:50 classes.conf -rw-r--r-- 1 root root 2333 1月 12 03:50 client.conf drwxr-xr-x 2 root root 4096 1月 12 03:50 interfaces [root@spirit cups]# ---- - /etc/cups/mime.types のパーミションを 444 (= root の書き込み禁止) に変更してみる [root@spirit ~]# ls -l /etc/cups/mime.types -rw-r--r-- 1 root root 5924 6月 22 21:14 /etc/cups/mime.types [root@spirit ~]# chmod 444 /etc/cups/mime.types [root@spirit ~]# ls -l /etc/cups/mime.types -r--r--r-- 1 root root 5924 6月 22 21:14 /etc/cups/mime.types - &color(red){効き目なし、ファイルが上書きされてしまった}; [root@spirit ~]# ls -l /etc/cups/mime.types -rw-r--r-- 1 root root 5926 6月 22 21:24 /etc/cups/mime.types ---- - &color(red){ガーン、[[7.8. Red Hat Enterprise Linux 固有の情報:http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ja/admin-guide/s1-printers-rhlspec.htm]]}; ⇒ そういう仕様なんだ....! 重要 /etc/printcap ファイル、または/etc/cups/ ディレクトリ内のファイルを編集しないでください。 プリンタデーモン (cups) が起動/再起動する度に、新しい設定ファイルが動的に生成されます。 このファイルは プリンタ設定ツール に変更が適用された時にも動的に生成されます。 - [[Red Hat Enterprise Linux システム管理ガイド(英文):http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/ch-printing.html]] ---- - fuser (ファイルをオープンしているプロセスを調べるコマンド、但し close してしまったプロセスはわかりません) fuser -a /etc/cups/mime.types - ファイルオープンの瞬間に情報を表示したい場合、カーネルのopen()エントリポイントにprintk()するのがよい linux/fs/open.c: sys_open()で if (!strcmp(filename, "/etc/cups/mime.types")) printk("mime.types ACCESSED!! PID: %d\n", current->pid); ---- - GUI の [アプリケーション]−[システム設定]−[印刷]で -- [操作(A)]−[共有]−[全般] で "LPD プロトコルを有効にする" をチェック -- [操作(A)]−[共有]−[プリンタ]で"このプリンタは他のコンピュータで利用できます" をチェック - GUI の [アプリケーション]−[セキュリティレベルの設定]で -- 他のポートに 515:tcp, 515:udp を追加する - /etc/xinetd.d/cups-lpd があるか確認 # default: off # description: Allow applications using the legacy lpd protocol to communicate with CUPS service printer { disable = no socket_type = stream protocol = tcp wait = no user = lp server = /usr/lib/cups/daemon/cups-lpd } *** 参考URL [#qe82e2dc] - [[はじめての自宅サーバー構築(Print Server 編) >http://kajuhome.com/cups.shtml]] - [[Cent OS>http://yap.nucl.ap.titech.ac.jp/~shimada/ja/CentOS.html]]
テキスト整形のルールを表示する
添付ファイル:
win_pri_03.jpg
18件
[
詳細
]
win_pri_04.JPG
19件
[
詳細
]
win_pri_1.JPG
20件
[
詳細
]
cupsd.conf
22件
[
詳細
]
win_pri_3.JPG
19件
[
詳細
]
mime.convs
23件
[
詳細
]
win_pri_0.JPG
21件
[
詳細
]
mime.types
21件
[
詳細
]
win_pri_4.JPG
20件
[
詳細
]
win_pri_02.JPG
21件
[
詳細
]
win_pri_2.JPG
20件
[
詳細
]
win_pri_01.JPG
19件
[
詳細
]