<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1968468791207605606</id><updated>2024-10-05T11:14:15.196+09:00</updated><title type='text'>CentOS6サーバー構築備忘録</title><subtitle type='html'>自宅サーバ構築の備忘録です。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-8372197860834651483</id><published>2013-05-20T14:43:00.002+09:00</published><updated>2013-05-20T14:43:59.402+09:00</updated><title type='text'>iptabelsの新規作成方法について</title><content type='html'>さくらVPSでは、iptablesが最初からはないため、新規作成する必要がある。&lt;br /&gt;
&lt;br /&gt;
#touch /etc/sysconfig/iptables&lt;br /&gt;
または&lt;br /&gt;
#vi /etc/sysconfig/iptables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以下設定のうち、-Aの続きに空行があるとだめみたいなので注意。&lt;br /&gt;
便宜上間にコメント入れているが、実際は余計なものは含まないようにすること。&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
*filter&lt;br /&gt;
:INPUT ACCEPT [0:0]&lt;br /&gt;
:FORWARD ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
:RH-Firewall-1-INPUT - [0:0]&lt;br /&gt;
&lt;br /&gt;
-A INPUT -j RH-Firewall-1-INPUT&lt;br /&gt;
-A FORWARD -j RH-Firewall-1-INPUT&lt;br /&gt;
-A RH-Firewall-1-INPUT -i lo -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
#--ここは任意 22はSSH 80はHTTP 443はHTTPS 20,21はFTP, 3306はMySQL 5432はPostgreSQL&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
#--ここからメール送受信ポート関連&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 587 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 110 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 995 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 143 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 993 -j ACCEPT&lt;br /&gt;
#---&lt;br /&gt;
&lt;br /&gt;
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----ここまで&lt;br /&gt;
&lt;br /&gt;
以上</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/8372197860834651483/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/iptabels.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8372197860834651483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8372197860834651483'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/iptabels.html' title='iptabelsの新規作成方法について'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-6659998845808545394</id><published>2013-05-20T14:38:00.002+09:00</published><updated>2013-05-20T14:38:49.011+09:00</updated><title type='text'>メールサーバ構築(Postfix/Dovecot) Dovecot(非SSL)編 </title><content type='html'>メール受信するためのソフトDovecotインストール設定方法&lt;br /&gt;
&lt;br /&gt;
１．インストール&lt;br /&gt;
#yum install dovecot -y&lt;br /&gt;
&lt;br /&gt;
２．設定ファイルを編集（10-auth.conf）&lt;br /&gt;
# vi /etc/dovecot/conf.d/10-auth.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;#プレーンテキスト認証も許可する&lt;br /&gt;
&amp;nbsp; disable_plaintext_auth = no&lt;br /&gt;
&amp;nbsp; # 追記 プレインログインのみ&lt;br /&gt;
&amp;nbsp;auth_mechanisms = plain login&lt;br /&gt;
&lt;br /&gt;
３．設定ファイルを編集（10-mail.conf）&lt;br /&gt;
# vi /etc/dovecot/conf.d/10-mail.conf&lt;br /&gt;
mail_location = maildir:~/Maildir&lt;br /&gt;
&lt;br /&gt;
４．設定ファイルを編集（10-master.conf）&lt;br /&gt;
# vi /etc/dovecot/conf.d/10-master.conf&lt;br /&gt;
&lt;br /&gt;
# Postfix smtp-auth&lt;br /&gt;
unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
mode = 0666&lt;br /&gt;
user = postfix&lt;br /&gt;
group = postfix&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
５．dovecotを起動または再起動&lt;br /&gt;
# /etc/rc.d/init.d/dovecot start&lt;br /&gt;
&lt;br /&gt;
６．dovecot自動起動設定&lt;br /&gt;
# chkconfig dovecot on&lt;br /&gt;
&lt;br /&gt;
以上</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/6659998845808545394/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/postfixdovecot-dovecot-ssl.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/6659998845808545394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/6659998845808545394'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/postfixdovecot-dovecot-ssl.html' title='メールサーバ構築(Postfix/Dovecot) Dovecot(非SSL)編 '/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-8152810924079315234</id><published>2013-05-20T14:32:00.002+09:00</published><updated>2013-05-20T14:38:36.736+09:00</updated><title type='text'>メールサーバ構築(Postfix/Dovecot) Postfix(非SSL)編</title><content type='html'>最終的には、SSL対応したメールサーバにするが、まずは、&lt;br /&gt;
送信、受信ができるようにしてみる。&lt;br /&gt;
&lt;br /&gt;
環境は以下のとおり。&lt;br /&gt;
&lt;br /&gt;
サーバ：さくらVPS　&lt;br /&gt;
SMTP : Postfix&lt;br /&gt;
POP/IMAP : Dovecot&lt;br /&gt;
&lt;br /&gt;
SMTP-AUTH有効。&lt;br /&gt;
また、バーチャルホストの設定はまだしない。&lt;br /&gt;
まずはメインドメインからの送受信が行えるようにすることが今回の目的。&lt;br /&gt;
&lt;br /&gt;
まずは、Postfixの設定。&lt;br /&gt;
&lt;br /&gt;
■Postfixの設定&lt;br /&gt;
１． /etc/postfix/main.cfファイルを変更する&lt;br /&gt;
&lt;br /&gt;
[root@mail ~]# vi /etc/postfix/main.cf&lt;br /&gt;
myhostname = mail.example.com&lt;br /&gt;
mydomain = example.com&lt;br /&gt;
myorigin = $mydomain&lt;br /&gt;
inet_interfaces = all&lt;br /&gt;
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain&lt;br /&gt;
home_mailbox = Maildir/&lt;br /&gt;
header_checks = regexp:/etc/postfix/header_checks&lt;br /&gt;
body_checks = regexp:/etc/postfix/body_checks&lt;br /&gt;
smtpd_banner = $myhostname ESMTP&lt;br /&gt;
&lt;br /&gt;
# ファイルの終わりに追加&lt;br /&gt;
# 送受信メールサイズを10Mに制限&lt;br /&gt;
message_size_limit = 10485760&lt;br /&gt;
# メールボックスサイズを1Gに制限&lt;br /&gt;
mailbox_size_limit = 1073741824&lt;br /&gt;
# SMTP-Auth用&lt;br /&gt;
smtpd_sasl_type = dovecot&lt;br /&gt;
smtpd_sasl_path = private/auth&lt;br /&gt;
smtpd_sasl_auth_enable = yes&lt;br /&gt;
smtpd_sasl_security_options = noanonymous&lt;br /&gt;
smtpd_sasl_local_domain = $myhostname&lt;br /&gt;
smtpd_client_restrictions = permit_mynetworks,reject_unknown_client,permit&lt;br /&gt;
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject&lt;br /&gt;
&lt;br /&gt;
２．ヘッダチェックファイル(/etc/postfix/header_checks)を変更する&lt;br /&gt;
# アドレスなしメール拒否&lt;br /&gt;
/^From:.*&amp;lt;#.*@.*&amp;gt;/ REJECT&lt;br /&gt;
/^Return-Path:.*&amp;lt;#.*@.*&amp;gt;/ REJECT&lt;br /&gt;
&lt;br /&gt;
#↑ ファイル最初に追記すればよい。&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
３．ボディチェックファイル(/etc/postfix/body_checks)を新規作成する&lt;br /&gt;
&lt;br /&gt;
# 本文にexample.comが含まれていたら拒否&lt;br /&gt;
/^(|[^&amp;gt;].*)example.com/ REJECT&lt;br /&gt;
&lt;br /&gt;
４．/etc/postfix/master.cfでsubmissionポート設定(587番ポート対応)をする&lt;br /&gt;
&lt;br /&gt;
submission inet n &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;nbsp; &amp;nbsp; &amp;nbsp; n &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;nbsp; &amp;nbsp; &amp;nbsp; smtpd&lt;br /&gt;
&amp;nbsp; -o smtpd_sasl_auth_enable=yes&lt;br /&gt;
&amp;nbsp; -o smtpd_client_restrictions=permit_sasl_authenticated,reject&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
５．ファイアウォール設定(/etc/sysconfig/iptables)に下記ポートの許可を記述する&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ファイルがない場合は、新規作成すればよいが、下記以外にもまるまる&lt;br /&gt;
　　設定する必要がある。iptablesについての記述方法は別ページに記載する。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-A INPUT -m state --state NEW -m tcp -p tcp --dport 110 -j ACCEPT&lt;br /&gt;
-A INPUT -m state --state NEW -m tcp -p tcp --dport 995 -j ACCEPT&lt;br /&gt;
-A INPUT -m state --state NEW -m tcp -p tcp --dport 143 -j ACCEPT&lt;br /&gt;
-A INPUT -m state --state NEW -m tcp -p tcp --dport 993 -j ACCEPT&lt;br /&gt;
-A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT&lt;br /&gt;
-A INPUT -m state --state NEW -m tcp -p tcp --dport 587 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
＜参考＞&lt;br /&gt;
※25番、587番がなければメール送信できない&lt;br /&gt;
※110番995番がなければメールPOP受信できない&lt;br /&gt;
※143番993番がなければメールIMAP受信できない&lt;br /&gt;
&lt;br /&gt;
６．Postfix再起動&lt;br /&gt;
#/etc/rc.d/init.d/postfix start&lt;br /&gt;
&lt;br /&gt;
７．次回サーバ起動時に自動起動する設定をする&lt;br /&gt;
chkconfig postfix on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/8152810924079315234/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/postfixdovecot-postfix.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8152810924079315234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8152810924079315234'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/postfixdovecot-postfix.html' title='メールサーバ構築(Postfix/Dovecot) Postfix(非SSL)編'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-2375065276731113529</id><published>2013-05-19T14:02:00.000+09:00</published><updated>2013-05-19T15:20:37.793+09:00</updated><title type='text'>MacからWindows8へリモートデスクトップ接続する方法</title><content type='html'>MacからWindows8へリモートデスクトップ接続する方法。&lt;br /&gt;
&lt;br /&gt;
Mac用のOfficeを購入するとバンドルされているらしい、&lt;br /&gt;
MicroSoft Remote Desktop Connection Client。&lt;br /&gt;
&lt;br /&gt;
でもMac用のOfficeはマクロとかの互換性がまだまだらしいので買う予定ない・・・。&lt;br /&gt;
あきらめるか、と思っていたら、&lt;br /&gt;
Microsoft社純正のMac用リモートクライアントアプリがリリースされている！！&lt;br /&gt;
すごいな〜。これじゃますますMacを開発環境にしていいじゃん、と。&lt;br /&gt;
&lt;br /&gt;
ダウンロードはこちらから。&lt;br /&gt;
http://www.microsoft.com/ja-jp/download/details.aspx?id=465&lt;br /&gt;
&lt;br /&gt;
&lt;h1 bi:title=&quot;item&quot; style=&quot;color: #4f4f4f; display: table-cell; font-family: Meiryo, &#39;Segoe UI Light&#39;, &#39;Segoe UI&#39;, Arial, Verdana, Tahoma, sans-serif; font-size: 24px; font-weight: normal; line-height: 1.13em; margin: 0px 10px 0px 0px; padding: 0px 0px 0px 15px; vertical-align: middle;&quot;&gt;
Microsoft Remote Desktop Connection Client for Mac 2.0.1&lt;/h1&gt;
&lt;br /&gt;
&lt;br /&gt;
あと、Macから接続する前に必ず、リモート接続される側のWindowsの&lt;br /&gt;
設定でリモート接続許可をしておくこと。&lt;br /&gt;
&lt;br /&gt;
コントロールパネル システム システムの詳細設定 システムのプロパティ画面の&lt;br /&gt;
リモートタブのリモートデスクトップ接続欄にチェックを入れること。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
使ってみた感想&lt;br /&gt;
起動後、デフォルトでは1024x768のディスプレイサイズになっているが、&lt;br /&gt;
設定からフルスクリーンやその他のサイズ指定もでき使用しているディスプレイ環境&lt;br /&gt;
に会わせてリモートデスクトップができるのはすばらしい。&lt;br /&gt;
&lt;br /&gt;
かなり重宝しそう！&lt;br /&gt;
&lt;br /&gt;
以上</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/2375065276731113529/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/macwindows8.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/2375065276731113529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/2375065276731113529'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/macwindows8.html' title='MacからWindows8へリモートデスクトップ接続する方法'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-1192589468947101854</id><published>2013-05-18T00:50:00.003+09:00</published><updated>2013-05-18T00:50:38.679+09:00</updated><title type='text'>以前のサーバで使ってたJavaのJarファイルが実行後エラーになった！その対処</title><content type='html'>&lt;br /&gt;
以前の自宅サーバで使っていたJAVAのJARファイルを実行すると、&lt;br /&gt;
以下のようなエラーが出力された。&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
Exception in thread &quot;main&quot; java.lang.ClassFormatError: com.gomitrader.MarketUpdater (unrecognized class file version)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;at java.lang.VMClassLoader.defineClass(libgcj.so.10)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;at java.lang.ClassLoader.defineClass(libgcj.so.10)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;at java.security.SecureClassLoader.defineClass(libgcj.so.10)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;at java.net.URLClassLoader.findClass(libgcj.so.10)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;at java.lang.ClassLoader.loadClass(libgcj.so.10)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;at java.lang.ClassLoader.loadClass(libgcj.so.10)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;at gnu.java.lang.MainThread.run(libgcj.so.10)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
なんでだ！？&lt;br /&gt;
&lt;br /&gt;
色々調べてみると、さくらVPSにプリインストールされているJAVAは、&lt;br /&gt;
バージョン1-5であった。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[hoge@hogeserver dist]$ java -version&lt;br /&gt;
java version &quot;1.5.0&quot;&lt;br /&gt;
gij (GNU libgcj) version 4.4.7 20120313 (Red Hat 4.4.7-3)&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
そこで、バージョン1.6, 1.7をインストールする。&lt;br /&gt;
$sudo yum install -y java-1.6*&lt;br /&gt;
$sudo yum install -y java-1.7*&lt;br /&gt;
&lt;br /&gt;
これで無事さくらVPSでも実行できるようになった！やった。&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/1192589468947101854/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/javajar.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/1192589468947101854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/1192589468947101854'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/javajar.html' title='以前のサーバで使ってたJavaのJarファイルが実行後エラーになった！その対処'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-6414146096156962417</id><published>2013-05-18T00:23:00.001+09:00</published><updated>2013-05-18T00:23:08.293+09:00</updated><title type='text'>さくらVPS 住所確認はがきがきてからすること</title><content type='html'>本登録をして料金を支払ったら、住所確認のためはがきが郵送されてくる。&lt;br /&gt;
&lt;br /&gt;
そこに番号が記載されているので、会員メニューからその番号を入力する。&lt;br /&gt;
&lt;br /&gt;
その後、ネームサーバに登録が可能となる。&lt;br /&gt;
さくらVPSのネームサーバを使用する場合、&lt;br /&gt;
お名前.comで取得したドメインは、お名前.comのページより、&lt;br /&gt;
別ネームサーバを指定するこうもくで設定する必要がある。&lt;br /&gt;
&lt;br /&gt;
そのあと、さくらVPSでサブドメインの設定やらをしよう。&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/6414146096156962417/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/vps_18.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/6414146096156962417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/6414146096156962417'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/vps_18.html' title='さくらVPS 住所確認はがきがきてからすること'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-6091845101190057202</id><published>2013-05-16T23:50:00.000+09:00</published><updated>2013-05-16T23:50:32.034+09:00</updated><title type='text'>ドキュメントルートにFTPでアップロードできない場合の対処方法</title><content type='html'>FTPアップロードするときのユーザ名と、&lt;br /&gt;
ドキュメントルートのアクセス権限を確認しよう。&lt;br /&gt;
&lt;br /&gt;
デフォルトでは、ドキュメントルートはrootユーザ rootグループになっている。&lt;br /&gt;
FTPアクセスするユーザがhogeの場合は、まずアップロードできません。&lt;br /&gt;
&lt;br /&gt;
どうするか？&lt;br /&gt;
以下のようにしましょう。&lt;br /&gt;
&lt;br /&gt;
1.グループにwwwを追加&lt;br /&gt;
#groupadd www&lt;br /&gt;
#gpasswd www&lt;br /&gt;
&lt;br /&gt;
2.ユーザにwwwを追加&lt;br /&gt;
#useradd www&lt;br /&gt;
#passwd www&lt;br /&gt;
&lt;br /&gt;
3.ドキュメントルートのファイルアクセスさせたいユーザをwwwグループに追加&lt;br /&gt;
※このとき、-Gオプションにすること。-gとするとプライマリグループがかわってしまうため。&lt;br /&gt;
#usermod -G www hoge&lt;br /&gt;
&lt;br /&gt;
4./etc/httpd/conf/httpd.confのUser Groupをwww wwwに変更&lt;br /&gt;
&lt;br /&gt;
5.ドキュメントルートディレクトリの所有者・アクセス権限を変更&lt;br /&gt;
#chown www:www ドキュメントルート&lt;br /&gt;
#chmod 755 ドキュメントルート&lt;br /&gt;
&lt;br /&gt;
6.httpdを再起動&lt;br /&gt;
/etc/rc.d/init.d/httpd restart&lt;br /&gt;
&lt;br /&gt;
これでhogeユーザでFTPアップロードできるようになるはず。&lt;br /&gt;
&lt;br /&gt;
ただし、すでにrootまたは別ユーザでindex.htmlがドキュメントルートに&lt;br /&gt;
存在する場合は、一度これを削除しないと上書きできないからアップロードに&lt;br /&gt;
失敗します。&lt;br /&gt;
（アクセス権限が644のため、上書きできない。注意！)&lt;br /&gt;
&lt;br /&gt;
以上</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/6091845101190057202/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/ftp.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/6091845101190057202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/6091845101190057202'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/ftp.html' title='ドキュメントルートにFTPでアップロードできない場合の対処方法'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-4507090593325482059</id><published>2013-05-16T23:41:00.002+09:00</published><updated>2013-05-16T23:41:54.436+09:00</updated><title type='text'>Coda2がすばらしくよい</title><content type='html'>さくらVPSにしてもりもりサイト作ろう！と思ったが、&lt;br /&gt;
オーサリングツールどれにしようか迷った。&lt;br /&gt;
今までnetbeansでjavaやらHTML+PHPやら作っていたが、&lt;br /&gt;
折角macなのでcoda2を使うことにしてとりあえずお試し版を使ってみた。&lt;br /&gt;
&lt;br /&gt;
結果、&lt;br /&gt;
ものすごくよい。&lt;br /&gt;
&lt;br /&gt;
ネットで色々な人が書いているようにこれはいい。&lt;br /&gt;
&lt;br /&gt;
それだけ。&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/4507090593325482059/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/coda2.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/4507090593325482059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/4507090593325482059'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/coda2.html' title='Coda2がすばらしくよい'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-1671923934413507259</id><published>2013-05-16T00:33:00.000+09:00</published><updated>2013-05-21T02:00:53.361+09:00</updated><title type='text'>さくらVPSにインストールしないといけないもの</title><content type='html'>さくらVPSは、よく使われるサーバのデーモンのうち、&lt;br /&gt;
最初から以下のものしかインストールされていない。&lt;br /&gt;
&lt;br /&gt;
SSH接続用　open-SSH&lt;br /&gt;
メール送信用　postfix&lt;br /&gt;
DB SQLite&lt;br /&gt;
&lt;br /&gt;
なので、以下のサービスをインストールする&lt;br /&gt;
HTTP (apache)&lt;br /&gt;
FTP &amp;nbsp; (vsftpd)&lt;br /&gt;
DB &amp;nbsp; &amp;nbsp; (MySQL, PostgreSQL)&lt;br /&gt;
POP (dovecot)&lt;br /&gt;
&lt;br /&gt;
Wordpress&lt;br /&gt;
node.js&lt;br /&gt;
PHP&lt;br /&gt;
&lt;br /&gt;
1.HTTPDインストール&lt;br /&gt;
#yum install httpd&lt;br /&gt;
&lt;br /&gt;
#which httpd&lt;br /&gt;
/usr/sbin/httpd&lt;br /&gt;
&lt;br /&gt;
#httpd -v&lt;br /&gt;
&lt;br /&gt;
#cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_org&lt;br /&gt;
#vi /etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
ServerName www.hogehoge.com:80&lt;br /&gt;
デフォルトの初回ドメインを入力する&lt;br /&gt;
&lt;br /&gt;
#/etc/rc.d/init.d/httpd start&lt;br /&gt;
&lt;br /&gt;
ブラウザからhttp://サーバIP を入力してapacheページが表示されたらOK.&lt;br /&gt;
www.hogehoge.comと設定したがDNSに登録されているドメインではないため、&lt;br /&gt;
サーバのIPでアクセスを確認すること。&lt;br /&gt;
&lt;br /&gt;
#chkconfig httpd on&lt;br /&gt;
&lt;br /&gt;
ま、詳しい設定はすべてインストール終わってからすることにする。&lt;br /&gt;
&lt;br /&gt;
2.FTPDインストール&lt;br /&gt;
#yum install vsftpd&lt;br /&gt;
&lt;br /&gt;
#which vsftpd&lt;br /&gt;
/usr/sbin/vsftpd&lt;br /&gt;
&lt;br /&gt;
#vsftpd -v&lt;br /&gt;
&lt;br /&gt;
#/etc/rc.d/init.d/vsftpd start&lt;br /&gt;
&lt;br /&gt;
VSFTPDの設定ファイルを修正する&lt;br /&gt;
#vi /etc/vsftpd/vsftpd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;ここから設定を変更する&lt;br /&gt;
&amp;gt;匿名ユーザの接続は許可しない&lt;br /&gt;
anonymous_enable=NO&lt;br /&gt;
&amp;gt;ログを記録する&lt;br /&gt;
xferlog_enable=YES&lt;br /&gt;
xferlog_file=/var/log/vsftpd.log&lt;br /&gt;
xferlog_std_format=NO&lt;br /&gt;
&amp;gt;asciiによるアップロード・ダウンロード許可&lt;br /&gt;
ascii_upload_enable=YES&lt;br /&gt;
ascii_download_enable=YES&lt;br /&gt;
&amp;gt;バナーに表示する文字を設定 FTPのバージョンを表示しない&lt;br /&gt;
ftpd_banner=Welcome .... Ftp&lt;br /&gt;
&amp;gt;ホームディレクトリより上層へのアクセスを禁止する&lt;br /&gt;
chroot_local_user=YES&lt;br /&gt;
&amp;gt;リストに記載したユーザは上層へのアクセスを許可する&lt;br /&gt;
chroot_list_enable=YES&lt;br /&gt;
chroot_list_file=/etc/vsftpd/chroot_list&lt;br /&gt;
&amp;gt;ディレクトリごとの削除を許可する&lt;br /&gt;
ls_recurse_enable=YES&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;ここから追加する&lt;br /&gt;
&amp;gt;タイムスタンプ時間を日本の時間にする&lt;br /&gt;
use_localtime=YES&lt;br /&gt;
&amp;gt;PASVモード接続先IPをホスト名から取得する&lt;br /&gt;
pasv_addr_resolve=YES&lt;br /&gt;
&amp;gt;サーバのホスト名またはIPアドレス指定&lt;br /&gt;
pasv_address=自分のサーバのIホスト名またはIP&lt;br /&gt;
&amp;gt;PASVモード接続ポート&lt;br /&gt;
pasv_min_port=60000&lt;br /&gt;
pasv_max_port=60030&lt;br /&gt;
&amp;gt;SSL有効&lt;br /&gt;
ssl_enable=YES&lt;br /&gt;
&amp;gt;証明書を指定&lt;br /&gt;
rsa_cert_file=/etc/pki/tls/certs/vsfpd.pem&lt;br /&gt;
&amp;gt;ログイン時にSSL接続を強制しない (暗号化しない接続も許可)&lt;br /&gt;
force_local_logins_ssl=NO&lt;br /&gt;
force_local_data_ssl=NO&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;編集終了&lt;br /&gt;
&lt;br /&gt;
ホームディレクトリより上層へのアクセスを許可するユーザの登録&lt;br /&gt;
#echo ユーザ名 &amp;gt;&amp;gt; /etc/vsftpd/chroot_list&lt;br /&gt;
&lt;br /&gt;
ユーザ新規登録時に/home/etcディレクトリを作成するようスケルトン登録&lt;br /&gt;
#mkdir /etc/skel/etc&lt;br /&gt;
#cp /etc/localtime /etc/skel/etc&lt;br /&gt;
&lt;br /&gt;
既存ユーザは、/home/ユーザ/etcディレクトリを作成すること&lt;br /&gt;
etcのアクセス権限を各ユーザに変更&lt;br /&gt;
#chown ユーザ:ユーザ /home/ユーザ/etc&lt;br /&gt;
&lt;br /&gt;
もしFTPサーバへアクセスを禁止したいユーザがいれば&lt;br /&gt;
#echo 禁止したいユーザ &amp;gt;&amp;gt; /etc/vsftpd/ftpusers&lt;br /&gt;
&lt;br /&gt;
サーバ証明書を作成する&lt;br /&gt;
#make /etc/pki/tls/certs/vsftpd.pem&lt;br /&gt;
国名やら県名サイト名メールアドレスを入力する&lt;br /&gt;
Organaization ....は空エンターでよい&lt;br /&gt;
&lt;br /&gt;
VSFTPD起動&lt;br /&gt;
#/etc/rc.d/init.d/vsftpd start&lt;br /&gt;
#chkconfig vsftpd on&lt;br /&gt;
#chkconfig --list vsftpd&lt;br /&gt;
&lt;br /&gt;
macから接続する場合&lt;br /&gt;
&lt;br /&gt;
CyberDuckを使用する&lt;br /&gt;
FTP&lt;br /&gt;
FTP-SSL (Explicit AUTH TLS)&lt;br /&gt;
初回接続時はサーバ証明書が偽物なので偽装サーバの警告が表示されるが、&lt;br /&gt;
問題ないので次回より警告しないようにする。&lt;br /&gt;
&lt;br /&gt;
3. MySQLインストール&lt;br /&gt;
#yum install *mysql*&lt;br /&gt;
&lt;br /&gt;
#which mysql&lt;br /&gt;
/usr/sbin/mysql&lt;br /&gt;
&lt;br /&gt;
#mysql --version&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/mysqld start&lt;br /&gt;
一連の処理が実行され、OKと表示されればよい。&lt;br /&gt;
&lt;br /&gt;
#chkconfig mysqld on&lt;br /&gt;
&lt;br /&gt;
#mysql_secure_installation&lt;br /&gt;
rootパスワード以外はすべて空ENTERまたはYでENTER押せばよい。&lt;br /&gt;
※今までのいちいち匿名ユーザ消したりという作業を省略できる。&lt;br /&gt;
&lt;br /&gt;
#任意のユーザ(hoge)をパスワード(password)登録する&lt;br /&gt;
&amp;gt;grant all on *.* to hoge indetified by &#39;password&#39;;&lt;br /&gt;
&lt;br /&gt;
#select user,host,password from mysql.user;&lt;br /&gt;
&lt;br /&gt;
文字コードをUTF8に統一&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&amp;nbsp; &amp;nbsp;# vi /etc/my.cnf&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp; 以下セクション・キーを追加する&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;[mysqld]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;datadir=/var/lib/mysql&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;socket=/var/lib/mysql/mysql.sock&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;user=mysql&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;symbolic-links=0&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;#old_passwords=1&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: red; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;default-character-set=utf8&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;character-set-server=utf8&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: red; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;skip-character-set-client-handshake&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;[mysqld_safe]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;log-error=/var/log/mysqld.log&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;pid-file=/var/run/mysqld/mysqld.pid&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;[client]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;default-character-set=utf8&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;[mysql]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;default-character-set=utf8&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;mysql再起動&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;#/etc/rc.d/init.d/mysqld restart&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;mysqlへ接続&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;#mysql -u USER -p&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;文字コード設定が反映されていることを確認&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;show variables like &#39;char%&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;既にあるデータベースの文字コードをこれで変更できる&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&amp;nbsp;alter database データベース名 character set 文字コード; [ENTER]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
4. PostgreSQLインストール&lt;br /&gt;
#yum install *postgresql*&lt;br /&gt;
&lt;br /&gt;
#which psql&lt;br /&gt;
&lt;br /&gt;
#psql --version&lt;br /&gt;
&lt;br /&gt;
5. SQLite関係をインストール&lt;br /&gt;
#yum install *sqlite*&lt;br /&gt;
#which sqlite&lt;br /&gt;
&lt;br /&gt;
6. PHPインストール&lt;br /&gt;
#yum -y install php php-mbstring php-pear php-mysql php-gd mysql-devel&lt;br /&gt;
&lt;br /&gt;
/etc/httpd/conf/httpd.confに以下２行を追加する&lt;br /&gt;
AddType application/x-httpd-php .php&lt;br /&gt;
AddType application/x-httpd-source .php&lt;br /&gt;
&lt;br /&gt;
/var/www/html/にinfo.phpファイルを作成し以下を記述&lt;br /&gt;
&amp;lt;?php phpinfo(); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ブラウザからhttp://サーバIP/info.phpをアドレス入力し、&lt;br /&gt;
PHPの情報が表示されればoK&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
7. Wordpressインストール&lt;br /&gt;
&lt;br /&gt;
前提として、&lt;br /&gt;
バーチャルホストで２ドメインを１台のサーバで動かしている環境。&lt;br /&gt;
www.example1.com&lt;br /&gt;
www.exampel2.com&lt;br /&gt;
&lt;br /&gt;
www.example1.comには、blogのみwordpressを使用する。&lt;br /&gt;
www.example2.comには、すべてwordpressを使用し、サブドメインを使用する。&lt;br /&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
(blog.example2.com app.example2.comのようなもの)&lt;br /&gt;&lt;br /&gt;注意点としては、wordpressをインストールする際、&lt;br /&gt;
www.example2.comのときは、ドキュメントルートにwordpressをインストールすること。&lt;br /&gt;
wordpressをインストールとは、例えば、example2.comのドキュメントルートが、&lt;br /&gt;
/var/www/example2.com/の場合、&lt;br /&gt;
wp-contentやらwordpressディレクトリ以下の色々なファイルすべてが、&lt;br /&gt;
/var/www/example2.com/直下に配置されているということをさす。&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
※すでにPHPインストールでしているが、以下のものが必要なので注意。&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
yum install php-mysql&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
yum install php-mbstring&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
※最新のファイルを本家サイトで確認すること。 2013/05時点は3.5.1が最新&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
#wget http://ja.wordpress.org/wordpress-3.5.1-ja.zip&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
※ root のホームディレクトリにダウンロードしたことにする&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
unzip wordpress-3.5.1-ja.zip&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
HTMLのドキュメントルートにコピーする&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
cp -R wordpress /var/www/&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
cd /var/www/wordpress&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
cp wp-config-sample.php wp-config.php&lt;/div&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;※複数のwordpressをインストールする場合は、わかりやすくするため&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;  example1BLOG example2BLOGなどとして設定すればよいいかも。&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;//設定ファイルのデータベース設定を書き換える&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;/** WordPress のためのデータベース名 */
define(&#39;DB_NAME&#39;, &#39;example1BLOG&#39;);

/** MySQL データベースのユーザー名 */
define(&#39;DB_USER&#39;, &#39;DB任意ユーザ名&#39;);

/** MySQL データベースのパスワード */
define(&#39;DB_PASSWORD&#39;, &#39;DB任意パスワード&#39;); &lt;/pre&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
mysqlにルートでログイン&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
mysql -u root -p&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
grant all privileges on example1BLOG.* to ユーザ@localhost identified by &#39;xxxxxxxx&#39;;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
exit;&lt;br /&gt;
&lt;br /&gt;
mysql -u ユーザ -p&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
create database example2BLOG;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt; cd /etc/httpd/conf.d/&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;echo &quot;Alias /wordpress /var/www/wordpress&quot; &amp;gt; wordpress.conf&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;cat wordpress.conf&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;/etc/init.d/httpd reload &lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;//ブラウザで以下にアクセスして、adminパスワードを入れてメールアドレス入力してＯＫ&lt;/pre&gt;
&lt;pre style=&quot;text-align: start;&quot;&gt;http://サーバアドレス/wordpress&lt;/pre&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
8.HTTPDにサブドメイン・マルチサイト設定をする&lt;br /&gt;
&lt;br /&gt;
9.メールサーバをインストールする(postfix, dovecot)&lt;br /&gt;
&lt;br /&gt;
10.iptablesファイルを作成する&lt;br /&gt;
&lt;br /&gt;
11.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/1671923934413507259/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/vps_16.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/1671923934413507259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/1671923934413507259'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/vps_16.html' title='さくらVPSにインストールしないといけないもの'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-6700114730283722717</id><published>2013-05-15T20:13:00.000+09:00</published><updated>2013-05-21T11:36:12.226+09:00</updated><title type='text'>さくらVPS最初に設定すること</title><content type='html'>まずは、文字環境の日本語化とユーザの登録とSSH接続のセキュリティ設定をする。&lt;br /&gt;
&lt;br /&gt;
以降、自分の環境はMac OS Xなのでターミナル経由での接続とする&lt;br /&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;
前提として、CentOSを使用する。&lt;br /&gt;
&lt;br /&gt;
0.ホスト名を変更する&lt;br /&gt;
/etc/hosts&lt;br /&gt;
/etc/sysconfig/network&lt;br /&gt;
を変更する&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0.sudoを行えるようにする。&lt;br /&gt;
まずsudoがインストールされているか確認する&lt;br /&gt;
$yum list installed | grep sudo&lt;br /&gt;
&lt;br /&gt;
インストールされていない場合 suになり、インストール&lt;br /&gt;
$su -&lt;br /&gt;
#yum install sudo -y&lt;br /&gt;
&lt;br /&gt;
/etc/sudoersがあるか確認&lt;br /&gt;
#ls /etc | grep sudoers&lt;br /&gt;
&lt;br /&gt;
/etc/sudoersにユーザを追加するが、これはsuでviで開いても編集できない。&lt;br /&gt;
visudoコマンドで/etc/sudoersが編集可能なので、このコマンドで行うこと&lt;br /&gt;
&lt;br /&gt;
#visudo&lt;br /&gt;
&lt;br /&gt;
viの中で%wheel で検索 (コマンド入力モードで/%wheelと入力する)&lt;br /&gt;
その近辺にsudoコマンドを許可したいユーザを列挙していく。&lt;br /&gt;
ユーザ名 &amp;nbsp;ALL=(ALL) &amp;nbsp; ALL&lt;br /&gt;
&lt;br /&gt;
もしグループで登録したいときは&lt;br /&gt;
%グループ名 ALL=(ALL) ALL&lt;br /&gt;
とする。&lt;br /&gt;
ちなみにALL=(ALL) ALLは、実行可能なコマンドなどの詳細設定だが、&lt;br /&gt;
詳細は、visudoのマニュアルを参照のこと。&lt;br /&gt;
&lt;br /&gt;
これでCentOSでもsudoが使えるようになるので確認する。&lt;br /&gt;
#exit&lt;br /&gt;
※試しに、httpデーモンを再起動してみる。&lt;br /&gt;
$sudo /etc/rc.d/init.d/httpd restart&lt;br /&gt;
&lt;br /&gt;
パスワードの入力が促され、正しく認証できたら実行できるはず。&lt;br /&gt;
&lt;br /&gt;
0.文字環境を日本語化する&lt;br /&gt;
さくらVPSのデフォルトOSであるCentOSは、英語環境らしい。&lt;br /&gt;
なので、のちのち日本語が含まれたファイルをVPSコントロールパネルの&lt;br /&gt;
コンソール以外のSSH関係のソフトのviで開くと、文字化けが起きてしまう。&lt;br /&gt;
だから以下設定をして日本語環境にする&lt;br /&gt;
&lt;br /&gt;
#cp /etc/sysconfig/i18n /etc/sysconfig/i18n_org&lt;br /&gt;
&lt;br /&gt;
#vi /etc/sysconfig/i18n&lt;br /&gt;
&lt;br /&gt;
#LANG=&quot;C&quot;&lt;br /&gt;
LANG=&quot;ja_JP.UTF-8&quot;&lt;br /&gt;
&lt;br /&gt;
いったんSSH終了する&lt;br /&gt;
#exit&lt;br /&gt;
&lt;br /&gt;
#printenv | grep LANG&lt;br /&gt;
LANG=ja_JP.UTF8&lt;br /&gt;
と表示されるOK&lt;br /&gt;
&lt;br /&gt;
1.サーバへSSH接続する&lt;br /&gt;
(client)$ssh root@サーバIP&lt;br /&gt;
&lt;br /&gt;
2.ユーザを作成する&lt;br /&gt;
(Server)#adduser hogehoge&lt;br /&gt;
(Server)#passwd hogehoge&lt;br /&gt;
&lt;br /&gt;
Webサイトのドキュメントルートアクセス用に&lt;br /&gt;
ユーザにwww グループにwwwを追加する&lt;br /&gt;
wwwグループ追加&lt;br /&gt;
#groupadd www&lt;br /&gt;
グループにパスワード付与&lt;br /&gt;
#gpasswd www&lt;br /&gt;
&lt;br /&gt;
wwwユーザ追加&lt;br /&gt;
#useradd www&lt;br /&gt;
wwwユーザにパスワード付与&lt;br /&gt;
#passwd www&lt;br /&gt;
&lt;br /&gt;
メインのユーザをwwwグループに追加&lt;br /&gt;
このとき-Gとすること -gとするとプライマリグループを変更してしまうので注意&lt;br /&gt;
#usermod -G www ユーザ名&lt;br /&gt;
&lt;br /&gt;
最後にちゃんと登録されているか確認&lt;br /&gt;
cat /etc/group | grep www&lt;br /&gt;
&lt;br /&gt;
※HTTPの設定のUser Groupをwww wwwに後で変更すること&lt;br /&gt;
　また、ドキュメントルートは、755 もしくは 644にすること&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. sshd設定を変更する&lt;br /&gt;
(Server)#vi /etc/ssh/sshd_config&lt;br /&gt;
&lt;br /&gt;
(1) #Port 22を変更する&lt;br /&gt;
Port 任意のポート番号&lt;br /&gt;
&lt;br /&gt;
(2)SSH接続でrootに直接ログインすることを禁止の編集&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
&lt;br /&gt;
4. SSHデーモン再起動&lt;br /&gt;
(server)$/etc/init.d/sshd restart&lt;br /&gt;
&lt;br /&gt;
5.クライアント側で鍵ペアを作成する&lt;br /&gt;
(client)$ssh-keygen&lt;br /&gt;
&lt;br /&gt;
Enter File in which to save the key.... と聞かれるのでそのままENTER&lt;br /&gt;
Enter passphrase : 任意のパスワードを入力する&lt;br /&gt;
もう一度同じパスワードを入力する&lt;br /&gt;
&lt;br /&gt;
6.~/.ssh/にid_rsaとid_ras.pubができていることを確認する&lt;br /&gt;
id_rsaが秘密かぎ&lt;br /&gt;
id_rsa.pubが公開鍵&lt;br /&gt;
&lt;br /&gt;
7.公開鍵をさくらVPSにscp転送する&lt;br /&gt;
(client)$scp -P SSH設定のポート(デフォルトは22) .ssh/id_rsa.pub ユーザ名@サーバIP:~&lt;br /&gt;
&lt;br /&gt;
8.サーバへ接続&lt;br /&gt;
(client) ssh ユーザ名@サーバIP -p ポート&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
9.サーバ側でユーザの公開鍵をセットするための設定をする&lt;br /&gt;
(server) $mkdir .ssh&lt;br /&gt;
&lt;br /&gt;
(server) $chmod 700 .ssh&lt;br /&gt;
&lt;div&gt;
(server) $mv id_rsa.pub .ssh/&lt;br /&gt;
(server) $cd .ssh&lt;br /&gt;
(server) $touch authorized_keys&lt;br /&gt;
(server) $cat id_rsa.pub &amp;gt;&amp;gt; authorized_keys&lt;br /&gt;
(server) $chmod 600 authorized_keys&lt;/div&gt;
&lt;div&gt;
※authorized_keysファイルを作成する&lt;br /&gt;
(公開鍵を書き込んでおくファイル sshdはこれを確認するので必ず必要。)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
10.ssh接続認証設定を変更する&lt;/div&gt;
&lt;div&gt;
(Server)#vi /etc/ssh/sshd_config&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
RSAAuthentication yes&lt;/div&gt;
&lt;div&gt;
PubkeyAuthentication yes&lt;/div&gt;
&lt;div&gt;
AuthorizedKeysFile %h/.ssh/authorized_keys&lt;/div&gt;
&lt;div&gt;
※%hは各ユーザのホームディレクトリ&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
11. sshを再起動&lt;/div&gt;
&lt;div&gt;
#/etc/init.d/sshd restart&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
12. いったんサーバからでる&lt;/div&gt;
&lt;div&gt;
#exit&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
13. クライアントからssh接続して接続できることを確認&lt;/div&gt;
&lt;div&gt;
ssh ユーザ@サーバIP -i .ssh/id_rsa -p 設定ポート番号&lt;/div&gt;
&lt;div&gt;
または&lt;/div&gt;
&lt;div&gt;
ssh ユーザ@サーバIP -p 設定ポート番号&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
＜おまけ＞&lt;/div&gt;
&lt;div&gt;
クライアントの.sshにconfigファイルを作成し&lt;/div&gt;
&lt;div&gt;
以下を書き込むとより簡単に接続できる。&lt;br /&gt;
複数のサーバをターミナルで管理する場合は、同じ記述を複数繰り返せばよい。&lt;br /&gt;
ただし、id_rsa id_rsa.pub は id_rsa.サーバ名 id_rsa.pub.サーバ名&lt;br /&gt;
とすること。&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ssh 設定サーバ名&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Host 設定サーバ名&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; HostName サーバIP または ドメイン&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; User ユーザ名&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; Port 設定したポート&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; IdentityFile ~/.ssh/id_rsa.サーバ名1&lt;/div&gt;
&lt;div&gt;
Host 設定サーバ名&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; HostName サーバIP または ドメイン&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; User ユーザ名&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; Port 設定したポート&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; IdentityFile ~/.ssh/id_rsa.サーバ名2&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Host 設定サーバ名&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; HostName サーバIP または ドメイン&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; User ユーザ名&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; Port 設定したポート&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; IdentityFile ~/.ssh/id_rsa.サーバ名3&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
以上&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/6700114730283722717/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/vps_15.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/6700114730283722717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/6700114730283722717'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/vps_15.html' title='さくらVPS最初に設定すること'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-7910634460239150898</id><published>2013-05-15T19:58:00.003+09:00</published><updated>2013-05-15T19:58:34.116+09:00</updated><title type='text'>さくらVPSに移行！</title><content type='html'>自宅にてサーバ稼働させていたが、電力料金やらマシンの故障を考えたら&lt;br /&gt;
レンタルサーバに移行することが望ましいと考えたので、&lt;br /&gt;
さくらインターネットのVPSへ移行する。&lt;br /&gt;
そのときのとりあえずメモ。&lt;br /&gt;
&lt;br /&gt;
1.さくらVPSは&lt;br /&gt;
　２週間のお試し期間を試すことができる。&lt;br /&gt;
　この場合は、必ずクレジットカード支払いをしないといけないようだ。&lt;br /&gt;
　ほかに銀行振込等もあるが、これではお試し期間は使用できないよう。&lt;br /&gt;
&lt;br /&gt;
　ただ、逆にすぐにバリバリ使いたいと思っても、本登録して&lt;br /&gt;
　支払いをしても本登録完了のはがきが手元にくるまでは&lt;br /&gt;
　ネームサーバを使用できず、独自ドメインへの変更ができない。&lt;br /&gt;
　うーん、残念。&lt;br /&gt;
&lt;br /&gt;
　あと最近VPSでは標準サービスと思われるスナップショットがない。&lt;br /&gt;
　なんでかな〜。とりあえずサポートには早急に機能追加するようにお願いしてみた。&lt;br /&gt;
&lt;br /&gt;
2.登録までの簡単な流れ&lt;br /&gt;
　さくらインターネットのサイトから、好みのVPSのプランを選択する。&lt;br /&gt;
　申し込み登録をする。&lt;br /&gt;
　２週間お試しするにはクレジット登録が必要。&lt;br /&gt;
&lt;br /&gt;
3.登録後サーバへアクセスする方法&lt;br /&gt;
　登録が終わると、会員ID, サーバrootユーザのパスワードが送付されてくる。&lt;br /&gt;
　メールに記載されているURLよりVPSコントロールパネルへアクセスする。&lt;br /&gt;
&amp;nbsp; &amp;nbsp;メールに記載されているサーバIPと初期パスワードでログインする。&lt;br /&gt;
　仮想サーバ操作で、起動ボタンを押し起動することでサーバは稼働する。&lt;br /&gt;
　ちなみに初期パスワードは、コントロールパネルの右上から変更可能。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;さくらVPSのサーバ操作は、ターミナル経由でするが、&lt;br /&gt;
　コントロールパネルのリモートコンソールが非常に使いづらい。&lt;br /&gt;
　VIの操作が矢印キーが使えないのとたびたび接続が不安定になる。&lt;br /&gt;
&amp;nbsp; &amp;nbsp;JavaプラグインのVNCも不安定かつ遅すぎる。&lt;br /&gt;
　別アプリでターミナル接続するほうがよい。&lt;br /&gt;
&lt;br /&gt;
　Mac OS Xの場合は、標準のターミナル経由。&lt;br /&gt;
　Windowsの場合は、Teratermがよいかな。&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/7910634460239150898/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2013/05/vps.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/7910634460239150898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/7910634460239150898'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2013/05/vps.html' title='さくらVPSに移行！'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-4353586120765625130</id><published>2012-11-25T17:20:00.001+09:00</published><updated>2012-11-25T17:20:39.067+09:00</updated><title type='text'>WindowsからのSFTP接続</title><content type='html'>最近Macからではなく、Windowsからの接続する機会が多い。&lt;br /&gt;
&lt;br /&gt;
Windows8が世間では不評だが、個人的には気に入っている。&lt;br /&gt;
Appleとはそろそろ決別し、Microsoftへ回帰しようと思っている。&lt;br /&gt;
選択と集中！&lt;br /&gt;
Macはデザインはいいが、Windowsと比べると、&lt;br /&gt;
自由さや生産性に欠ける。（単に自分が不慣れなだけか！？）&lt;br /&gt;
&lt;br /&gt;
まぁそういうことはさておいて、件名の件。&lt;br /&gt;
&lt;br /&gt;
FTPはセキュリティ的に危ういので、SFTPを基本としている。&lt;br /&gt;
でもWindowsで選択できるSFTPクライアントツールは、&lt;br /&gt;
WinSCPが支持されているようだが、個人的には、FileZilla。&lt;br /&gt;
WinSCPは、鍵接続にPutty用に変換された鍵しか使用できず、&lt;br /&gt;
別途変換しろと注意されて終わりだが、&lt;br /&gt;
FileZillaは、一応同じように注意するが、その後、自動変換出力してくれる。※出力ファイル名と出力先を指定する必要がある。&lt;br /&gt;
&lt;br /&gt;
このファイルをWinSCPで使用することも可能。&lt;br /&gt;
Puttyを使用したことがある人で変換方法知っている人はよいが、&lt;br /&gt;
もし同じように困っている人は、FileZillaをお試しください。&lt;br /&gt;
&lt;br /&gt;
以上&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/4353586120765625130/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/11/windowssftp.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/4353586120765625130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/4353586120765625130'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/11/windowssftp.html' title='WindowsからのSFTP接続'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-4654099904464510295</id><published>2012-11-25T17:10:00.002+09:00</published><updated>2012-11-25T17:10:43.416+09:00</updated><title type='text'>SSHサーバを鍵認証のみの接続にする</title><content type='html'>SSHサーバへの外部からのアクセスを安全にする。&lt;br /&gt;
その備忘録。&lt;br /&gt;
&lt;br /&gt;
内容としては、以下。 &lt;br /&gt;
・パスワード空のときは接続できない&lt;br /&gt;
・鍵接続のみ。パスワードによる接続は禁止。&lt;br /&gt;
・ROOTでの接続は不可能とする。&lt;br /&gt;
&lt;br /&gt;
1.rootになる&lt;br /&gt;
$su -&lt;br /&gt;
&lt;br /&gt;
2.SSHサーバ設定ファイルを開く&lt;br /&gt;
#vi /etc/ssh/sshd_config&lt;br /&gt;
&lt;br /&gt;
3. 設定ファイルの以下キーワードを有効にする。&lt;br /&gt;
　※先頭に＃がある場合は、削除する。＃はコメントアウトの意味なので。 &lt;br /&gt;
&lt;br /&gt;
・空パスワードを禁止にする設定へ&lt;span class=&quot;ColorConfirm&quot;&gt;変更する&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;ColorConfirm&quot;&gt;PermitEmptyPasswords no&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;ColorConfirm&quot;&gt;・ROOTログイン禁止 &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;ColorConfirm&quot;&gt;&amp;nbsp;PermitRootLogin no&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
・パスワードによるアクセス禁止（＝鍵認証のみ）&lt;br /&gt;
&lt;span class=&quot;ColorConfirm&quot;&gt;PasswordAuthentication no&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;ColorConfirm&quot;&gt;以上&amp;nbsp;&lt;/span&gt;
</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/4654099904464510295/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/11/ssh.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/4654099904464510295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/4654099904464510295'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/11/ssh.html' title='SSHサーバを鍵認証のみの接続にする'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-3862185431592077681</id><published>2012-08-25T22:26:00.001+09:00</published><updated>2012-08-25T22:26:10.202+09:00</updated><title type='text'>SELinuxの無効・有効化</title><content type='html'>SELinuxって本当に厄介だ。&lt;br /&gt;
SELinuxは、ルートに対してもフォルダのアクセス制限を設ける機能らしい。&lt;br /&gt;
万が一侵入やサーバを乗っ取られても被害を最小限に抑えることが目的らしい。&lt;br /&gt;
&lt;br /&gt;
でも！サーバを構築する上で非常に厄介。&lt;br /&gt;
&lt;br /&gt;
たとえば、Windows共有サーバ＝Sambaサーバを構築しても&lt;br /&gt;
SELinuxが有効であれば、普通に構築するだけではサーバにアクセスはできても&lt;br /&gt;
ファイルの読み書きなどができない・・・。&lt;br /&gt;
&lt;br /&gt;
サーバ構築の際、動作確認するためには、SELinuxを一時的に無効にしたほうが&lt;br /&gt;
いいときもある。&lt;br /&gt;
&lt;br /&gt;
そこでその方法について備忘録。&lt;br /&gt;
&lt;br /&gt;
■SELinuxの状態確認&lt;br /&gt;
#getenforce&lt;br /&gt;
Enforcing　有効&lt;br /&gt;
Permissive &amp;nbsp; 無効&lt;br /&gt;
&lt;br /&gt;
■SELinuxを有効化（次回OS再起動まで有効)&lt;br /&gt;
#setenforce 1&lt;br /&gt;
&lt;br /&gt;
■SELinuxを無効化 (次回OS再起動まで有効)&lt;br /&gt;
#setenforce 0&lt;br /&gt;
&lt;br /&gt;
■SELinuxを永久に有効化&lt;br /&gt;
#vi /etc/selinux/config&lt;br /&gt;
&lt;br /&gt;
SELinux=enforcing&lt;br /&gt;
&lt;br /&gt;
■SELinuxを永久に無効化&lt;br /&gt;
#vi /etc/selinux/config&lt;br /&gt;
&lt;br /&gt;
SELinux=disabled&lt;br /&gt;
&lt;br /&gt;
以上</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/3862185431592077681/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/08/selinux.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/3862185431592077681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/3862185431592077681'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/08/selinux.html' title='SELinuxの無効・有効化'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-8924076643071956498</id><published>2012-08-22T13:06:00.004+09:00</published><updated>2012-08-22T13:07:01.649+09:00</updated><title type='text'>動画・写真配信サーバ構築(DLNAサーバ)</title><content type='html'>写真や動画を一元管理するため、DLNAサーバを構築する。&lt;br /&gt;
&lt;br /&gt;
DLNAサーバとは、写真や動画をネットワーク経由でストリーミング配信するもの。&lt;br /&gt;
このサーバを設置すると、iPhoneやiPad、パソコンでファイルを見ることができる。&lt;br /&gt;
&lt;br /&gt;
その備忘録。&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #a64d79;&quot;&gt;&amp;lt; 注意 &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #a64d79;&quot;&gt;mediatombをyumでインストールするためには、まずRPMforgeリポジトリを追加する&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #a64d79;&quot;&gt;必要があるらしいが、これが結構厄介。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #a64d79;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #a64d79;&quot;&gt;priority=1と設定する必要があるが、mediatombインストール後、mediatombの設定変更前に&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #a64d79;&quot;&gt;priority=1はコメントアウトするようにしたほうがよい。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #a64d79;&quot;&gt;こうしないと、それ以後、yumを使ってupdateやinstallができなくなる。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #a64d79;&quot;&gt;また、mediatombインストールし設定変更後に上記priority=1をコメントアウトして、&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #a64d79;&quot;&gt;yum updateを行うと折角設定したものが、初期化されてしまい、また設定し直し・・・&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #a64d79;&quot;&gt;ということになりかねない。&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;■RPMfrogeリポジトリ導入&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
注意!! CentOS6の場合は、以下だがCentOS5の場合は少し違うので注意。&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;1. yumのplugin-prioritiesをインストールする。&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
#yum -y install yum-plugin-priorities&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;2. 標準リポジトリ設定ファイル編集&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
#vi /etc/yum.repos.d/CentOS-Base.repo&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;↓ ----- ここから設定ファイル本文&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
[base]&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
name=CentOS-$releasever - Base&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;arch=$basearch&amp;amp;repo=os&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
gpgcheck=1&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;priority=1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
#released updates&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
[updates]&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
name=CentOS-$releasever - Updates&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;arch=$basearch&amp;amp;repo=updates&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
gpgcheck=1&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;priority=1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px; min-height: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
#additional packages that may be useful&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
[extras]&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
name=CentOS-$releasever - Extras&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;arch=$basearch&amp;amp;repo=extras&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
gpgcheck=1&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;priority=1&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;↑ ----- ここまで設定ファイル本文&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;b&gt;&lt;u&gt;3. rpmforgeの最新版をダウンロードする。&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #a64d79; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;注意!! 最新版を&lt;/span&gt;&lt;span style=&quot;color: #a64d79; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;確認し、URL指定すること。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;#wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;4. RMPForgeリポジトリをインストールする&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;#rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;5.ダウンロードしたファイルを削除する&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;#rm -f rpmforge-release-*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;6.rpmforge-releaseをアップデートする&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;#yum -y update&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;rpm forge-release&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: large; line-height: 22px;&quot;&gt;■DLNAサーバソフトmediatombインストール&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;1. mediatombをダウンロード&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; 本家サイト&amp;nbsp;&lt;/span&gt;&lt;/span&gt;http://mediatomb.cc/pages/download#source_codeから最新のバージョンを確認。&lt;br /&gt;
(2012.08.21時点の最新をダウンロード)&lt;br /&gt;
&lt;br /&gt;
#wget http://jaist.dl.sourceforge.net/sourceforge/mediatomb/mediatomb-0.12.1.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;2. ダウンロードしたMediatombパッケージを展開&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
#tar zxvf mediatomb-0.12.1.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;3. /usr/src/にredhatディレクトリを作成&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
#mkdir /usr/src/redhat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;4. /usr/src/redhatにSPECSディレクトリを作成&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
#mkdir /usr/src/redhat/SPECS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;5. /usr/src/redhatにSOURCEディレクトリを作成&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#mkdir /usr/src/redhat/SOURCE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;6. 権限を付与&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#chmod 755 -R /usr/src/redhat&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;7. ダウンロードしたファイル mediatomb.specをコピー&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#cp mediatomb-0.12.1/mediatomb.spec /usr/src/redhat/SPECS/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;8.ダウンロードしたファイルmediatomb-0.12.1.tar.gzをコピー&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#cp mediatomb-0.12.1.tar.gz /usr/src/redhat/SOURCES/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#cp mediatomb-0.12.1.tar.gz /root/rpmbuild/SOURCES/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;9. mediatomb.specをバックアップ待避&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#cp /usr/src/redhat/SPECS/mediatomb.spec　&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;/usr/src/redhat/SPECS/mediatomb_orignal.spec&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;10. mediatomb.specのBuildRequiresのモジュール定義を編集&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
変更前&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
BuildRequires: sqlite-devel, mysql-devel, libexif-devel, taglib-devel, file-devel, js-devel, zlib-devel&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;変更後&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;BuildRequires: sqlite-devel, mysql-devel, libexif-devel, taglib-devel, &lt;span style=&quot;color: blue;&quot;&gt;file&lt;/span&gt;, js-devel, zlib-devel, &lt;span style=&quot;color: #cc0000;&quot;&gt;expat-devel&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;11. MediaTombのRPMを作成する&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;#rpmbuild -bb --clean /usr/src/redhat/SPECS/mediatomb.spec&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;※ここでもしビルド依存性の失敗でエラーが発生した場合、&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp;必要なモジュールをすべてyumインストールすればよい。&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp;その後、再度11.のRPM作成を実行。&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;ex) taglib-devel is needed by ... とエラー表記されている場合&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#yum -y install taglib-devel&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;12.MediaTombのRPMインストール&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#yum -y localinstall --nogpgcheck /root/rpmbuild/RPMS/x86_64/mediatomb-0.12.1-1.el6.x86_64.rpm&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;13.後始末(インストールに使用したファイルを削除)&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#rm -f /root/rpmbuild/RPMS/x86_64/mediatomb-*&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#rm -rf mediatomb-0.12.1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#rm -f mediatomb-0.12.1.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;color: #a64d79;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;14. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;2. 標準リポジトリ設定ファイル編集のpriority記述をコメントアウトする。&lt;/span&gt;&lt;span style=&quot;color: #a64d79; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;(重要)&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;15. ファイアウォールのポート50500 TCP/UDP許可する。&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: large; line-height: 22px;&quot;&gt;■MySQLデータベース作成&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;1. MySQLにログイン&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#mysql -u root -p&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;2. mediatombデータベースを作成&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;mysql &amp;gt; create database mediatomb;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;3.mediatombユーザ作成&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;mysql &amp;gt; grant all privileges on&amp;nbsp;media tomb.* to mediatomb@localhost identified by &#39;パスワード&#39;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;4. MySQLログアウト&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;mysql &amp;gt; exit;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;5.mediatombデータベース初期設定&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#mysql -p mediatomb &amp;lt; /usr/share/mediatomb/mysql.sql&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;Enter password:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: large; line-height: 22px;&quot;&gt;■Mediatomb設定・稼働開始&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;&lt;u&gt;1. mediatomb設定ファイルを待避&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#cp /etc/mediatomb.conf /etc/mediatomb_original.conf&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;2.MediaTombの設定ファイルを変更する&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#vi /etc/mediatomb.conf&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;↓ ----- ここから設定ファイル本文&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
MT_INTERFACE=&quot;NOT_SET&quot;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
↓&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
MT_INTERFACE=&quot;eth0&quot;　←　ネットワークインタフェース名を指定&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: small; line-height: 22px;&quot;&gt;↑----- ここまで設定ファイル本文&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;. config.xmlを作成するため起動し、即終了させる。&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;#service mediatomb start; service&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;mediatomb stop&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;4. MegiaTombのconfig.xmlファイルを編集する。&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#vi /etc/mediatomb/config.xml&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;↓ ----- ここから設定ファイル本文&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ブラウザアクセス時にログイン認証する --&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;accounts enabled=&quot;yes&quot; session-timeout=&quot;30&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;account user=&quot;shuji&quot; password=&quot;shujinewhara19805587&quot;/&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/accounts&amp;gt;&lt;br /&gt;
&amp;lt;!-- ここまで --&amp;gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;storage&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;lt;!--sqliteを無効化--&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;sqlite3 enabled=&quot;&lt;span style=&quot;color: blue;&quot;&gt;no&lt;/span&gt;&quot;&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;database-file&amp;gt;mediatomb.db&amp;lt;/database-file&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/sqlite3&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;lt;!--mysql有効化--&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;mysql enabled=&quot;&lt;span style=&quot;color: blue;&quot;&gt;yes&lt;/span&gt;&quot;&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;host&amp;gt;localhost&amp;lt;/host&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;username&amp;gt;mediatomb&amp;lt;/username&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;lt;!--MySQL mediatombユーザのパスワードを指定--&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #cc0000;&quot;&gt; &amp;lt;password&amp;gt;パスワード&amp;lt;/password&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;database&amp;gt;mediatomb&amp;lt;/database&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/mysql&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/storage&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px; min-height: 13px;&quot;&gt;
&amp;lt;!--PS3を使う人はここをyes に--&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;protocolInfo extend=&quot;&lt;span style=&quot;color: blue;&quot;&gt;yes&lt;/span&gt;&quot;/&amp;gt;&amp;lt;!-- For PS3 support change to &quot;yes&quot; --&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px; min-height: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;lt;import hidden-files=&quot;no&quot;&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;filesystem-charset&amp;gt;UTF-8&amp;lt;/filesystem-charset&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;metadata-charset&amp;gt;CP932&amp;lt;/metadata-charset&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;extension-mimetype ignore-unknown=&quot;no&quot;&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;jpg&quot; to=&quot;image/jpeg&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;jpeg&quot; to=&quot;image/jpeg&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;gif&quot; to=&quot;image/gif&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;png&quot; to=&quot;image/png&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;m4v&quot; to=&quot;video/mp4&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;mp4&quot; to=&quot;video/mp4&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;mpg&quot; to=&quot;video/mpeg&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;mpeg&quot; to=&quot;video/mpeg&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;mp3&quot; to=&quot;audio/mpeg&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;ogg&quot; to=&quot;application/ogg&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;asf&quot; to=&quot;video/x-ms-asf&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;asx&quot; to=&quot;video/x-ms-asf&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;wma&quot; to=&quot;audio/x-ms-wma&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;wax&quot; to=&quot;audio/x-ms-wax&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;wmv&quot; to=&quot;video/x-ms-wmv&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;wvx&quot; to=&quot;video/x-ms-wvx&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;wm&quot; to=&quot;video/x-ms-wm&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;wmx&quot; to=&quot;video/x-ms-wmx&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;m3u&quot; to=&quot;audio/x-mpegurl&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;pls&quot; to=&quot;audio/x-scpls&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;map from=&quot;flv&quot; to=&quot;video/x-flv&quot;/&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;!-- Uncomment the line below for PS3 divx support --&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;lt;!--PS3でdivX対応させる場合はここをコメントアウトをはずす--&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; &amp;lt;map from=&quot;avi&quot; to=&quot;video/divx&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 --&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;!-- &amp;lt;map from=&quot;avi&quot; to=&quot;video/avi&quot;/&amp;gt; --&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/extension-mimetype&amp;gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: small; line-height: 22px;&quot;&gt;↑ ----- ここまで設定ファイル本文&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;5. Mediatomb起動&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#service mediatomb start&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;u&gt;&lt;b&gt;6. Mediatombサービス自動起動設定&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;#chkconfig mediatomb on&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large; line-height: 22px;&quot;&gt;■MediaTombサーバで公開するファイルを選択&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;
&lt;u&gt;&lt;b&gt;1. ブラウザのアドレスバーからMediaTombにアクセス&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
http://サーバのアドレス:50500&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;2. ログイン画面が表示される&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOOfVr4d9rnRAzj3TH8-2zwW1uDF6Ed0GdkphZhkne4YLOH5gX0Lx5PaTS2TR4tFMWVAEp35huQztkP6EOOWczlGBZANTCKQahhG15w0rRETTbechRqurxmcn0tzb7l7I-Ic-u_kNJ9-w/s1600/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+2012-08-22+12.46.35.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOOfVr4d9rnRAzj3TH8-2zwW1uDF6Ed0GdkphZhkne4YLOH5gX0Lx5PaTS2TR4tFMWVAEp35huQztkP6EOOWczlGBZANTCKQahhG15w0rRETTbechRqurxmcn0tzb7l7I-Ic-u_kNJ9-w/s320/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+2012-08-22+12.46.35.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;u&gt;&lt;b&gt;3. ユーザ名・パスワードを入力&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
※&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;MegiaTombのconfig.xmlファイルのaccountタグ設定と同一を入力する&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;4. MediaTombの画面が表示される&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2vnj9iTVk_MVSLyYzRWD0rCu2wfGU9ROyUTV-PpLgJJudxj944I-FTLQNIpnRAK93rjEKS2x15VViKFAEyQT3Hk4L0h0w12G_eoEWzyGRT0L31_z0bUNU6MV-1GFnx62z8IoMZveW3iw/s1600/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+2012-08-22+12.53.19.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2vnj9iTVk_MVSLyYzRWD0rCu2wfGU9ROyUTV-PpLgJJudxj944I-FTLQNIpnRAK93rjEKS2x15VViKFAEyQT3Hk4L0h0w12G_eoEWzyGRT0L31_z0bUNU6MV-1GFnx62z8IoMZveW3iw/s320/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+2012-08-22+12.53.19.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;5. 公開するファイルを選択&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
左上のFileSystemをクリックする。&lt;br /&gt;
サーバのディレクトリツリーが表示される。&lt;br /&gt;
任意のディレクトリまたはファイルを選択し、右上のプラスボタンで追加する。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN0uUNOmsi6VHGjetToSkJHkCrVzIGqwLxrhmpOjQK1mrNh2HCrrYMrMmQZDnoBLYhtpIbjaXQTxEz3K1-ejmPj_RetfRm5h7vq1_gQC-vyiMtAv80kS8gWfVklX9OHYd1w_wmkM0rjLc/s1600/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+2012-08-22+12.50.55.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN0uUNOmsi6VHGjetToSkJHkCrVzIGqwLxrhmpOjQK1mrNh2HCrrYMrMmQZDnoBLYhtpIbjaXQTxEz3K1-ejmPj_RetfRm5h7vq1_gQC-vyiMtAv80kS8gWfVklX9OHYd1w_wmkM0rjLc/s320/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+2012-08-22+12.50.55.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;6. 選択したファイルが公開されているか確認する。&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;
&lt;br /&gt;
左上のDataBaseをクリックする。&lt;br /&gt;
追加したディレクトリのツリーと、&lt;br /&gt;
写真を追加したらPhotos, 動画はMovieなどの表示がされていればOK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh98EC60PenDfAsI0WHVotkHjPk3_10Zr8Sd8_Upg9E9AWrO_Z9DZWuk_Z0N2cLhHekH6dZLhAo10TDCukR3bIFoUz5poI5QNjq1TH35BzHbYBwYJGL_ao8-SopQePy9299Mqwc3gYtj_A/s1600/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2012-08-22+12.51.07.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;249&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh98EC60PenDfAsI0WHVotkHjPk3_10Zr8Sd8_Upg9E9AWrO_Z9DZWuk_Z0N2cLhHekH6dZLhAo10TDCukR3bIFoUz5poI5QNjq1TH35BzHbYBwYJGL_ao8-SopQePy9299Mqwc3gYtj_A/s320/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2012-08-22+12.51.07.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;u&gt;ちなみに、公開したファイルを左クリックするとダウンロードできます。&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large; line-height: 22px;&quot;&gt;■MediaTombクライアントで公開ファイルを閲覧&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
iPhoneやiPadで DLNAアプリをインストールして閲覧できます。&lt;br /&gt;
確認したところ、まだあまり使いやすいアプリはないみたいです・・・。&lt;br /&gt;
&lt;br /&gt;
またなぜかサーバ側のMediaTombを再起動しないと、クライアント側で、&lt;br /&gt;
MediaTombの検索に失敗してしまうみたい・・・。&lt;br /&gt;
&lt;br /&gt;
サーバ側の問題！？またこの件については解決次第追記します。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
以上&lt;/div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/8924076643071956498/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/08/dlna.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8924076643071956498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8924076643071956498'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/08/dlna.html' title='動画・写真配信サーバ構築(DLNAサーバ)'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOOfVr4d9rnRAzj3TH8-2zwW1uDF6Ed0GdkphZhkne4YLOH5gX0Lx5PaTS2TR4tFMWVAEp35huQztkP6EOOWczlGBZANTCKQahhG15w0rRETTbechRqurxmcn0tzb7l7I-Ic-u_kNJ9-w/s72-c/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+2012-08-22+12.46.35.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-1525026264867631944</id><published>2012-08-21T14:30:00.004+09:00</published><updated>2012-08-22T20:31:57.980+09:00</updated><title type='text'>内部向DNSサーバ</title><content type='html'>&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;自宅サーバを用意したものの、LAN内からドメインでのサイトアクセスが&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;できない。&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;coregaのルータを使用しているときは何も気にせずアクセスできていたが、&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;NECのAtermにかえてからできなくなった。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;内部向けDNSサーバを構築することで、内部からでもwwwアクセスできるらしい。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;そのときの備忘録。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;


&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;なお、構築に関して、こちらのサイトを参考にさせていただきました。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;とても参考になりました。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;http://centossrv.com/bind.shtml&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;

&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;ホスト名：websaba.com&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;内部IP：192.168.0.20&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;DNSソフト : BIND&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;内部向けDNSサーバとして構築し、外部向け設定は省略する。(※1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;すべての操作はrootで行う。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#は、rootユーザでの操作を意味する。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;朱色は&lt;span style=&quot;color: #e69138;&quot;&gt;コメントアウト箇所&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;赤色は&lt;span style=&quot;color: blue;&quot;&gt;追加箇所&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;青色は&lt;span style=&quot;color: #cc0000;&quot;&gt;変更箇所&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;注意点として、&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;設定ファイルの&lt;b&gt;&quot;}&quot;&lt;/b&gt;のあとは、&lt;b&gt;&quot;;&quot;&lt;/b&gt;(セミコロン)が必要なので注意！&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;1. BIND一連のソフトをインストールする&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#yum -y install bind bind-chroot caching-nameserver&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;2.&amp;nbsp;chroot化(※2)のためスクリプトを作成する。&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#vi bind-chroot-admin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 22px;&quot;&gt;↓ ----- ここからスクリプト本文&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;#!/bin/sh&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;# bind-chroot install check
rpm -q bind-chroot &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
[ $? -ne 0 ] &amp;amp;&amp;amp; echo bind-chroot not install &amp;amp;&amp;amp; exit 1

# bind-chroot enabled
sed -i &#39;/^ROOTDIR=/d&#39; /etc/sysconfig/named
echo ROOTDIR=/var/named/chroot &amp;gt;&amp;gt; /etc/sysconfig/named

# file copy
filelist=`mktemp`
rpm -ql bind|grep ^/etc &amp;gt;&amp;gt; ${filelist}
rpm -ql bind|grep ^/var &amp;gt;&amp;gt; ${filelist}
for file in `cat ${filelist}`
do
  # directory make
  if [ -d ${file} ]; then
      DIRNAME=/var/named/chroot${file}
      [ ! -d ${DIRNAME} ] &amp;amp;&amp;amp; mkdir -p ${DIRNAME}
  fi
  # file copy
  if [ -f ${file} ]; then
      DIRNAME=/var/named/chroot`dirname ${file}`
      [ ! -d ${DIRNAME} ] &amp;amp;&amp;amp; mkdir -p ${DIRNAME}
      /bin/cp -a ${file} ${DIRNAME}
  fi
done
rm -f ${filelist}

chown named:named /var/named/chroot/var/named/data
chmod 770 /var/named/chroot/var/named/data
chown named:named /var/named/chroot/var/named/dynamic&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;echo &quot;Finished.&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;exit&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↑ ----- ここまでスクリプト本文&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;3. chrootスクリプト(2.で作成したスクリプト)を実行する&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#sh bind-chroot-admin&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;4. BIND設定ファイル書き換える前に別名保存(待避)させておく。&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#cp /var/named/chroot/etc/named.conf /var/named/chroot/etc/named_original.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;5. BIND設定ファイル書き換える。&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#vi /var/named/chroot/etc/named.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↓ ----- ここからBIND設定ファイル本文&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;options {
        &lt;span style=&quot;color: #e69138;&quot;&gt;#listen-on port 53 { 127.0.0.1; };&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;        #listen-on-v6 port 53 { ::1; };&lt;/span&gt;
        version         &quot;unknown&quot;;　←　bindのバージョン情報の非表示化
        directory       &quot;/var/named&quot;;
        dump-file       &quot;/var/named/data/cache_dump.db&quot;;
        statistics-file &quot;/var/named/data/named_stats.txt&quot;;
        memstatistics-file &quot;/var/named/data/named_mem_stats.txt&quot;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;#サーバー及び、サーバーと同じネットワーク内のホストからの問合せのみ許可する。
        allow-query     { localhost; localnets; };&lt;/span&gt;
        recursion yes;
        
        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file &quot;/etc/named.iscdlv.key&quot;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;        forwarders{&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;#ルータ経由の場合は、ルータのアドレスを設定する
                192.168.0.1;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;#プロバイダのDNSサーバを設定する ex)フレッツ東日本の場合&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;                220.210.194.67;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;                220.210.194.68;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;        };&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;};

logging {
        channel default_debug {
                file &quot;data/named.run&quot;;
                severity dynamic;
        };&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;#error (connection refused) resolvingエラーログの出力抑止
        category lame-servers { null; };&lt;/span&gt;
};
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;#内部向け設定&lt;/span&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;view &quot;internal&quot; {
        match-clients { localnets; };
        match-destinations { localnets; };
&lt;/span&gt;
zone &quot;.&quot; IN {
        type hint;
        file &quot;named.ca&quot;;
};

include &quot;/etc/named.rfc1912.zones&quot;;
&lt;span style=&quot;color: #cc0000;&quot;&gt;        include &quot;/etc/named.websaba.com.zone&quot;;&lt;/span&gt;
};
&lt;/span&gt;&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↑ ----- ここまでBIND設定ファイル&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;6.内部向けDNS用のゾーン定義ファイルを作成する&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;
&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#vi /var/named/chroot/etc/named.websaba.com.zone&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↓ ----- ここから設定ファイル本文&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;zone &quot;websaba.com&quot; {
        type master;
        file &quot;websaba.com.db&quot;;
};
zone &quot;0.168.192.in-addr.arpa&quot; {
        type master;
        file &quot;0.168.192.in-addr.arpa.db&quot;;
};&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↑ ----- ここまで設定ファイル本文&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;7. IPv4のみ有効にする(error network unreachable resolvingエラーログの出力抑制)&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#echo OPTIONS=&quot;-4&quot; &amp;gt;&amp;gt; /etc/sysconfig/named&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;8. ルートゾーン最新化&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#dig . ns @198.41.0.4 +bufsize=1024 &amp;gt; /var/named/chroot/var/named/named.ca&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;9. ルートゾーン自動更新スクリプト作成&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#vi named.root_update&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↓ ----- ここからスクリプト本文&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;min-height: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;new=`mktemp`&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;errors=`mktemp`&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;min-height: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;dig . ns @198.41.0.4 +bufsize=1024 &amp;gt; $new 2&amp;gt; $errors&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;min-height: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;if [ $? -eq 0 ]; then&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; sort_new=`mktemp`&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; sort_old=`mktemp`&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; diff_out=`mktemp`&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; sort $new &amp;gt; $sort_new&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; sort /var/named/chroot/var/named/named.ca &amp;gt; $sort_old&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; diff --ignore-matching-lines=^\; $sort_new $sort_old &amp;gt; $diff_out&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; if [ $? -ne 0 ]; then&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &#39;-------------------- old named.root --------------------&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cat /var/named/chroot/var/named/named.ca&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &#39;-------------------- new named.root --------------------&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cat $new&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &#39;---------------------- difference ----------------------&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cat $diff_out&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ) | mail -s &#39;named.root updated&#39; root&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cp -f $new /var/named/chroot/var/named/named.ca&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chown named. /var/named/chroot/var/named/named.ca&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chmod 644 /var/named/chroot/var/named/named.ca&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /etc/rc.d/init.d/named restart &amp;gt; /dev/null&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; rm -f $sort_new $sort_old $diff_out&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; cat $errors | mail -s &#39;named.root update check error&#39; root&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;fi&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;rm -f $new $errors&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↑ ----- ここまでスクリプト本文&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;10. ルートゾーン自動更新スクリプトの実行権限を変更&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#chmod 700 named.root_update&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;11. ルートゾーン自動更新スクリプト自動実行 (月次実行)&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#cp named.root_update /etc/cron.monthly&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;12.内部向け正引きゾーンデータベース作成&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#vi /var/named/chroot/var/named/websaba.com.db&lt;/span&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;
&lt;br /&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↓ ----- ここから設定ファイル本文&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;$TTL&amp;nbsp; &amp;nbsp; 86400&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;@ &amp;nbsp; &amp;nbsp; &amp;nbsp; IN&amp;nbsp; &amp;nbsp; &amp;nbsp; SOA &amp;nbsp; &amp;nbsp; websaba.com.&amp;nbsp; root.websaba.com.(&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2011062001 ; Serial&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 28800&amp;nbsp; &amp;nbsp; &amp;nbsp; ; Refresh&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 14400&amp;nbsp; &amp;nbsp; &amp;nbsp; ; Retry&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3600000&amp;nbsp; &amp;nbsp; ; Expire&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 86400 )&amp;nbsp; &amp;nbsp; ; Minimum&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IN NS&amp;nbsp; &amp;nbsp; &amp;nbsp;websaba.com.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IN MX 10 websaba.com.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;@ &amp;nbsp; &amp;nbsp; &amp;nbsp; IN A &amp;nbsp; &amp;nbsp; 192.168.1.20　←　サーバーのプライベートIPアドレスを指定(websaba.com用)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; IN A &amp;nbsp; &amp;nbsp; 192.168.1.20　←　サーバーのプライベートIPアドレスを指定(*.websaba.com用)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;pre style=&quot;font-size: medium; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↑ ----- ここまで設定ファイル本文&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-size: medium; line-height: 22px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-size: medium; line-height: 22px;&quot;&gt;&lt;/pre&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;13.内部向け逆引きゾーンデータベース作成&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#vi /var/named/chroot/var/named/0.168.192.in-addr.arpa.db&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↓ ----- ここから設定ファイル本文&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;$TTL&amp;nbsp; &amp;nbsp; 86400&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;@ &amp;nbsp; &amp;nbsp; &amp;nbsp; IN&amp;nbsp; &amp;nbsp; &amp;nbsp; SOA &amp;nbsp; &amp;nbsp; websaba.com.&amp;nbsp; root.websaba.com.(&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2011062001 ; Serial&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 28800&amp;nbsp; &amp;nbsp; &amp;nbsp; ; Refresh&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 14400&amp;nbsp; &amp;nbsp; &amp;nbsp; ; Retry&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3600000&amp;nbsp; &amp;nbsp; ; Expire&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 86400 )&amp;nbsp; &amp;nbsp; ; Minimum&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IN&amp;nbsp; &amp;nbsp; &amp;nbsp; NS&amp;nbsp; &amp;nbsp; websaba.com.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;20 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IN&amp;nbsp; &amp;nbsp; &amp;nbsp; PTR &amp;nbsp; websaba.com.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;　←　&lt;/span&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;行先頭にサーバのLANの最下位アドレスを指定すること&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;↑ ----- ここまで設定ファイル本文&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;u&gt;&lt;b&gt;14.bind再起動&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#/etc/rc.d/init.d/named restart&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;or&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;#service named restart&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;u&gt;&lt;b&gt;15. ルータの53番ポートをTCP/UDP共に解放する。&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;ここはルータ毎の設定によるので、詳細は省略。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;u&gt;&lt;b&gt;16. iptablesでファイアウォール構築している場合は、53番を解放する。&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;&lt;u&gt;17. 自宅内のパソコンのDNS設定を変更する&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;DNSサーバのIPが192.168.0.20&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;ルータのIPが192.168.0.1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;の場合、&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;DNSに上記IPを割り当てればよい。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;結果、自宅内部からwwwドメインで自分のサイトにアクセスできるようになった。&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;(※1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;著者の環境は固定IPではないため、内部向けのDNSサーバとする。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 固定IPでなければ外部向けDNSサーバは構築できないようです。&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;(※2)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; chrootとは、もしサーバが乗っ取られた場合にそのパス以外にアクセスできない&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;ようにする機構のこと。&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Osaka; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/1525026264867631944/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/08/dns.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/1525026264867631944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/1525026264867631944'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/08/dns.html' title='内部向DNSサーバ'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-3403896497329962863</id><published>2012-08-21T10:55:00.003+09:00</published><updated>2012-08-21T10:55:47.607+09:00</updated><title type='text'>ファイアウォールをコマンドで実行する</title><content type='html'>ファイアウォールをコマンドで実行する方法の備忘録。&lt;br /&gt;
&lt;br /&gt;
iptablesが正体。&lt;br /&gt;
IPv6用にip6tablesもあるのでそれも同時に行う方がベター。&lt;br /&gt;
&lt;br /&gt;
ルートユーザで行うこと。&lt;br /&gt;
&lt;br /&gt;
■iptablesの起動&lt;br /&gt;
#/etc/rc.d/init.d/iptables restart&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
■ip6tablesの起動&lt;br /&gt;
#/etc/rc.d/init.d/ip6tables restart&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
■iptables ip6tablesの自動起動設定&lt;br /&gt;
#chkconfig iptables on&lt;br /&gt;
#chkconfig ip6tables on&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
■自動起動設定の確認&lt;/div&gt;
&lt;div&gt;
#chkconfig --list iptables&lt;/div&gt;
&lt;div&gt;
#chkconfig --list ip6tables&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
※3 4 5 が:onとなっていればよい&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
　確認には、別な方法もある&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;chkconfig | grep iptables&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;chkconfig | grep ip6tables&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
以上&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/3403896497329962863/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/08/blog-post_21.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/3403896497329962863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/3403896497329962863'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/08/blog-post_21.html' title='ファイアウォールをコマンドで実行する'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-3818938307437248845</id><published>2012-07-21T14:55:00.000+09:00</published><updated>2012-07-21T14:55:30.399+09:00</updated><title type='text'>CSVファイルをMySQLに取り込む</title><content type='html'>ソフトで毎回MySQL DBをオープンして登録するより、&lt;br /&gt;
ファイルに一気に出力し、そのあと一気にMySQLに登録させる方が早いことに気づいた。&lt;br /&gt;
その備忘録。&lt;br /&gt;
&lt;br /&gt;
MySQL コマンド&lt;br /&gt;
load data local infile &quot;CSVファイルのパス&quot; into table テーブル名 fields terminated by &#39;,&#39;&lt;br /&gt;
&lt;br /&gt;
使用例)&lt;br /&gt;
CSVファイルは、/homeディレクトリ直下にData.csvがある。&lt;br /&gt;
CSVファイルは、,で区切られている。&lt;br /&gt;
登録するテーブルは、DataTableとする。&lt;br /&gt;
&lt;br /&gt;
mysql &amp;gt; load data local infile /home/Data.csv into table DataTable fields terminated by &#39;,&#39;; [ENTER]&lt;br /&gt;
&lt;br /&gt;
※注意点&lt;br /&gt;
CSVファイルの,区切りで区切られている順に登録テーブルの列が定義されていること。&lt;br /&gt;
CSVファイルの文字列は、&quot;&quot; または &#39;&#39; で囲まれていないこと。&lt;br /&gt;
もし、&quot;&quot;で囲まれている場合は、以下をSQLの最後に追加すればよい。&lt;br /&gt;
&lt;br /&gt;
enclosed by &#39;&quot;&#39;;&lt;br /&gt;
&lt;br /&gt;
以上</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/3818938307437248845/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/07/csvmysql.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/3818938307437248845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/3818938307437248845'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/07/csvmysql.html' title='CSVファイルをMySQLに取り込む'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-8140454571462030814</id><published>2012-07-01T22:26:00.001+09:00</published><updated>2012-07-02T20:12:37.179+09:00</updated><title type='text'>自宅サーバ再構築全手順</title><content type='html'>&lt;div style=&quot;background-color: white; margin-bottom: 8px; margin-left: 16px; margin-right: 16px; margin-top: 8px; min-width: 0px; width: 653px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
自宅サーバを一から構築するときの全手順をここにまとめる。&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
構築するサーバは、HTTPDサーバ、MySQLサーバ、SSHサーバとする。&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
おおまかな手順として、以下となる。&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;h4&gt;




A. (旧サーバ) データ・設定のバックアップ&lt;br /&gt;B. &amp;nbsp;OSの再インストール&lt;br /&gt;C. (新サーバ) 初期設定&lt;br /&gt;D. (新サーバ) サーバに必要な設定・ソフトウェアのインストール・調整&lt;br /&gt;E. (新サーバ) 旧サーバデータの復元&lt;/h4&gt;
&lt;div&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;h3&gt;




A. (旧サーバ) データ・設定のバックアップ&lt;/h3&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
バックアップ場所は、外付けHDDのBackupフォルダ(/media/HDD/Backup)とする。&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;u&gt;1.MySQLのデータベースを全バックアップする。&lt;/u&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp;#su -&lt;br /&gt;
&amp;nbsp;#mysqldump --opt -u root -p --all-databases &amp;gt; /media/HDD/Backup/mysqlbackup.dump&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;
&lt;u&gt;2.MySQLの設定ファイルをバックアップする&lt;/u&gt;&lt;br /&gt;
&amp;nbsp; ※アクセス権もそのままでコピーしておけばそのまま使える&lt;br /&gt;
etcディレクトリ作成&lt;br /&gt;
#mkdir /media/HDD/Backup/etc&lt;br /&gt;
元設定ファイルをコピー&lt;br /&gt;
#cp /etc/my.cnf /media/HDD/Backup/etc/my.cnf&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;3.PHPの設定ファイルをバックアップする&lt;/u&gt;&lt;br /&gt;
#cp&amp;nbsp;/etc/php.ini /media/HDD/Backup/etc/php.ini&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;4.HTTPの設定ファイルをバックアップする&lt;/u&gt;&lt;br /&gt;
#mkdir -R /etc/httpd/conf&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
#cp /etc/httpd/conf/httpd.conf /media/HDD/Backup/etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;u&gt;5.その他、サイトサービスに関係するソフト・ファイルを退避する&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;




B. &amp;nbsp;OSの再インストール&lt;/h3&gt;
&lt;u&gt;1.CentOS6のイメージを焼いたCDをPCにセットし、CDブートさせる。&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;2. 言語は、英語を選択する&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;3.HDDはカスタムレイアウトにする。&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;




C. (新サーバ) 初期設定&lt;/h3&gt;
&lt;u&gt;1. ファイアウォールの以下のポート許可する。&lt;/u&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SSH &amp;nbsp; &amp;nbsp; &amp;nbsp;(22) &amp;nbsp; &amp;nbsp; &amp;nbsp;TCP/UDP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; smtp &amp;nbsp; &amp;nbsp; &amp;nbsp;(25) &amp;nbsp; &amp;nbsp; &amp;nbsp;TCP/UDP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; POP3 &amp;nbsp; &amp;nbsp;(110) &amp;nbsp; &amp;nbsp;TCP/UDP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; VNC &amp;nbsp; &amp;nbsp; (5900) &amp;nbsp;TCP/UDP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MYSQL (3306) TCP/UDP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IMAP &amp;nbsp; &amp;nbsp;(143) &amp;nbsp; &amp;nbsp;TCP/UDP&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;u&gt;2. ネットワーク設定&lt;/u&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;DHCP固定割当設定の通り、IPが割り当てられ、インターネットに&lt;br /&gt;
接続できるか確認。&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;3. PC再起動&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;




&lt;b&gt;D. (新サーバ) ソフトウェアのインストール・調整&lt;/b&gt;&lt;/h3&gt;
※以降、SSH接続による作業&lt;br /&gt;
&amp;nbsp; &amp;nbsp;ただし、公開鍵作成までは外部アクセスではなく、内部から設定すること。&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;1. 公開鍵を作成する&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;(1). RSA暗号方式の鍵を生成する。&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;$ssh-keygen -t rsa (ENTER)&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;(2). そのままENTERキーを押す。&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;(3). パスフレーズを入力する。&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;（これはクライアントがアクセスするときに入力するフレーズになる。）&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;(4). 再度パスフレーズを入力する。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirc_0SmNUf8Q3TGOFcr69Wm-y-A2wuSfMGogKfjVeAYcDOggyV3qFW8uO9GTlhHZ8o043aw5dtKW0-mhsXoWsj7rvHF9zP2kZhGz0oRqxteaWN3yQHcAfC-5F4482pD9wYZfqIpcZDWBM/s1600/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%882.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirc_0SmNUf8Q3TGOFcr69Wm-y-A2wuSfMGogKfjVeAYcDOggyV3qFW8uO9GTlhHZ8o043aw5dtKW0-mhsXoWsj7rvHF9zP2kZhGz0oRqxteaWN3yQHcAfC-5F4482pD9wYZfqIpcZDWBM/s320/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%882.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; (5). (ホームディレクトリの.sshフォルダに鍵ファイルが作成されるので)&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;鍵ファイル(id_rsa.pub)の名称をauthorized_keysに名称変更する。&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $mv id_rsa.pub authorized_keys&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;
&amp;nbsp; (6). authorized_keysファイルのアクセス権を変更する。&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $chmod 600 authorized_keys&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjleX6dkbrJydi6M0A2t9WBWlbJL6UYTzLkzPjmASVg4yAmw5rwPVxNCMvBrKq5YKRDMsezFmyHpJt0lfFprupeYkH-BIAlbOFA9AyFZe5dDnORr6G9QK4JO4_QOsyvXhHBQEVnW9J433Q/s1600/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%883.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;109&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjleX6dkbrJydi6M0A2t9WBWlbJL6UYTzLkzPjmASVg4yAmw5rwPVxNCMvBrKq5YKRDMsezFmyHpJt0lfFprupeYkH-BIAlbOFA9AyFZe5dDnORr6G9QK4JO4_QOsyvXhHBQEVnW9J433Q/s320/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%883.png&quot; style=&quot;cursor: move;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; (7) . id_rsaファイルは、SSHクライアントにて使用するので、&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;クライアントのマシンで何らかの方法により渡すことで、&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 外部アクセス時でも安全にSSH接続できるようになる。&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;u&gt;2. HTTPDインストール・設定&lt;/u&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(1) &amp;nbsp;rootになる。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#su -&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(2) インストールコマンドを実行 (既にインストールされている場合はそのまま終わるのでOK)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #yum -y install httpd&lt;/div&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;(3) デフォルトのHTTPD設定ファイルのhttpd.confを一応退避しておく。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_org&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(4)バックアップ元からhttpd.confを復元する。(これで旧サーバと同じ設定になる)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#cp /media/HDD/Backup/etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(5)HTTPDサービスを開始 (本当は、startでよいが、一応一度停止させるため)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; #service httpd restart&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;(6)OS起動時に自動的にサービス起動する設定&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;#chkconfig httpd on&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(7) (6)設定の確認 (3, 5でONになっているのであればOK)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;#chkconfig | grep httpd&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&amp;nbsp;3. MYSQLインストール・設定&lt;/u&gt;&lt;br /&gt;
&amp;nbsp;(1) MySQLインストール&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;#yum -y install mysql-server&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;(2)デフォルトのMySQL設定を一応退避する。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;#cp /etc/my.cnf /etc/my.cnf_org&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;(3) 旧サーバのMySQL設定を復元する&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;#cp /media/HDD/Backup/etc/my.cnf /etc/my.cnf&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;(4) MySQLサービスを再起動する。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;#service mysqld restart&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;(5) MySQLサービスの自動起動設定をする。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #chkconfig mysqld on&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;(6) (5)設定の確認&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #chkconfig | grep mysqld&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; (7) 旧サーバのデータベースのデータを復元する。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;#mysql -u root &amp;lt; /media/HDD/Backup/mysqlbackup.dump&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; (8) MySQLに接続&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #mysql -u root&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; (9) ユーザリストを確認&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;gt; select user,host,password from mysql.user;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; (10) root以外のユーザを削除する&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;gt; delete from mysql.user where user=&#39;削除するユーザ名&#39;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; (11) rootのパスワードを設定する。&lt;br /&gt;
&amp;nbsp; &amp;gt; set password for root@localhost=password(&#39;任意のパスワード&#39;);&lt;br /&gt;
&amp;nbsp; &amp;gt; set password for root@127.0.0.1=password(&#39;任意のパスワード&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; (12) root以外のユーザを作成する。(192.168.0ネットワークから接続できるユーザ)&lt;br /&gt;
&amp;nbsp; &amp;gt;grant all on *.* to 任意のユーザ名@&quot;192.168.0.%&quot; identified by &#39;任意のパスワード&#39; with grant option;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; (13)&amp;nbsp;&amp;nbsp; ローカルホスト接続ユーザ作成&lt;br /&gt;
&amp;gt;grant all on *.* to 任意のユーザ名@localhost identified by &#39;任意のパスワード&#39; with grant option;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
4. PHPインストール・調整&lt;br /&gt;
(1) PHP環境をインストール&lt;br /&gt;
&amp;nbsp;#yum -y install php php-mbstring php-pear php-mysql mysql-devel php-gd&lt;br /&gt;
&lt;br /&gt;
(2) PHPのデフォルト設定ファイルを退避&lt;br /&gt;
&amp;nbsp;#cp /etc/php.ini /etc/php.ini_org&lt;br /&gt;
&lt;br /&gt;
(3) 旧サーバのPHP設定ファイルを復元&lt;br /&gt;
&amp;nbsp;#cp /media/HDD/Backup/etc/php.ini /etc/php.ini&lt;br /&gt;
&lt;br /&gt;
(4) HTTPD再起動&lt;br /&gt;
&amp;nbsp;#service httpd restart&lt;br /&gt;
&lt;br /&gt;
4. cronの自動実行スクリプト設定&lt;br /&gt;
(1) &amp;nbsp;ユーザ用のcrontabファイルを作成する&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; #crontab -u (ユーザ名) /etc/crontab&lt;br /&gt;
(2) &amp;nbsp;指定ユーザのcrontab設定ファイルを編集&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;#crontab -u (ユーザ名) -e&lt;br /&gt;
&lt;br /&gt;
(3) DynamicDNSへの通知を１０分おきに実行する設定&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp; */10 * * * * wget --spider --http-user=(mydns割り当てID) --http-password=(mydns割り当てパスワード) http://www.mydns.jp/login.html&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
(4) 保存して閉じる&lt;br /&gt;
&amp;nbsp; &amp;nbsp; :wq&lt;br /&gt;
&lt;br /&gt;
(5) cronサービスを再起動する&lt;br /&gt;
&amp;nbsp; &amp;nbsp;#service crond restart&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
5. MySQLデータベースドライバ for Java 配置&lt;br /&gt;
本ブログ管理者の環境では、サービス用ディレクトリと同じ階層にlib&lt;br /&gt;
フォルダを配置し、その中にmysqlconnector - *を配置する。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
（その他、必要に応じて以下を設定する)&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
7.VNCサーバ動作させる設定。サーバ再起動後も動作するようにする。&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
(パスワードは８文字しか入力できないがそれ以上入力すればちゃんと読み込まれているので長いパスワードにすること）&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
8. HP用、サービス用ファイルを元あった場所にコピー&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;lt;確認＞&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
1. ホームページアクセスできるか？&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
ファイアウォールの８０番ポート許可していなければNGになるので注意&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
2. VNCクライアントでリモートデスクトップ使えるか&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; ファイアウォールの５９００番ポート許可していなければNGになるので注意&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
3. SSHで鍵を使用して接続できるか？&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
ファイアウォールの２２番ポート許可していなければNGになるので注意&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
4. データベースで表示させて正常に復元できているか&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
以上&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/8140454571462030814/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/07/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8140454571462030814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8140454571462030814'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/07/blog-post.html' title='自宅サーバ再構築全手順'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirc_0SmNUf8Q3TGOFcr69Wm-y-A2wuSfMGogKfjVeAYcDOggyV3qFW8uO9GTlhHZ8o043aw5dtKW0-mhsXoWsj7rvHF9zP2kZhGz0oRqxteaWN3yQHcAfC-5F4482pD9wYZfqIpcZDWBM/s72-c/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%882.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-8657549360152562893</id><published>2012-07-01T19:06:00.002+09:00</published><updated>2012-07-01T22:07:01.740+09:00</updated><title type='text'>MySQLネットワーク接続</title><content type='html'>1.サーバのポート許可する&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 3306 TCP/UDP オープン&lt;br /&gt;
&lt;br /&gt;
2. mysqlにrootとして接続&lt;br /&gt;
&amp;nbsp; $mysql -u root (ENTER)&lt;br /&gt;
&amp;nbsp; パスワードを入力&lt;br /&gt;
&lt;br /&gt;
3.ホストを作成する&lt;br /&gt;
&amp;nbsp; &amp;gt; grant all on *.* to test@&quot;192.168.0.%&quot; identified by &#39;pass&#39; with grant option;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;ユーザ名 test&lt;br /&gt;
&amp;nbsp; 接続できるネットワークアドレスは、192.168.0&lt;br /&gt;
&amp;nbsp; &amp;nbsp;パスワード pass&lt;br /&gt;
&lt;br /&gt;
4. ユーザが正しく作成されたか確認&lt;br /&gt;
&amp;nbsp; &amp;nbsp;select user,host,password from mysql.user;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以上</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/8657549360152562893/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/07/mysql.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8657549360152562893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8657549360152562893'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/07/mysql.html' title='MySQLネットワーク接続'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-2430191548255941222</id><published>2012-06-18T13:10:00.002+09:00</published><updated>2012-06-18T13:10:45.731+09:00</updated><title type='text'>サーバ構築やり直し</title><content type='html'>サーバのＨＤＤを増設・増強するため、構築し直す。&lt;br /&gt;
とりあえず、やることを列挙してまとめてみた。 &lt;br /&gt;
&lt;br /&gt;
■既存サーバデータの退避&lt;br /&gt;
1.MySQLのデータをバックアップする。&lt;br /&gt;
&amp;nbsp;&amp;nbsp; mysqldumpコマンドで全ユーザ全データ対象でバックアップすること。&lt;br /&gt;
&lt;br /&gt;
2.以下ファイルをバックアップしておくこと。&lt;br /&gt;
&amp;nbsp;root:rootアクセス権の設定ファイルなので同じ場所にコピーしておけばそのまま使える&lt;br /&gt;
&amp;nbsp;/etc/my.cnf&lt;br /&gt;
&amp;nbsp;/etc/php.ini&lt;br /&gt;
&amp;nbsp;/etc/httpd/conf/httpd.conf&lt;br /&gt;
&amp;nbsp;postfix, dovecotの設定ファイルも同じく&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
3.メディアファイルをバックアップ&lt;br /&gt;
4.サイト用のソフトやＨＴＭＬファイル&lt;br /&gt;
&lt;br /&gt;
■再構築&lt;br /&gt;
1.CentOSを再インストール&lt;br /&gt;
&amp;nbsp; &amp;nbsp;LVボリュームでパーティションを準備 (あとでパーティション変更・増量等可能になる）&lt;br /&gt;
&amp;nbsp; ユーザ名、IPアドレス等は以前の物と同じにすること&lt;br /&gt;
&lt;br /&gt;
2. Mysql, PHPのインストール&lt;br /&gt;
&lt;br /&gt;
3.設定ファイルを上書き（元ファイルは_defaultなどして退避すること)&lt;br /&gt;
&lt;br /&gt;
4.mysql.dumpバックアップファイルをリストア&lt;br /&gt;
&lt;br /&gt;
5.CentOSのファイアウォール設定 以下ポートを許可すること&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 80 tcp/udp (For HTTP)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 22 tcp/udp (For SSH)&lt;br /&gt;
　　5900 tcp/udp (For VNC)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 3306 tcp/udp (For Mysql)&lt;br /&gt;
　　110 tcp/udp (ForPOP3) &lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; 143 tcp/udp (ForIMAP4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; 25 tcp/udp (ForSMTP)&lt;br /&gt;
&lt;br /&gt;
6.SSH鍵ファイル作成、鍵をクライアントマシンに読み込ませる。&lt;br /&gt;
&lt;br /&gt;
7.VNCサーバ動作させる設定。サーバ再起動後も動作するようにする。 &lt;br /&gt;
　 (パスワードは８文字しか入力できないがそれ以上入力すればちゃんと読み込まれているので長いパスワードにすること）&lt;br /&gt;
&lt;br /&gt;
8. HP用、サービス用ファイルを元あった場所にコピー&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;&amp;lt;確認＞&lt;br /&gt;
1. ホームページアクセスできるか？&lt;br /&gt;
ファイアウォールの８０番ポート許可していなければNGになるので注意&lt;br /&gt;
2. VNCクライアントでリモートデスクトップ使えるか&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ファイアウォールの５９００番ポート許可していなければNGになるので注意&lt;br /&gt;
3. SSHで鍵を使用して接続できるか？&lt;br /&gt;
ファイアウォールの２２番ポート許可していなければNGになるので注意&lt;br /&gt;
4. データベース&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/2430191548255941222/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/06/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/2430191548255941222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/2430191548255941222'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/06/blog-post.html' title='サーバ構築やり直し'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-8016266436522644688</id><published>2012-06-09T11:33:00.003+09:00</published><updated>2012-08-22T13:18:46.925+09:00</updated><title type='text'>MySQLパーティショニング</title><content type='html'>MySQLは、１つのテーブルに大量にデータを登録すると、&lt;br /&gt;
検索するときにものすごく時間がかかる。&lt;br /&gt;
これは、全部のデータをまず読み込んでから検索するからとのこと。&lt;br /&gt;
１つのテーブルの中でインデックスを使うと多少は検索速度向上するが、&lt;br /&gt;
大量のデータになるとやはり遅くなる。&lt;br /&gt;
大量のデータが登録されることが事前に分かっているのであれば有効なのが、&lt;br /&gt;
「パーティショニング」という機能だ。&lt;br /&gt;
&lt;br /&gt;
その設定方法についての備忘録。&lt;br /&gt;
&lt;br /&gt;
※ Noをインデックスとし、Noが0から2000まであるとする。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; このとき、Noが500毎にパーティションを作成する。&lt;br /&gt;
&lt;br /&gt;
mysql &amp;gt; create table テーブル名&lt;br /&gt;
mysql &amp;gt; &amp;nbsp;(&lt;br /&gt;
mysql &amp;gt; &amp;nbsp; No Decimal(5,0)&lt;br /&gt;
mysql &amp;gt; , Name varchar(128)&lt;br /&gt;
mysql &amp;gt; , Age int&lt;br /&gt;
mysql &amp;gt; , KEY Index1 (No)&lt;br /&gt;
mysql &amp;gt; constraint KEY_NAME primary key(No)&lt;br /&gt;
mysql &amp;gt; &amp;nbsp;)&lt;br /&gt;
mysql &amp;gt; ENGINE=MyISAM DEFAULT CHARSET=utf8 PARTITION BY RANGE(No))&lt;br /&gt;
mysql &amp;gt; &amp;nbsp;(&lt;br /&gt;
mysql &amp;gt; &amp;nbsp; &amp;nbsp;PARTITION p0 VALUES LESS THAN (500)&lt;br /&gt;
mysql &amp;gt; &amp;nbsp; &amp;nbsp;PARTITION p1 VALUES LESS THAN (1000)&lt;br /&gt;
mysql &amp;gt; , &amp;nbsp;PARTITION p2 VALUES LESS THAN (1500)&lt;br /&gt;
mysql &amp;gt; , &amp;nbsp;PARTITION p3 VALUES LESS THAN MAXVALUE&lt;br /&gt;
mysql &amp;gt; &amp;nbsp;)&lt;br /&gt;
&lt;br /&gt;
以上&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/8016266436522644688/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/06/mysql.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8016266436522644688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8016266436522644688'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/06/mysql.html' title='MySQLパーティショニング'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-9120193735389938392</id><published>2012-05-14T22:20:00.001+09:00</published><updated>2012-05-14T22:20:13.011+09:00</updated><title type='text'>mysqlデータをバックアップし、リストアする方法</title><content type='html'>サーバ壊れたときにデータベースファイルだけはなくしてはいけない。&lt;br /&gt;
定期的にバックアップする方法と、いざというときに復旧する方法。&lt;br /&gt;
&lt;br /&gt;
■全データベースバックアップする&lt;br /&gt;
#mysqldump -u root -p --all-databases &amp;gt; バックアップファイル名 (mysqldump_20120514.dump)&lt;br /&gt;
&lt;br /&gt;
■リストア&lt;br /&gt;
#mysql -u root -p &amp;lt; バックアップファイル名&lt;br /&gt;
※まだmysqlにパスワードをつけていない場合は、-pを省略できる。&lt;br /&gt;
&lt;br /&gt;
以上</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/9120193735389938392/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/05/mysql.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/9120193735389938392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/9120193735389938392'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/05/mysql.html' title='mysqlデータをバックアップし、リストアする方法'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-8188645041136355477</id><published>2012-05-14T19:41:00.001+09:00</published><updated>2012-08-22T13:16:35.511+09:00</updated><title type='text'>公開鍵作成方法(Linux)</title><content type='html'>&lt;br /&gt;
SSH用の公開鍵の作成方法の備忘録。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.RSA暗号方式の鍵を生成 &lt;br /&gt;
&lt;code&gt;$ssh-keygen -t rsa&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;2.そのままENTERキーを押す&lt;/code&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghj3a7zG8nO_e0-K3mPFUUhmabrSz8N0k4ou1GVdf-9iq7c1AItBYtg6S1zEwS0MbTvR2B9n2fhzmf_tDk7XT5jfax1w-a6anPw0XYsxAD972tRxu9bt4QgCSh9tH6joMXWwoJynFQR2Y/s1600/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%881.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;39&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghj3a7zG8nO_e0-K3mPFUUhmabrSz8N0k4ou1GVdf-9iq7c1AItBYtg6S1zEwS0MbTvR2B9n2fhzmf_tDk7XT5jfax1w-a6anPw0XYsxAD972tRxu9bt4QgCSh9tH6joMXWwoJynFQR2Y/s320/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%881.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. パスフレーズを入力する。&lt;br /&gt;
　（これはクライアントがアクセスするときに入力するフレーズになる）&lt;br /&gt;
4. 再度パスフレーズを入力する。&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirc_0SmNUf8Q3TGOFcr69Wm-y-A2wuSfMGogKfjVeAYcDOggyV3qFW8uO9GTlhHZ8o043aw5dtKW0-mhsXoWsj7rvHF9zP2kZhGz0oRqxteaWN3yQHcAfC-5F4482pD9wYZfqIpcZDWBM/s1600/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%882.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;98&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirc_0SmNUf8Q3TGOFcr69Wm-y-A2wuSfMGogKfjVeAYcDOggyV3qFW8uO9GTlhHZ8o043aw5dtKW0-mhsXoWsj7rvHF9zP2kZhGz0oRqxteaWN3yQHcAfC-5F4482pD9wYZfqIpcZDWBM/s200/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%882.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.ホームディレクトリの.sshフォルダに鍵ファイルが作成されるので、&lt;br /&gt;
　名称変更＋アクセス権を変更する。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjleX6dkbrJydi6M0A2t9WBWlbJL6UYTzLkzPjmASVg4yAmw5rwPVxNCMvBrKq5YKRDMsezFmyHpJt0lfFprupeYkH-BIAlbOFA9AyFZe5dDnORr6G9QK4JO4_QOsyvXhHBQEVnW9J433Q/s1600/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%883.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;109&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjleX6dkbrJydi6M0A2t9WBWlbJL6UYTzLkzPjmASVg4yAmw5rwPVxNCMvBrKq5YKRDMsezFmyHpJt0lfFprupeYkH-BIAlbOFA9AyFZe5dDnORr6G9QK4JO4_QOsyvXhHBQEVnW9J433Q/s320/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%883.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5CRPa7UB1rbCE1NZaSTvza0HQty9I_TMjftqGHRGLRbyxyE42I55GL6tzDiVNq7wzLrQeKnmRWJ1d9Iska5-5QCLkzzMuKZrg52v5U1BftpueG5ODEP7fu0S2uRvZQTOvp5z8D4twrkU/s1600/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%883.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;
&lt;code&gt;以上&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/8188645041136355477/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/05/linuxde.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8188645041136355477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/8188645041136355477'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/05/linuxde.html' title='公開鍵作成方法(Linux)'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghj3a7zG8nO_e0-K3mPFUUhmabrSz8N0k4ou1GVdf-9iq7c1AItBYtg6S1zEwS0MbTvR2B9n2fhzmf_tDk7XT5jfax1w-a6anPw0XYsxAD972tRxu9bt4QgCSh9tH6joMXWwoJynFQR2Y/s72-c/%E3%82%B9%E3%83%8A%E3%83%83%E3%83%97%E3%82%B7%E3%83%A7%E3%83%83%E3%83%881.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1968468791207605606.post-4305974723198030699</id><published>2012-05-05T12:44:00.000+09:00</published><updated>2012-05-14T21:53:36.082+09:00</updated><title type='text'>macから公開鍵認証でsshサーバへ接続する方法</title><content type='html'>Linuxで稼働させているsshサーバにmacから接続する方法。&lt;br /&gt;
windowsでteratermとか使っているのであれば、アプリケーション起動時に&lt;br /&gt;
公開鍵を選択してsshサーバへ接続すればよいがmacだと少しやり方がある&lt;br /&gt;
のでメモ。&lt;br /&gt;
&lt;br /&gt;
※既に鍵(id_rsa)は作られているものとする&lt;br /&gt;
&lt;br /&gt;
1.ユーザのホームディレクトリに移動&lt;br /&gt;
[user@host Public]$cd ~&lt;br /&gt;
&lt;br /&gt;
2.ホームディレクトリ以下に.sshフォルダを作成する&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
[user@host ~]$mkdir .ssh&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
3.鍵を2.で作成した.sshフォルダに移動する&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
[user@host ~]$mv &amp;nbsp;(鍵のあるパス)/id_rsa ./.ssh/id_rsa&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
4.鍵のアクセス券を600にする&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
[user@host ~]$chmod 600 ./.ssh/id_rsa&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
5.sshでサーバにアクセスする&lt;br /&gt;
[user@host ~]$ssh hostname@domain&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
6.ユーザ・パスワードを入力する画面が表示される。&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
入力する。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo16H_oZtqqecKdBu9EgYK_LZ_yNRMdMLR-qTCMTphmIEFRmCMxLc-ZbBxS8YdOgWHQ9bPR0ZycjIXZspOUG9ardeJVgz2jHC4Erll0N7FDU871IVfmTQGMwyrvHnh3GHvD5X4wWZhis0/s1600/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+2012-05-05+12.21.16.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo16H_oZtqqecKdBu9EgYK_LZ_yNRMdMLR-qTCMTphmIEFRmCMxLc-ZbBxS8YdOgWHQ9bPR0ZycjIXZspOUG9ardeJVgz2jHC4Erll0N7FDU871IVfmTQGMwyrvHnh3GHvD5X4wWZhis0/s320/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+2012-05-05+12.21.16.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7.これで無事に接続できたはず！&lt;br /&gt;
&lt;br /&gt;
補足：&lt;br /&gt;
もし公開鍵を再度設定する場合は、一度.sshフォルダにある&lt;br /&gt;
id_rsa と known_hostsを削除すること。&lt;br /&gt;
known_hostsが残っていれば接続に失敗してしまう。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mac : OS X 10.7 Lion&lt;br /&gt;
Linux : CentOS6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以上&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://serversamurai.blogspot.com/feeds/4305974723198030699/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://serversamurai.blogspot.com/2012/05/macssh.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/4305974723198030699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1968468791207605606/posts/default/4305974723198030699'/><link rel='alternate' type='text/html' href='http://serversamurai.blogspot.com/2012/05/macssh.html' title='macから公開鍵認証でsshサーバへ接続する方法'/><author><name>shooojee</name><uri>http://www.blogger.com/profile/02516709944942305716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo16H_oZtqqecKdBu9EgYK_LZ_yNRMdMLR-qTCMTphmIEFRmCMxLc-ZbBxS8YdOgWHQ9bPR0ZycjIXZspOUG9ardeJVgz2jHC4Erll0N7FDU871IVfmTQGMwyrvHnh3GHvD5X4wWZhis0/s72-c/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+2012-05-05+12.21.16.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>