<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Magic Web &#187; Linux</title>
	<atom:link href="http://www.a-magic-web.com/server_linux/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.a-magic-web.com</link>
	<description></description>
	<lastBuildDate>Sat, 07 Aug 2010 05:57:45 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Linux でディレクトリ内のファイルをすべて消去</title>
		<link>http://www.a-magic-web.com/server_linux/linux/filesystem_directories/remove_all_in_diretory.html</link>
		<comments>http://www.a-magic-web.com/server_linux/linux/filesystem_directories/remove_all_in_diretory.html#comments</comments>
		<pubDate>Thu, 21 May 2009 13:59:22 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[ファイル・ディレクトリ]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/linux/filesystem_directories/remove_all_in_diretory/</guid>
		<description><![CDATA[専用のオプションでもあるのかと思いきや、意外と簡単な方法を組み合わせてで きるのですね。 こんなディレクトリと、ファイルがあったとして、 [root@localhost test]# ls -a . .. test01.text test02.text test03.text test04.text test05.text rm -f ./* を実行。「同じディレクトリのすべてのファイルを消去」ですね。 [root@localhost test]# rm -f ./* [root@localhost test]# ls -a . ..]]></description>
			<content:encoded><![CDATA[<p>専用のオプションでもあるのかと思いきや、意外と簡単な方法を組み合わせてで    <br />きるのですね。</p>
<p>こんなディレクトリと、ファイルがあったとして、</p>
<div class="command">
<pre>[root@localhost test]# ls -a
.  ..  test01.text  test02.text  test03.text  test04.text  test05.text</pre>
</div>
<p>rm -f ./* を実行。「同じディレクトリのすべてのファイルを消去」ですね。</p>
<div class="command">
<pre>[root@localhost test]# rm -f ./*
[root@localhost test]# ls -a
.  ..</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/linux/filesystem_directories/remove_all_in_diretory.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux システムの文字コード</title>
		<link>http://www.a-magic-web.com/server_linux/linux/basics/linux_system_encode.html</link>
		<comments>http://www.a-magic-web.com/server_linux/linux/basics/linux_system_encode.html#comments</comments>
		<pubDate>Sun, 17 May 2009 02:22:49 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[基礎]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/linux/basics/linux_system_encode/</guid>
		<description><![CDATA[Linux システム自体の文字コードは、以下の場所で確認・変更することができます。 [root@centos ~]# cat /etc/sysconfig/i18n LANG=&#34;ja_JP.UTF-8&#34;]]></description>
			<content:encoded><![CDATA[<p>Linux システム自体の文字コードは、以下の場所で確認・変更することができます。</p>
<div class="command">
<pre>[root@centos ~]# cat /etc/sysconfig/i18n
LANG=&quot;ja_JP.UTF-8&quot;</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/linux/basics/linux_system_encode.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>yum.conf　/etc/yum.repos.d/</title>
		<link>http://www.a-magic-web.com/server_linux/linux/yum/yum_conf.html</link>
		<comments>http://www.a-magic-web.com/server_linux/linux/yum/yum_conf.html#comments</comments>
		<pubDate>Sat, 16 May 2009 11:36:57 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/linux/yum/yum_conf/</guid>
		<description><![CDATA[yum の設定ファイル yum.conf yum の設定ファイルは etc 直下にある。ManYumConf で詳細を確認することができる。デフォルトの yum.conf は以下のとおり。 [root@centos ~]# cat /etc/yum.conf [main] cachedir=/var/cache/yum keepcache=0 debuglevel=2 logfile=/var/log/yum.log distroverpkg=redhat-release tolerant=1 exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 # Note: yum-RHN-plugin doesn't honor this. metadata_expire=1h installonly_limit = 5 # PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d 「PUT YOUR REPOS HERE OR IN [...]]]></description>
			<content:encoded><![CDATA[<h3>yum の設定ファイル yum.conf</h3>
<p>yum の設定ファイルは etc 直下にある。<a href="http://wiki.linux.duke.edu/ManYumConf?action=fullsearch&amp;value=linkto%3A%22ManYumConf%22&amp;context=180">ManYumConf</a> で詳細を確認することができる。デフォルトの yum.conf は以下のとおり。</p>
<div class="command">
<pre>[root@centos ~]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

installonly_limit = 5

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d</pre>
</div>
<p>「PUT YOUR REPOS HERE OR IN separate files named file.repo in /etc/yum.repos.d」 とあるように、yum.conf 内か、/etc/yum.repos.d ディレクトリに .repo ファイルを置くことで、yum が参照するリポジトリを追加することができる。</p>
<h3>yum の設定ファイル /etc/yum.repos.d 以下の .repos</h3>
<p>CentOS 5.3 に最初から入っている CentOS-Base.repos ファイルの例。大体の構造をつかめればと。詳細は、<a href="http://wiki.linux.duke.edu/ManYumConf">yum の wiki</a> で確認することができる。</p>
<div class="command">
<pre>[root@centos ~]# cat /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5</pre>
</div>
<p><a href="http://wiki.linux.duke.edu/ManYumConf">ManYumConf</a> から意味を確認。最初のコメント部分の意味は一番下で*1</p>
<h4>name </h4>
<p>A human readable string describing the repository.</p>
<p>人間がリポジトリを判別するための名前を指定。</p>
<h4>mirrorlist</h4>
<p>Specifies a URL to a file containing a list of baseurls. This can be used instead of or with the baseurl option. Substitution variables, described below, can be used with this option.</p>
<p>baseurls リストを含むファイルへのパスを指定します。mirrorlist は baseurls のオプションとして、代わりに指定したり、一緒に使用します。</p>
<h4>baseurl</h4>
<p>Must be a URL to the directory where the yum repository&#8217;s &#8216;repodata&#8217; directory lives. Can be an http:// ftp:// or file:// URL. You can specify multiple URLs in one baseurl statement. The best way to do this is like this: [repositoryid] name=Some name for this repository baseurl=url://server1/path/to/repository/</p>
<ul>
<li>
<p>url://server2/path/to/repository/ url://server3/path/to/repository/</p>
</li>
</ul>
<p>If you list more than one baseurl= statement in a repository you will find yum will ignore the earlier ones and probably act bizarrely. Don&#8217;t do this, you&#8217;ve been warned.</p>
<p>yum リポジトリの repodata ディレクトリを指定します。http://, ftp://, file:// で指定します。1つの baseurl で複数の URL を指定することもできます。また、複数 baseurl を記述すると動作がおかしくなることがあります。</p>
<h4>gpgcheck</h4>
<p>GPG署名のチェックを行うかどうかの指定をします。0 か 1 で指定します。</p>
<h4>enabled</h4>
<p>Either &#8217;1&#8242; or &#8217;0&#8242;. This tells yum whether or not use this repository.</p>
<p>このリポジトリを使うかどうかを指定します。0 か 1 で指定します。</p>
<h4>gpgkey</h4>
<p>repository. This option is used if yum needs a public key to verify a package and the required key hasn&#8217;t been imported into the RPM database. If this option is set, yum will automatically import the key from the specified URL. You will be prompted before the key is installed unless the assumeyes option is set.</p>
<p>このオプションは、yum がパッケージの検証を行うのに公開キーを必要とる場合に、要求したキーが RPM データベースにインポートされていない場合に使用されます。このオプションを設定すると、yum は自動的に指定した URL から該当のキーをインポートします。キーがインストールされる前に、yes を入力するまでメッセージが表示されます。</p>
<h4>exclude</h4>
<p>デフォルトの CentOS-Base.repos には入っていないけど、よく使うオプション。</p>
<p>List of packages to exclude from updates or installs. This should be a space separated list. Shell globs using wildcards (eg. * and ?) are allowed.</p>
<p>アップデートやインストールから除外するパッケージを指定します。これは、スペースで区切って複数指定することができます。ワイルドカードの指定が可能です。</p>
<hr />
<p>*1 CentOS-Base.repo の最初のコメント部分の訳</p>
<blockquote>
<p>This file uses a new mirrorlist system developed by Lance Davis for CentOS. The mirror system uses the connecting IP address of the client and the update status of each mirror to pick mirrors that are updated to and<br />
    <br />geographically close to the client.&#160; You should use this for CentOS updates unless you are manually picking other mirrors.&#160; <br />If the mirrorlist= does not work for you, as a fall back you can try the remarked out baseurl= line instead. </p>
</blockquote>
<p>「このファイルは、Lance Davis が CentOS のために開発した新しいミラーリストシステムです。このミラーシステムは、更新されており、かつ地理的に近いミラーを探すために、クライアントの IP アドレスとミラーのアップデートステータスを使います。 手動で他のミラーを探すことなく、 CentOS をアップデートすることができます。もしこのミラーリストが動作しないことがあれば、、、※この文がよくわからず、、」</p>
<p>参考にしたサイト</p>
<p><a href="http://wiki.linux.duke.edu/ManYumConf">ManYumConf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/linux/yum/yum_conf.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>yum の概要とコマンド</title>
		<link>http://www.a-magic-web.com/server_linux/linux/yum/about_yum.html</link>
		<comments>http://www.a-magic-web.com/server_linux/linux/yum/about_yum.html#comments</comments>
		<pubDate>Sat, 16 May 2009 11:35:53 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/linux/yum/about_yum/</guid>
		<description><![CDATA[yum とは yum の公式サイトを覗いてみました→yumによると、RPM パッケージの管理システムの一つで、アプリケーションの依存関係を自動的に検出する機能を持っているもの、とのこと。*1 使えそうな yum のコマンド yum install, yum remove 以外で、使えそうなものをまとめてみました。man とか ?help でみればよいのでしょうが、WEB では「Basic Yum Commands and how to use them」で確認することもできるようです。 yum list installed このコマンドは rpm の rpm ?qa と同等のコマンドで、システムにインストールされている全てのパッケージを表示します。 yum info パッケージ名 パッケージの詳細な情報を表示します。 [root@centos ~]# yum info httpd (省略) Name : httpd Arch : i386 Version : 2.2.3 Release : 22.el5.centos [...]]]></description>
			<content:encoded><![CDATA[<h3>yum とは</h3>
<p>yum の公式サイトを覗いてみました→<a href="http://yum.baseurl.org/">yum</a>によると、RPM パッケージの管理システムの一つで、アプリケーションの依存関係を自動的に検出する機能を持っているもの、とのこと。*1</p>
<h2>使えそうな yum のコマンド</h2>
<p>yum install, yum remove 以外で、使えそうなものをまとめてみました。man とか ?help でみればよいのでしょうが、WEB では「<a href="http://yum.baseurl.org/wiki/YumCommands">Basic Yum Commands and how to use them</a>」で確認することもできるようです。</p>
<h3>yum list installed</h3>
<p>このコマンドは rpm の rpm ?qa と同等のコマンドで、システムにインストールされている全てのパッケージを表示します。</p>
<h3>yum info パッケージ名</h3>
<p>パッケージの詳細な情報を表示します。</p>
<div class="command">
<pre>[root@centos ~]# yum info httpd
(省略)
Name       : httpd
Arch       : i386
Version    : 2.2.3
Release    : 22.el5.centos
Size       : 3.1 M
Repo       : installed
Summary    : Apache HTTP Server
URL        : http://httpd.apache.org/
License    : Apache Software License
Description: The Apache HTTP Server is a powerful, efficient, and extensible web server.</pre>
</div>
<h3>yum search キーワード</h3>
<p>設定されているリポジトリから、キーワードで検索をおこなう。検索対象は、リポジトリ内のRPMファイルのName、Packager、Dummary、Descriptionの各フィールド 。複数のキーワードも可。</p>
<hr />
<p>*1 yum の公式サイトの一番最初に書いてある。</p>
<blockquote>
<p>Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. Yum has a plugin interface for adding simple features. Yum can also be used from other python programs via its module inteface.</p>
<p><a href="http://yum.baseurl.org/">yum</a></p>
</blockquote>
<blockquote>
<p>Yum は、rpm システムの自動アップデート、インストール、アンインストールを行うものです。依存関係を自動的に算出し、インストールパッケージに何が起こるかを検出します。rpm を使った手動アップデートを行うことなく、複数のマシーンの保守をより簡単にすることができます。</p>
<p>Yum はシンプルな機能を追加するためのプラグインインターフェイスをもっています。Yum はモジュールインターフェイスを経由して、python プログラムから使うこともできます。</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/linux/yum/about_yum.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux (CentOS) のホスト名の変更</title>
		<link>http://www.a-magic-web.com/server_linux/linux/basics/change_hostname.html</link>
		<comments>http://www.a-magic-web.com/server_linux/linux/basics/change_hostname.html#comments</comments>
		<pubDate>Sat, 16 May 2009 05:21:04 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[基礎]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/linux_basics/change_hostname/</guid>
		<description><![CDATA[Linux (RedHat系) では、2つファイルを変更する必要があるようです。 /etc/hosts [root@centos ~]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 centos.com centos localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 /etc/sysconfig/network [root@centos ~]# cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=centos.com GATEWAY=192.168.0.1 [root@centos ~]# 参考にしたサイト ITmedia エンタープライズ : Linux Tips ホスト名を変更したい]]></description>
			<content:encoded><![CDATA[<p>Linux (RedHat系) では、2つファイルを変更する必要があるようです。</p>
<h3>/etc/hosts</h3>
<div class="command">
<pre>[root@centos ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               centos.com centos localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6</pre>
</div>
<h3>/etc/sysconfig/network</h3>
<div class="command">
<pre>[root@centos ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=centos.com
GATEWAY=192.168.0.1
[root@centos ~]#</pre>
</div>
<hr />
<p>参考にしたサイト</p>
<p><a href="http://www.itmedia.co.jp/help/tips/linux/l0434.html">ITmedia エンタープライズ : Linux Tips ホスト名を変更したい</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/linux/basics/change_hostname.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux のネットワーク設定</title>
		<link>http://www.a-magic-web.com/server_linux/linux/basics/linux_network_config.html</link>
		<comments>http://www.a-magic-web.com/server_linux/linux/basics/linux_network_config.html#comments</comments>
		<pubDate>Wed, 13 May 2009 04:06:25 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[基礎]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/linux_basics/linux_network_config/</guid>
		<description><![CDATA[IP などを変更したいとき用の設定方法。/etc/sysconfig/network-scripts/ifcfg-eth0 を編集する。 [root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.16.10 NETMASK=255.255.255.0 GATEWAY=192.168.16.2 ONBOOT=yes # HWADDR=00:0c:29:01:e3:47 設定を反映させるために、ネットワークサービスを再起動する。 /etc/init.d/network restart]]></description>
			<content:encoded><![CDATA[<p>IP などを変更したいとき用の設定方法。/etc/sysconfig/network-scripts/ifcfg-eth0 を編集する。</p>
<div class="command">
<pre>[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.16.10
NETMASK=255.255.255.0
GATEWAY=192.168.16.2
ONBOOT=yes
# HWADDR=00:0c:29:01:e3:47</pre>
</div>
<p>設定を反映させるために、ネットワークサービスを再起動する。</p>
<div class="command">
<pre> /etc/init.d/network restart</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/linux/basics/linux_network_config.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sudo の設定</title>
		<link>http://www.a-magic-web.com/server_linux/linux/linux_users_groups/sudo_only.html</link>
		<comments>http://www.a-magic-web.com/server_linux/linux/linux_users_groups/sudo_only.html#comments</comments>
		<pubDate>Tue, 12 May 2009 15:37:26 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[ユーザー・グループ]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/linux_users_groups/sudo_only/</guid>
		<description><![CDATA[普段触るのは検証とかテスト用の環境だけだけれど、誤操作防止のために su &#8211; を使わない方法も試してみようと思い立った。sudo することを許可する設定がまず必要。 sudo 設定 visudo コマンドを使って、/etc/sudoers を編集して、sudo を許可するアカウントを追加する。編集の仕方は vi と一緒。 書式は「アカウント 許可するホスト = (許可する権限) 許可するコマンド 」 &#160; [root@centos ~]# visudo (省略） ## Next comes the main part: which users can run what software on ## which machines (the sudoers file can be shared between multiple ## systems). ## Syntax: ## ## user [...]]]></description>
			<content:encoded><![CDATA[<p>普段触るのは検証とかテスト用の環境だけだけれど、誤操作防止のために su &#8211; を使わない方法も試してみようと思い立った。sudo することを許可する設定がまず必要。</p>
<h2>sudo 設定</h2>
<p>visudo コマンドを使って、/etc/sudoers を編集して、sudo を許可するアカウントを追加する。編集の仕方は vi と一緒。</p>
<p>書式は「アカウント 許可するホスト = (許可する権限) 許可するコマンド 」</p>
<p>&#160;</p>
<div class="command">
<pre>[root@centos ~]# visudo
(省略）
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
##      user    MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
<span style="color: red">centos  ALL=(ALL)       ALL</span></pre>
</div>
<h2>sudo のみにして su を禁止する</h2>
<p>/etc/pam.d/su を編集して、以下の # を削除。</p>
<div class="command">
<pre>[root@centos ~]# vi /etc/pam.d/su
<span style="color: red">#</span> pam_wheel.so use_uid</pre>
</div>
<p>これで、sudo しか使えない状態に。</p>
<hr />
<p>参考にしたサイト</p>
<p><a href="http://www.ep.sci.hokudai.ac.jp/~epwww/dvlop/sudo.html">sudo の設定</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/linux/linux_users_groups/sudo_only.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ユーザーの作成・削除・変更</title>
		<link>http://www.a-magic-web.com/server_linux/linux/linux_users_groups/linux_usersadd_usermod_userdel.html</link>
		<comments>http://www.a-magic-web.com/server_linux/linux/linux_users_groups/linux_usersadd_usermod_userdel.html#comments</comments>
		<pubDate>Tue, 12 May 2009 15:23:58 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[ユーザー・グループ]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/linux_users_groups/linux_usersadd_usermod_userdel/</guid>
		<description><![CDATA[ユーザーの作成 ユーザーの作成には、useradd コマンドを使用。passwd コマンドでパスワードを加えることで初めて使用できるようになる。ユーザーのデフォルト設定は useradd&#160; -D で確認することができる。 [root@centos ~]# useradd centos[root@centos ~]# passwd centosChanging password for user centos. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. [root@centos ~]# ユーザーの削除（根こそぎ） ユーザーの削除は userdel だけど、ユーザーが所有していたファイルはそのまま残る。userdel ?r でホームディレクトリのファイルとメールスプールも削除される。 [root@centos ~]# userdel centos -r その他の場所のユーザーが所有していたファイルやディレクトリも削除したい場合は、削除を行う前にユーザーの uid を確認して、find コマンドで該当の uid が所有者となっているファイルを検索し、何か出てきたら rm -f とか rm -rf [...]]]></description>
			<content:encoded><![CDATA[<h2>ユーザーの作成</h2>
<p>ユーザーの作成には、useradd コマンドを使用。passwd コマンドでパスワードを加えることで初めて使用できるようになる。ユーザーのデフォルト設定は useradd&#160; -D で確認することができる。</p>
<div class="command">
<pre>[root@centos ~]# useradd<font face="Arial"> centos</font>[root@centos ~]# passwd centosChanging password for user centos.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@centos ~]#</pre>
</div>
<h2>ユーザーの削除（根こそぎ）</h2>
<p>ユーザーの削除は userdel だけど、ユーザーが所有していたファイルはそのまま残る。userdel ?r でホームディレクトリのファイルとメールスプールも削除される。</p>
<div class="command">
<pre>[root@centos ~]# userdel centos -r</pre>
</div>
<p>その他の場所のユーザーが所有していたファイルやディレクトリも削除したい場合は、削除を行う前にユーザーの uid を確認して、find コマンドで該当の uid が所有者となっているファイルを検索し、何か出てきたら rm -f とか rm -rf とかで消す。</p>
<div class="command">
<pre>[root@centos ~]# cat /etc/passwd
（省略）
centos:x:501:501::/home/user02:/bin/bash
[root@centos ~]# find / -uid 501</pre>
</div>
<h2>ユーザーをグループに追加</h2>
<p>ユーザーをグループに追加するには、ユーザーの属性を変更する usermod コマンドで ?G グループの変更オプションを使用</p>
<div class="command">
<pre>[root@centos ~]# usermod -G wheel user</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/linux/linux_users_groups/linux_usersadd_usermod_userdel.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ダウンロードしたデータの整合性をハッシュで確認</title>
		<link>http://www.a-magic-web.com/server_linux/linux/basics/hash_how_to_use.html</link>
		<comments>http://www.a-magic-web.com/server_linux/linux/basics/hash_how_to_use.html#comments</comments>
		<pubDate>Tue, 12 May 2009 13:59:20 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[基礎]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/linux_basics/%e3%83%80%e3%82%a6%e3%83%b3%e3%83%ad%e3%83%bc%e3%83%89%e3%81%97%e3%81%9f%e3%83%87%e3%83%bc%e3%82%bf%e3%81%ae%e6%95%b4%e5%90%88%e6%80%a7%e3%82%92%e3%83%8f%e3%83%83%e3%82%b7%e3%83%a5%e3%81%a7%e7%a2%ba/</guid>
		<description><![CDATA[このまえ、wget でダウンロードしたデータが破損していて、インストールできないということがあった。たまたま、そのサイトにはハッシュ値が載せられていたので、さっと確認できたらいいなと思って調べてみました。 ハッシュ値の計算には openssl コマンドを使います。 ファイル名のハッシュ値 たとえば、shadow ファイルのハッシュ値だと # cat /etc/shadow &#124;openssl md5 文字列のハッシュ値の計算 たとえば、hogehoge のハッシュ値は $ echo hogehoge&#124;openssl md5 d9a3fdfc7ca17c47ed007bed5d2eb873 こんな感じ 参考にしたサイト ＩＴpro : 原理から学ぶネットワーク・セキュリティ 第4回 ハッシュ関数]]></description>
			<content:encoded><![CDATA[<p>このまえ、wget でダウンロードしたデータが破損していて、インストールできないということがあった。たまたま、そのサイトにはハッシュ値が載せられていたので、さっと確認できたらいいなと思って調べてみました。</p>
<p>ハッシュ値の計算には openssl コマンドを使います。</p>
<h3>ファイル名のハッシュ値 </h3>
<p> たとえば、shadow ファイルのハッシュ値だと
<div class="command">
<pre># cat /etc/shadow |openssl md5</pre>
</div>
<h3>文字列のハッシュ値の計算 </h3>
<p>たとえば、hogehoge のハッシュ値は </p>
<div class="command">
<pre>$ echo hogehoge|openssl md5
d9a3fdfc7ca17c47ed007bed5d2eb873</pre>
</div>
<p>こんな感じ</p>
<hr />
<p>参考にしたサイト</p>
<p><a href="http://itpro.nikkeibp.co.jp/article/COLUMN/20071031/286012/">ＩＴpro : 原理から学ぶネットワーク・セキュリティ 第4回 ハッシュ関数</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/linux/basics/hash_how_to_use.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS インストール後のログ</title>
		<link>http://www.a-magic-web.com/server_linux/linux/basics/install_log.html</link>
		<comments>http://www.a-magic-web.com/server_linux/linux/basics/install_log.html#comments</comments>
		<pubDate>Thu, 07 May 2009 13:09:39 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[基礎]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/build/install_log/</guid>
		<description><![CDATA[CentOS インストール後のログは以下の場所に吐き出されるようです。 /root/install.log /root/install.log.syslog /var/log/anaconda.log /var/log/anaconda.syslog /root/install.log の警告 warning: setup-2.5.58-4.el5: Header V3 DSA signature: NOKEY, key ID e8562897 という警告が発生しているのですが、これがなになのかさっぱり。。OS 自体は正常に動いているようなので、問題なさそうなのですが、ほとんど情報がありません。 That just means the key has nor been registered with the system should be no problem it more of a warning then an error http://www.linuxforums.org/forum/suse-linux-help/126610-header-v3-dsa-signature-nokey-key-id-58857177-a.html とか It&#8217;s not an error, it&#8217;s a warning. Warnings don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>CentOS インストール後のログは以下の場所に吐き出されるようです。</p>
<ul>
<li>/root/install.log </li>
<li>/root/install.log.syslog </li>
<li>/var/log/anaconda.log </li>
<li>/var/log/anaconda.syslog </li>
</ul>
<h2>/root/install.log の警告</h2>
<h3>warning: setup-2.5.58-4.el5: Header V3 DSA signature: NOKEY, key ID e8562897</h3>
<p>という警告が発生しているのですが、これがなになのかさっぱり。。OS 自体は正常に動いているようなので、問題なさそうなのですが、ほとんど情報がありません。</p>
<blockquote><p>That just means the key has nor been registered with the system should be no problem it more of a warning then an error</p>
<p><a href="http://www.linuxforums.org/forum/suse-linux-help/126610-header-v3-dsa-signature-nokey-key-id-58857177-a.html">http://www.linuxforums.org/forum/suse-linux-help/126610-header-v3-dsa-signature-nokey-key-id-58857177-a.html</a></p>
</blockquote>
<p>とか</p>
<blockquote><p>It&#8217;s not an error, it&#8217;s a warning. Warnings don&#8217;t prevent commands from completing. If the command doesn&#8217;t work, look for an actual <b>error</b> message in the output.      <br />You can clear the warning by importing the GPG key used to sign the package: <a href="http://www.fedorafaq.org/#gpgsig">http://www.fedorafaq.org/#gpgsig</a></p>
<p><a href="http://forums.fedoraforum.org/showthread.php?t=98356">http://forums.fedoraforum.org/showthread.php?t=98356</a></p>
</blockquote>
<p>とあったりするのですが、何をもって問題ないのかがよくわからず。。GPG キーをインポートすれば、とありますが、GPGって何？</p>
<p>進めば進むほどわからないことが増えています。。。</p>
</p>
<hr />
<p>参考にしたページ</p>
<p>Think IT : ログ管理、これだけは！第1回：必読！ログファイルとディレクトリ    <br /><a href="http://thinkit.jp/article/711/3/">http://thinkit.jp/article/711/3/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/linux/basics/install_log.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
