<?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; WEBサーバー・Linux</title>
	<atom:link href="http://www.a-magic-web.com/server_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>Apache,PHP,MySQLテストサーバー構築手順(beta)</title>
		<link>http://www.a-magic-web.com/server_linux/build/apachephpmysql_build_beta.html</link>
		<comments>http://www.a-magic-web.com/server_linux/build/apachephpmysql_build_beta.html#comments</comments>
		<pubDate>Sat, 27 Feb 2010 17:18:16 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[構築（テスト環境）]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/?p=654</guid>
		<description><![CDATA[テストサーバーを作り直したので、メモを残します。テストサーバーは Vmware Server 上に仮想サーバーとして作成しました。物理環境でも手順は変わらないはず。手早く構築するために手順は最低限にしています。 テスト環境構築フロー - Vmware イメージ作成 - CentOS5.4 インストール - ネットワーク設定 - セキュリティ関係停止 - ユーザー作成 - FTP インストール - Apache インストール - Bind インストール - PHPインストール - MySQL インストール - Virtual ホスト設定 - phpMyadmin インストール Vmware ゲストOS作成 使用している Vmware Server は 1.x 系。2.x 系が使いづらかったのと、職場の環境が VMware Workstion とほぼ同じインターフェースなので。普通にゲスト OSを作成。 - Guset oprating system : [...]]]></description>
			<content:encoded><![CDATA[<p>テストサーバーを作り直したので、メモを残します。テストサーバーは Vmware Server 上に仮想サーバーとして作成しました。物理環境でも手順は変わらないはず。手早く構築するために手順は最低限にしています。</p>
<h3>テスト環境構築フロー</h3>
<blockquote><p>- Vmware イメージ作成<br />
- CentOS5.4 インストール<br />
- ネットワーク設定<br />
- セキュリティ関係停止<br />
- ユーザー作成<br />
- FTP インストール<br />
- Apache インストール<br />
- Bind インストール<br />
- PHPインストール<br />
- MySQL インストール<br />
- Virtual ホスト設定<br />
- phpMyadmin インストール</p></blockquote>
<h3>Vmware ゲストOS作成</h3>
<p>使用している Vmware Server は 1.x 系。2.x 系が使いづらかったのと、職場の環境が VMware Workstion とほぼ同じインターフェースなので。普通にゲスト OSを作成。</p>
<blockquote><p>- Guset oprating system : Linux で<br />
- Version : Red Hat Enterprise Linux 4<br />
- ネットワークは bridge でも NAT でも用途に合わせて<br />
- サイズは適当に10から20GB程度</p></blockquote>
<p>スナップショットを利用すると、後から仮想ディスクの容量を増やすことができなくなるため、多めに。</p>
<blockquote><p>- Allocate all disk now :</p></blockquote>
<p>ここにチェックを入れてしまうと、作成に時間がかかるのと、指定したサイズ分物理ディスクを使ってしまう。上で指定した10-20GB使われると困るので、オフにする。</p>
<h3>CentOS インストール</h3>
<p>GUI インストールで全てデフォルト。ネットワークも後で設定するのでそのまま。</p>
<h3>ネットワーク設定</h3>
<p>IP を変えると SSH などの接続も切れてしまうので、VMware のコンソールで直接操作。VMware のネットワーク設定を NAT にしている場合は、[Host] → [Virtual Network Settings] → [NAT] タブから、所属しているネットワーク、ゲートウェイ、サブネットマスクを確認。</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</pre>
</div>
<p>適用させるために、サービス再起動。</p>
<p>[root@localhost ~]# service network restart</p>
<h3>セキュリティ関係停止</h3>
<p>開発の時に邪魔になるセキュリティ関連の機能を停止します。</p>
<h4>iptables の停止</h4>
<div class="command">
<pre>[root@localhost ~]# service iptables status</pre>
</div>
<p>ステータスを確認して、なんかいっぱい出てきたら動いてる。動いてたら停止。</p>
<div class="command">
<pre>[root@localhost ~]# service iptables stop
ファイアウォールルールを適用中:                            [  OK  ]
チェインポリシーを ACCEPT に設定中filter                   [  OK  ]
iptables モジュールを取り外し中
[root@localhost ~]# chkconfig iptables off
[root@localhost ~]# chkconfig --list iptables
iptables        0:off   1:off   2:off   3:off   4:off   5:off   6:off</pre>
</div>
<h4>SElinux の停止</h4>
<p>getenforce が SELinux の状態確認で、Permisive が停止状態。自動起動の停止は sysconfig の selinux を編集する。</p>
<div class="command">
<pre>[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
[root@localhost ~]# vi /etc/sysconfig/selinux
SELINUX=disabled</pre>
</div>
<h4>yum-updatesd の削除</h4>
<p><a href="http://centossrv.com/centos5-init.shtml">centossrv.com</a> によると、「デフォルトで1時間ごとにアップデートチェックを行うようになっており、手動によるパッケージインストールと競合するとインストールが失敗する」 とのことなので、早々に削除。</p>
<div class="command">
<pre>[root@localhost ~]# /etc/rc.d/init.d/yum-updatesd stop
yum-updates 停止中:                                      [  OK  ]
[root@localhost ~]# yum -y remove yum-updatesd</pre>
</div>
<h3>ユーザー作成</h3>
<p>作業用に root 以外のユーザーを作成。ユーザーの作成には、useradd コマンドを使用。passwd コマンドでパスワードを加えることで初めて使用できるようになる。</p>
<div class="command">
<pre>[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.</pre>
</div>
<h3>FTP &#8211; vsftpd</h3>
<div class="command">
<pre>[root@centos ~]# yum -y install vsftpd</pre>
</div>
<p>設定は、アスキーモードでの転送と、ディレクトリの削除を可能にするだけ。</p>
<div class="command">
<pre>[root@centos ~]# vi /etc/vsftpd/vsftpd.conf
ascii_upload_enable=YES
ascii_download_enable=YES
ls_recurse_enable=YES</pre>
</div>
<p>起動、自動起動の設定。終わったら、FTPクライアントから接続してみる。</p>
<div class="command">
<pre>[root@centos ~]# /etc/rc.d/init.d/vsftpd start
[root@centos ~]# chkconfig vsftpd on
[root@localhost ~]# chkconfig --list vsftpd
vsftpd          0:off   1:off   2:off   3:off   4:off   5:off   6:off</pre>
</div>
<h3>Apache</h3>
<div class="command">
<pre>[root@centos ~]# yum -y install httpd</pre>
</div>
<p>設定は、CGI、SSI、.htaccess の許可のみ。Virtual host の設定は後から。</p>
<div class="command">
<pre>[root@centos ~]# vi /etc/httpd/conf/httpd.conf
&lt;Directory "/var/www/html"&gt;
Options Includes ExecCGI FollowSymLinks
AllowOverride All</pre>
</div>
<p>テストページの削除。</p>
<div class="command">
<pre>[root@centos ~]# rm -f /etc/httpd/conf.d/welcome.conf
[root@centos ~]# rm -f /var/www/error/noindex.html</pre>
</div>
<p>ドキュメントルートの所有者を作業用ユーザーに変更。</p>
<div class="command">
<pre>[root@localhost ~]# chown centos:centos /var/www/html</pre>
</div>
<p>起動、自動起動の設定。</p>
<div class="command">
<pre>[root@localhost ~]# service httpd start
httpd を起動中:                                            [  OK  ]
[root@centos ~]# chkconfig httpd on
[root@localhost ~]# chkconfig --list httpd
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off</pre>
</div>
<p>テストしてみる。以下を実行して、ブラウザからサーバーのIPにアクセス。</p>
<div class="command">
<pre>[root@centos ~]# echo test &gt;&gt; /var/www/html/index.html</pre>
</div>
<h3>BIND</h3>
<p><a href="http://www.a-magic-web.com/server_linux/bind/bind-install.html">BIND インストールと設定</a></p>
<h3>PHPとMySQLとphpMyadminのインストール</h3>
<p><a href="http://www.a-magic-web.com/server_linux/mysql/mysql5-1_php5-3.html">CentOS5.4 に MySQL5.1,PHP5.3とphpMyAdmin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/build/apachephpmysql_build_beta.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS5.4 に MySQL5.1,PHP5.3とphpMyAdmin</title>
		<link>http://www.a-magic-web.com/server_linux/mysql/mysql5-1_php5-3.html</link>
		<comments>http://www.a-magic-web.com/server_linux/mysql/mysql5-1_php5-3.html#comments</comments>
		<pubDate>Sat, 27 Feb 2010 16:33:54 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/?p=652</guid>
		<description><![CDATA[MySQL、PHP、phpMyAdminのインストールから、Wordpress用のデータベース作成まで。 最新版を入れるため、yumのリポジトリをインストールして変更する。依存関係を解消しながらインストールするより、yum を使った方がずっと楽。 インストール [root@localhost ~]# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm [root@localhost ~]# wget http://rpms.famillecollet.com/el5.i386/remi-release-5-6.el5.remi.noarch.rpm [root@localhost ~]# rpm -Uvh epel-release-5* remi-release-5* [root@localhost ~]# wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm [root@localhost ~]# rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm インストールする。 [root@localhost ~]# yum --enablerepo=remi,epel,rpmforge update php* mysql* [root@localhost ~]# yum --enablerepo=remi,epel,rpmforge install php php-gd php-mbstring php-mysql php-odbc php-pdo php-pear mysql-server mysql-bench phpMyadmin のインストール。 # yum --enablerepo=remi,epel,rpmforge install [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL、PHP、phpMyAdminのインストールから、Wordpress用のデータベース作成まで。</p>
<p>最新版を入れるため、yumのリポジトリをインストールして変更する。依存関係を解消しながらインストールするより、yum を使った方がずっと楽。</p>
<h3>インストール</h3>
<div class="command">
<pre>[root@localhost ~]# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
[root@localhost ~]# wget http://rpms.famillecollet.com/el5.i386/remi-release-5-6.el5.remi.noarch.rpm
[root@localhost ~]# rpm -Uvh epel-release-5* remi-release-5*

[root@localhost ~]# wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
[root@localhost ~]# rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm</pre>
</div>
<p>インストールする。</p>
<div class="command">
<pre>[root@localhost ~]# yum --enablerepo=remi,epel,rpmforge update php* mysql*
[root@localhost ~]# yum --enablerepo=remi,epel,rpmforge install php php-gd php-mbstring php-mysql php-odbc php-pdo php-pear mysql-server mysql-bench</pre>
</div>
<p>phpMyadmin のインストール。</p>
<div class="command">
<pre># yum --enablerepo=remi,epel,rpmforge install phpMyAdmin</pre>
</div>
<h3>PHPの動作確認</h3>
<p>apacheの再起動</p>
<div class="command">
<pre>[root@localhost ~]# service httpd restart</pre>
</div>
<p>phpinfo を表示してみる。一緒にインストールしたモジュールの項目が表示されていることを確認。</p>
<div class="command">
<pre>[root@centos ~]# vi /var/www/html/test.php</pre>
</div>
<h3>MySQL 設定</h3>
<p>設定は文字コードのみ。</p>
<div class="command">
<pre>[root@centos ~]# vi /etc/my.cnf
[mysqld]
default-character-set = utf8
[mysql]
default-character-set = utf8</pre>
</div>
<p>起動、自動起動設定</p>
<div class="command">
<pre>[root@centos ~]# service mysqld start
[root@centos ~]# chkconfig mysqld on
[root@localhost ~]# chkconfig --list mysqld
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off</pre>
</div>
<p>mysql の root にパスワードを設定する。OS自体のユーザーとは別もの。まずは、パスワードを設定するユーザーを確認。</p>
<div class="command">
<pre>[root@centos ~]# mysql -u root
mysql&gt; select user,host,password from mysql.user;
+-------------+-----------------------+-------------------------------------------+
| user        | host                  | password                                  |
+-------------+-----------------------+-------------------------------------------+
| root        | localhost             |                                           |
| root        | localhost.localdomain |                                           |
| root        | 127.0.0.1             |                                           |
|             | localhost             |                                           |
|             | localhost.localdomain |                                           |
+-------------+-----------------------+-------------------------------------------+</pre>
</div>
<p>root にパスワードを設定。</p>
<div class="command">
<pre>mysql&gt; set password for root@localhost=password('パスワード');
mysql&gt; set password for root@localhost.localdomain=password('パスワード');
mysql&gt; set password for root@127.0.0.1=password('パスワード');</pre>
</div>
<p>mysql のrootにパスワードが設定されたことを確認。</p>
<div class="command">
<pre>mysql&gt; select user,host,password from mysql.user;
+-------------+-----------------------+-------------------------------------------+
| user        | host                  | password                                  |
+-------------+-----------------------+-------------------------------------------+
| root        | localhost             | *0B6A2F2B175B57F40643A0377BE9274ACB964C44 |
| root        | localhost.localdomain | *0B6A2F2B175B57F40643A0377BE9274ACB964C44 |
| root        | 127.0.0.1             | *0B6A2F2B175B57F40643A0377BE9274ACB964C44 |
+-------------+-----------------------+-------------------------------------------+</pre>
</div>
<p>サンプルデータベース削除。</p>
<div class="command">
<pre>[root@centos ~]# mysql -u root -p
mysql&gt; show databases;
mysql&gt; drop database test;
mysql&gt; show databases;</pre>
</div>
<h3>wordpress 用のデータベース作成</h3>
<div class="command">
<pre>[root@centos ~]# mysql -u root -p
mysql&gt; create database wordpress;
mysql&gt; grant all privileges on wordpress.* to wordpress@localhost identified by 'パスワード';</pre>
</div>
<h3>phpMyAdmin を使う</h3>
<p>yum でインストールした phpMyadmin は以下にインストールされる。</p>
<blockquote><p>/usr/share/phpMyAdmin</p></blockquote>
<p>設定はデフォルトのままで使用可能。ただし、ドキュメントルート外にインストールされるので、そのままではアクセスできない。http://phpmyadmin.localhost.com/ でアクセスするため、bind  のレコード追加と、Virtual hostの設定をしてみた。</p>
<h4>Bind 設定</h4>
<div class="command">
<pre>[root@localhost ~]# cat /var/named/chroot/var/named/localhost.com.db
$TTL    86400
@       IN      SOA     localhost.com.  root.localhost.com.(
                                      2004031901 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN NS    localhost.com.
        IN MX 10 localhost.com.
@       IN A     192.168.0.250
<span style="color: #ff0000;">phpmyadmin      IN A    192.168.0.250</span>
*       IN A     192.168.0.250</pre>
</div>
<h4>Virtual host の設定</h4>
<div class="command">
<pre>NameVirtualHost *:80
&lt;VirtualHost *:80&gt;
    ServerAdmin root@localhost.com
    DocumentRoot /usr/share/phpMyAdmin/
    ServerName phpmyadmin.localhost.com
  &lt;Directory "/usr/share/phpMyAdmin"&gt;
    AllowOverride All
    Allow from All
  &lt;/Directory&gt;
&lt;/VirtualHost&gt;</pre>
</div>
<pre>参考記事</pre>
<pre><a href="http://a98.jugem.jp/?eid=371">CentOS 5.3 に php-5.2.9, mysql-5.1.35 をインストール</a></pre>
<pre><a href="http://a98.jugem.jp/?eid=371">データベースサーバー構築(MySQL)</a></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/mysql/mysql5-1_php5-3.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BIND インストールと設定</title>
		<link>http://www.a-magic-web.com/server_linux/bind/bind-install.html</link>
		<comments>http://www.a-magic-web.com/server_linux/bind/bind-install.html#comments</comments>
		<pubDate>Sat, 27 Feb 2010 15:38:37 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[BIND]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/bind/bind-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%a8%e8%a8%ad%e5%ae%9a.html</guid>
		<description><![CDATA[テストサーバーを構築した時のメモ。CentOS5.4 。公開サーバーではないので、外部向けの設定は行っていません。 インストール [root@centos ~]# yum -y install bind bind-chroot caching-nameserver BIND設定ファイル所有グループ変更。 [root@centos ~]# chgrp named /var/named/chroot/etc/named.conf 色を付けた所を追加。 [root@localhost ~]# vi /var/named/chroot/etc/named.conf // // named.caching-nameserver.conf // // Provided by Red Hat caching-nameserver package to configure the // ISC BIND named(8) DNS server as a caching only nameserver // (as a localhost DNS resolver only). // [...]]]></description>
			<content:encoded><![CDATA[<p>テストサーバーを構築した時のメモ。CentOS5.4 。公開サーバーではないので、外部向けの設定は行っていません。</p>
<h3>インストール</h3>
<div class="command">
<pre>[root@centos ~]# yum -y install bind bind-chroot caching-nameserver</pre>
</div>
<p>BIND設定ファイル所有グループ変更。</p>
<div class="command">
<pre>[root@centos ~]# chgrp named /var/named/chroot/etc/named.conf</pre>
</div>
<p>色を付けた所を追加。</p>
<div class="command">
<pre>[root@localhost ~]# vi /var/named/chroot/etc/named.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
        <span style="color: #ff0000;">#</span> listen-on port 53 { 127.0.0.1; };
        <span style="color: #ff0000;">#</span> listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";

        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;
        // query-source-v6 port 53;

        allow-query     { localhost; localnets; };
        allow-query-cache { localhost; localnets; };

        <span style="color: #ff0000;">forwarders{
                192.168.0.1;
        };</span>
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { localhost; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
        <span style="color: #ff0000;">include "/etc/named.localhost.com.zone";</span>
};
<span style="color: #ff0000;">view "internal" {
        match-clients { localnets; };
        match-destinations { localnets; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
        include "/etc/named.localhost.com.zone";
};</span></pre>
</div>
<p>ゾーンファイル作成。</p>
<div class="command">
<pre>
[root@localhost ~]# vi /var/named/chroot/etc/named.localhost.com.zone
zone "localhost.com" {
        type master;
        file "localhost.com.db";
};
zone "0.168.192.in-addr.arpa" {
        type master;
        file "0.168.192.in-addr.arpa.db";
};</pre>
</div>
<p>内部向け正引き用ファイル作成。</p>
<div class="command">
<pre>[root@localhost ~]# vi /var/named/chroot/var/named/localhost.com.db
$TTL    86400
@       IN      SOA     localhost.com.  root.localhost.com.(
                                      2004031901 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN NS    localhost.com.
        IN MX 10 localhost.com.
@       IN A     192.168.0.250
*       IN A     192.168.0.250</pre>
</div>
<p>内部向け逆引き用ファイル作成</p>
<div class="command">
<pre>
[root@localhost ~]# vi /var/named/chroot/var/named/0.168.192.in-addr.arpa.db
$TTL    86400
@       IN      SOA     localhost.com.  root.localhost.com.(
                                      2004031901 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
              IN      NS    localhost.com.
250           IN      PTR   localhost.com.</pre>
</div>
<p>起動、自動起動設定</p>
<div class="command">
<pre>[root@localhost ~]# service named start
named を起動中:                                            [  OK  ]
[root@centos ~]# chkconfig named on
[root@localhost ~]# chkconfig --list named
named           0:off   1:off   2:on    3:on    4:on    5:on    6:off</pre>
</div>
<p>nslookup などで、正引き、逆引きを確認。 複数のレコードを設定するときは、ゾーンファイルに zone{} を追加して、参照先のレコードを書いたファイルを作成。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/bind/bind-install.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>会員専用ページに、Apache の Basic 認証を使う</title>
		<link>http://www.a-magic-web.com/server_linux/apatch/htaccess/htaccess_basic_auth.html</link>
		<comments>http://www.a-magic-web.com/server_linux/apatch/htaccess/htaccess_basic_auth.html#comments</comments>
		<pubDate>Wed, 13 Jan 2010 12:17:59 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[.htaccess]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/apatch/htaccess/htaccess_basic_auth.html</guid>
		<description><![CDATA[ほとんどのレンタルサーバーでは Basic 認証を GUI で設定できるツールを用意されていると思いますが、そういった ツールがない環境で設定する機会があったので、メモしておきます。作業はssh で接続して行いました。 設定方法 .htaccess ファイルの作成 [centos@localhost temp]$ vi .htaccess AuthType Basic AuthName "Restricted Files" AuthUserFile /var/www/html/temp/.htpasswd Require user test .htpasswd ファイル（パスワードファイル）の作成 [centos@localhost temp]$ htpasswd -c /var/www/html/temp/.htpasswd test New password: Re-type new password: Adding password for user test 以上の手順だけで、ドキュメントルート以下の temp ディレクトリに Basic 認証をかけることができました。 Basic 認証を昨日させているモジュール Apache 2.1 より前のバージョンでは、mod_auth によって Basic 認証機能が実装されている模様。そのため、Basic [...]]]></description>
			<content:encoded><![CDATA[<p>ほとんどのレンタルサーバーでは Basic 認証を GUI で設定できるツールを用意されていると思いますが、そういった<br />
ツールがない環境で設定する機会があったので、メモしておきます。作業はssh で接続して行いました。</p>
<h3>設定方法</h3>
<p>.htaccess ファイルの作成</p>
<div class="command">
<pre>[centos@localhost temp]$ vi .htaccess
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /var/www/html/temp/.htpasswd
Require user test</pre>
</div>
<p>.htpasswd ファイル（パスワードファイル）の作成</p>
<div class="command">
<pre>[centos@localhost temp]$ htpasswd -c /var/www/html/temp/.htpasswd test
New password:
Re-type new password:
Adding password for user test</pre>
</div>
<p>以上の手順だけで、ドキュメントルート以下の temp ディレクトリに Basic 認証をかけることができました。</p>
<h3>Basic 認証を昨日させているモジュール</h3>
<p>Apache 2.1 より前のバージョンでは、mod_auth によって Basic 認証機能が実装されている模様。そのため、Basic 認証を使うには、httpd.conf で mod_auth.so が読み込まれていることが必要。</p>
<div class="command">
<pre>LoadModule auth_module modules/mod_auth.so</pre>
</div>
<p>Apahe 2.1 以降では、mod_auth_basic モジュールで実装されているようです。今回は Apache 2.0 を使っているので、こちらは確認していません。モジュールのインストールから始める必要のある環境は、通常の WEB サーバーであれば、ほとんどないのではないかと。</p>
<h3>その他必要な設定</h3>
<p>Basic 認証の設定を書き込む場所は、Apache の設定ファイルである httpd.conf に直接書くか、該当のディレクトリに .htaccess ファイルを設置する方法の 2通り。.htaccess を使う場合は、httpd.conf に以下の設定が必要です。</p>
<div class="command">
<pre>AllowOverride AuthConfig</pre>
</div>
<p>もちろん、AllowOverride All でも。 普段は、httpd.conf を触ることはしないので、.htaccess を設置しました。 httpd.conf で設定を行う場合でも、設定項目は同じです。</p>
<h3>使用したディレクティブ</h3>
<blockquote><p>AuthType : ユーザ認証の種類を指定。BasicかDigestを指定。<br />
AuthName : ここで AuthName に指定した文字列が、大部分のブラウザのパスワードダイアログに表示される。<br />
AuthUserFile : 認証に使用するユーザとパスワードの一覧が格納されている、テキストファイルの名前を設定。<br />
Require : 認証に使用するユーザー名を指定。</p></blockquote>
<h3>htpasswd コマンド</h3>
<p>パスワードファイルの作成に必要なコマンド。Apache に付属します。以下の構文で実行します。</p>
<div class="command">
<pre>htpasswd -c Filename username</pre>
</div>
<p>書式が分かれば手入力でも作成はできるが、通常はこのコマンドを使う。主なオプションは、 以下の通り。</p>
<blockquote><p>-c : 新しいパスワードファイルを作成。同名のパスワードファイルがすでに存在する場合は、既存の内容が上書きされる。<br />
-n : テスト実行用のオプション。他のオプションなどの構文エラーがないかなどの確認に用いる。-c と一緒に使うことはできない。<br />
-m : パスワードをファイルに書き込む際、MD5 でハッシュした値を書き込みます。<br />
-d : パスワードをファイルに書き込む際、CRYPT でハッシュします（デフォルト）。<br />
-p : パスワードをファイルに書き込む際、ハッシュせずに、プレーンなテキストで書き込みます。<br />
-s : パスワードをファイルに書き込む際、SHA でハッシュします。<br />
-D : ユーザーを削除します。</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/apatch/htaccess/htaccess_basic_auth.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQLで「mysqladmin: connect to server at &#8216;localhost&#8217; failed error: &#8216;Access denied for user &#8216;root&#8217;@&#039;localhost&#8217; (using password: NO)&#8217;」</title>
		<link>http://www.a-magic-web.com/server_linux/mysql/mysqladmin_connect_error.html</link>
		<comments>http://www.a-magic-web.com/server_linux/mysql/mysqladmin_connect_error.html#comments</comments>
		<pubDate>Fri, 01 Jan 2010 13:32:06 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/mysql/mysqladmin_connect_error.html</guid>
		<description><![CDATA[インストール後、初期設定や動作確認で以下のメッセージが発生する場合がある。たとえば、mysqladmin version などの実行の際。 [root@localhost bin]# mysqladmin version mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' これは、MySQL の root ユーザーにパスワードを設定した場合に発生する。mysqladmin -u root password &#8216;new-password&#8217; の実行など。mysqladmin の実行時には、ユーザー名 root を付加し、パスワードを入力することで実効することができる。 [root@localhost bin]# mysqladmin version -u root -p Enter password: mysqladmin&#160; Ver 8.42 Distrib 5.1.42, for pc-linux-gnu on i686 Copyright 2000-2008 [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>インストール後、初期設定や動作確認で以下のメッセージが発生する場合がある。たとえば、mysqladmin version などの実行の際。 </p>
<div class="command">
<pre>[root@localhost bin]# mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)' </pre>
</div>
<p>これは、MySQL の root ユーザーにパスワードを設定した場合に発生する。mysqladmin -u root password &#8216;new-password&#8217; の実行など。mysqladmin の実行時には、ユーザー名 root を付加し、パスワードを入力することで実効することができる。 </p>
<div class="command">
<pre>[root@localhost bin]# mysqladmin version -u root -p
Enter password:
mysqladmin&#160; Ver 8.42 Distrib 5.1.42, for pc-linux-gnu on i686
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license


Server version&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 5.1.42-community
Protocol version&#160;&#160;&#160;&#160;&#160;&#160;&#160; 10
Connection&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Localhost via UNIX socket
UNIX socket&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /var/lib/mysql/mysql.sock
Uptime:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 11 min 31 sec
Threads: 1&#160; Questions: 6&#160; Slow queries: 0&#160; Opens: 15&#160; Flush tables: 1&#160; Open tables: 8&#160; Queries per second avg: 0.8</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/mysql/mysqladmin_connect_error.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>さくらインターネット + 独自ドメインのサブドメインを設定</title>
		<link>http://www.a-magic-web.com/server_linux/rental_server/sakurainternet_sub_domain.html</link>
		<comments>http://www.a-magic-web.com/server_linux/rental_server/sakurainternet_sub_domain.html#comments</comments>
		<pubDate>Mon, 28 Sep 2009 22:35:13 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[レンタルサーバー]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/rental_server/sakurainternet_sub_domain.html</guid>
		<description><![CDATA[若干迷ったので記録しておきます。状況としては、さくらインターネットのスタンダードと、Valueドメインで取得した独自ドメインを使用しています。 サーバコントロールパネル 左のメニューの「ドメイン設定」 「新しいドメインの追加」 「4. 他社で取得、または他社で管理中のドメインを移して使う」の「上記以外のドメインの場合」 「この項目は非推奨と、、」のメッセージが出るけどそのまま進む 他社で取得された独自ドメインへのサブドメインの追加 あとは、画面通りにディレクトリの指定などをして完了です。登録したサブドメインは 10分もしないくらいでアクセス可能でした。早いですね。]]></description>
			<content:encoded><![CDATA[<p>若干迷ったので記録しておきます。状況としては、さくらインターネットのスタンダードと、Valueドメインで取得した独自ドメインを使用しています。</p>
<ul>
<li>サーバコントロールパネル</li>
<li>左のメニューの「ドメイン設定」</li>
<li>「新しいドメインの追加」</li>
<li>「4. 他社で取得、または他社で管理中のドメインを移して使う」の「上記以外のドメインの場合」</li>
<li>「この項目は非推奨と、、」のメッセージが出るけどそのまま進む</li>
<li>他社で取得された独自ドメインへのサブドメインの追加</li>
</ul>
<p>あとは、画面通りにディレクトリの指定などをして完了です。登録したサブドメインは 10分もしないくらいでアクセス可能でした。早いですね。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/rental_server/sakurainternet_sub_domain.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL データベース・テーブルの作成</title>
		<link>http://www.a-magic-web.com/server_linux/postgresql/postgresql_create_database_table.html</link>
		<comments>http://www.a-magic-web.com/server_linux/postgresql/postgresql_create_database_table.html#comments</comments>
		<pubDate>Wed, 27 May 2009 06:21:15 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/postgresql/postgresql_create_database/</guid>
		<description><![CDATA[PostgreSQL は、複数のデータベースを持つことができます。また、各データベースはその中に複数のテーブルを持つことができます。同じデータベース内では、テーブル同士のアクセスができますが、データベースを跨いだアクセスはできません。 データベースの作成 データベースの作成には、createdb 権限をもつ postgreSQL のロールが必要です。エンコードオプションを指定しない場合、デフォルトのエンコード（下の例では UTF8 → もしかしたらシステムのエンコード）になるようです。 データベースの作成 以下のコマンドは、psql でなにかしらのデータベースに接続した状態で実行します。 postgres=&#62; CREATE DATABASE sampledb; CREATE DATABASE データベースを一覧で表示 作成したデータベースを確認するときなど。 postgres=&#62; l テーブルの作成 テーブルの作成 テーブルを作成するデータベースに接続してコマンドを実行します。書式は以下の通り create table テーブル名(列名 データ型, 列名 データ型); sampledb=&#62; create table test(num int, name varchar(50)); CREATE TABLE 主キーを設定してテーブルを作成 列名 データ型 につづけて primary key を追加します。 test-&#62; create table test test-&#62; (num int [...]]]></description>
			<content:encoded><![CDATA[<p>PostgreSQL は、複数のデータベースを持つことができます。また、各データベースはその中に複数のテーブルを持つことができます。同じデータベース内では、テーブル同士のアクセスができますが、データベースを跨いだアクセスはできません。</p>
<p><a href="http://www.a-magic-web.com/wp-content/uploads/2009/05/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.a-magic-web.com/wp-content/uploads/2009/05/image-thumb.png" width="480" height="369" /></a></p>
<h2>データベースの作成</h2>
<p>データベースの作成には、createdb 権限をもつ postgreSQL のロールが必要です。エンコードオプションを指定しない場合、デフォルトのエンコード（下の例では UTF8 → もしかしたらシステムのエンコード）になるようです。</p>
<h3>データベースの作成</h3>
<p>以下のコマンドは、psql でなにかしらのデータベースに接続した状態で実行します。</p>
<div class="command">
<pre>postgres=&gt; CREATE DATABASE sampledb;
CREATE DATABASE</pre>
</div>
<h3>データベースを一覧で表示</h3>
<p>作成したデータベースを確認するときなど。 </p>
<div class="command">
<pre>postgres=&gt; l</pre>
</div>
<h2>テーブルの作成</h2>
<h3>テーブルの作成</h3>
<p>テーブルを作成するデータベースに接続してコマンドを実行します。書式は以下の通り<br />
  <br />create table テーブル名(列名 データ型, 列名 データ型); </p>
<div class="command">
<pre>sampledb=&gt; create table test(num int, name varchar(50));
CREATE TABLE</pre>
</div>
<h3>主キーを設定してテーブルを作成</h3>
<p>列名 データ型 につづけて primary key を追加します。</p>
<div class="command">
<pre>test-&gt; create table test
test-&gt; (num int primary key, name varchar(50));</pre>
</div>
<h3>自動採番する列を作成</h3>
<p>自動採番する列を含むテーブルを作成するには、自動採番したい列のデータ型を serial に設定します。</p>
<div class="command">
<pre>test-&gt; create table test
test-&gt; (num serial, name varchar(50));</pre>
</div>
<h3>デフォルト値を設定</h3>
<p>デフォルト値を設定すると、レコードの該当列に値を入れなくてもデフォルト値が自動的に入ります。書式は以下のとおりです。</p>
<p>create table テーブル名 (列名 データ型 default デフォルト値, 列名 データ型);</p>
<div class="command">
<pre>test-&gt; create table test
test-&gt; (num int, name varchar(50) default 'ナメック星人');</pre>
</div>
<h3>その他オプション</h3>
<p>主キーの設定と同じように、データ型につづけてオプションを追記します。</p>
<table border="1" cellspacing="0" cellpadding="2" width="600">
<tbody>
<tr>
<td valign="top" width="300">オプション</td>
<td valign="top" width="300">説明</td>
</tr>
<tr>
<td valign="top" width="300">not null</td>
<td valign="top" width="300">NULL （値なし）が許可されない制約</td>
</tr>
<tr>
<td valign="top" width="300">unique</td>
<td valign="top" width="300">値の重複が許可されない制約</td>
</tr>
</tbody>
</table>
<h3>作成したテーブルの確認</h3>
<p>テーブルの一覧を表示</p>
<div class="command">
<pre>test=> \d</pre>
</div>
<p>テーブル内の列情報を表示する方法。unique などの各種制約オプションも表示されます。</p>
<div class="command">
<pre>test=> \d users
                                 Table "public.users"
 Column  |         Type          |                      Modifiers
---------+-----------------------+-----------------------------------------------------
 num     | integer               | not null default nextval('users_num_seq'::regclass)
 id      | character varying(20) | not null
 pw      | character varying(20) | not null
 name    | character varying(50) | not null
 authlev | integer               | not null default 0
 env1    | character varying(50) |
 env2    | character varying(50) |
Indexes:
    "users_id_key" UNIQUE, btree (id)
    "users_pw_key" UNIQUE, btree (pw)</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/postgresql/postgresql_create_database_table.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL 主キーの設定方法</title>
		<link>http://www.a-magic-web.com/server_linux/postgresql/postgresql__set_primary_key.html</link>
		<comments>http://www.a-magic-web.com/server_linux/postgresql/postgresql__set_primary_key.html#comments</comments>
		<pubDate>Wed, 27 May 2009 05:11:40 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/postgresql/postgresql__set_primary_key/</guid>
		<description><![CDATA[テーブル作成時に主キーを設定 列名、データ型につづけて、PRIMARY KEY を加えます。 test=&#62; create table test2 test-&#62; (num int primary key, name varchar(50)); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index &#34;test2_pkey&#34; for table &#34;test2&#34; CREATE TABLE 作成済みのテーブルに主キーを設定 作成済みのテーブルに対して、主キーを設定する方法です。 test=&#62; alter table test add primary key (num); NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index &#34;test_pkey&#34; for table [...]]]></description>
			<content:encoded><![CDATA[<h3>テーブル作成時に主キーを設定</h3>
<p>列名、データ型につづけて、PRIMARY KEY を加えます。</p>
<div class="command">
<pre>test=&gt; create table test2
test-&gt; (num int primary key, name varchar(50));
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index &quot;test2_pkey&quot; for table &quot;test2&quot;
CREATE TABLE</pre>
</div>
<h3>作成済みのテーブルに主キーを設定</h3>
<p>作成済みのテーブルに対して、主キーを設定する方法です。</p>
<div class="command">
<pre>test=&gt; alter table test add primary key (num);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index &quot;test_pkey&quot; for table &quot;test&quot;
ALTER TABLE</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/postgresql/postgresql__set_primary_key.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL データ型</title>
		<link>http://www.a-magic-web.com/server_linux/postgresql/postgresql_data_type.html</link>
		<comments>http://www.a-magic-web.com/server_linux/postgresql/postgresql_data_type.html#comments</comments>
		<pubDate>Wed, 27 May 2009 04:29:02 +0000</pubDate>
		<dc:creator>vohedge</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://www.a-magic-web.com/server_linux/postgresql/postgresql_data_type/</guid>
		<description><![CDATA[よく目にするものだけまとめてみようと思ったのですが、すでにまとまっているページがあったので引用しました。より詳細な情報は、PostgreSQL 8.3.7文書 : 第 8章データ型 に載っています。 &#160; 型 内 容 CHAR(長さ) カッコ内に指定した長さの固定長の文字列 VARCHAR(長さ) カッコ内に指定した長さ以下の可変長の文字列 TEXT 任意の長さの可変長の文字列 INTEGER 通常使用する整数 FLOAT 実数 NUMERIC (整数部分桁数、小数部分桁数) 任意精度の固定小数 DATE 日付 TIME 時刻 TIMESTAMP 日付と時刻 BOOLEAN 論理値。真（&#8217;t'）または偽（&#8217;f'） &#160;http://www.itmedia.co.jp/enterprise/0307/18/epn20_5.html &#160; 参考にしたサイト ITmediaエンタープライズ : 第1回 PostgreSQLで学ぶSQLデータベースの操作 (5/15)]]></description>
			<content:encoded><![CDATA[<p>よく目にするものだけまとめてみようと思ったのですが、すでにまとまっているページがあったので引用しました。より詳細な情報は、<a href="http://www.postgresql.jp/document/current/html/datatype.html">PostgreSQL 8.3.7文書 : 第 8章データ型</a> に載っています。</p>
<blockquote><p>&#160;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="248"><strong>型</strong></td>
<td width="428"><strong>内 容</strong></td>
</tr>
<tr>
<td width="248">CHAR(長さ)</td>
<td width="428">カッコ内に指定した長さの固定長の文字列</td>
</tr>
<tr>
<td width="248">VARCHAR(長さ)</td>
<td width="428">カッコ内に指定した長さ以下の可変長の文字列</td>
</tr>
<tr>
<td width="248">TEXT</td>
<td width="428">任意の長さの可変長の文字列</td>
</tr>
<tr>
<td width="248">INTEGER</td>
<td width="428">通常使用する整数</td>
</tr>
<tr>
<td width="248">FLOAT</td>
<td width="428">実数</td>
</tr>
<tr>
<td width="248">NUMERIC (整数部分桁数、小数部分桁数)</td>
<td width="428">任意精度の固定小数</td>
</tr>
<tr>
<td width="248">DATE</td>
<td width="428">日付</td>
</tr>
<tr>
<td width="248">TIME</td>
<td width="428">時刻</td>
</tr>
<tr>
<td width="248">TIMESTAMP</td>
<td width="428">日付と時刻</td>
</tr>
<tr>
<td width="248">BOOLEAN</td>
<td width="428">論理値。真（&#8217;t'）または偽（&#8217;f'）</td>
</tr>
</tbody>
</table>
<p>&#160;<a href="http://www.itmedia.co.jp/enterprise/0307/18/epn20_5.html">http://www.itmedia.co.jp/enterprise/0307/18/epn20_5.html</a></p>
</blockquote>
<p>&#160;</p>
</p>
<hr />
<p>参考にしたサイト</p>
<p><a href="http://www.itmedia.co.jp/enterprise/0307/18/epn20_5.html">ITmediaエンタープライズ : 第1回 PostgreSQLで学ぶSQLデータベースの操作 (5/15)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-magic-web.com/server_linux/postgresql/postgresql_data_type.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
	</channel>
</rss>
