Warning: Cannot modify header information - headers already sent in /home/dacelo/html/DocumentRoot/wp-includes/feed-rss2.php on line 8 Weblogy » mysql http://blog.dacelo.info WordPressのカスタマイズとプラグイン、CSSテクニック、SEOの話題など。 Sat, 04 Feb 2012 15:08:41 +0000 ja hourly 1 http://wordpress.org/?v=3.3.1 vi でコピペするとき、インデントを解除したい! http://blog.dacelo.info/linux/entry-751.html?utm_source=rss&utm_medium=rss&utm_campaign=vi-%25e3%2581%25a7%25e3%2582%25b3%25e3%2583%2594%25e3%2583%259a%25e3%2581%2599%25e3%2582%258b%25e3%2581%25a8%25e3%2581%258d%25e3%2580%2581%25e3%2582%25a4%25e3%2583%25b3%25e3%2583%2587%25e3%2583%25b3%25e3%2583%2588%25e3%2582%2592%25e8%25a7%25a3%25e9%2599%25a4%25e3%2581%2597%25e3%2581%259f%25e3%2581%2584%25ef%25bc%2581 http://blog.dacelo.info/linux/entry-751.html#comments Fri, 02 Oct 2009 10:43:33 +0000 http://blog.dacelo.info/linux/entry-751.html 続きを読む No related posts. Related posts brought to you by Yet Another Related Posts Plugin.]]>

vi(vim)で編集していて、他のソースからコピペして貼り付けようとすると、インデントが重なってものすごくネストが深くなってしまいます。

(例)

<div class="content">
	<h2>見出し</h2>
	<p>本文本文</p>
	<ul>
		<li>リスト1</li>
		<li>リスト2 </li>
	</ul>
</div>

こんなソースが…

<div class="content">
    <h2>見出し</h2>        <p>本文本文</p>            <ul>                    <li>リスト1</li>
                            <li>リスト2 </li>
                                </ul>                                </div>

こうなってしまう!

これは、vimの設定で「autoindent」という項目がONになっているから起こる現象です。
解除するためには、コマンドモードで

:set noautoindent

と入力すればOKです。

ちなみに、

:set

のコマンドで、現在有効になっている設定の一覧が表示されます。

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

]]>
http://blog.dacelo.info/linux/entry-751.html/feed 1
ユニークな値のみ取り出すSQL http://blog.dacelo.info/mysql/entry-748.html?utm_source=rss&utm_medium=rss&utm_campaign=%25e3%2583%25a6%25e3%2583%258b%25e3%2583%25bc%25e3%2582%25af%25e3%2581%25aa%25e5%2580%25a4%25e3%2581%25ae%25e3%2581%25bf%25e5%258f%2596%25e3%2582%258a%25e5%2587%25ba%25e3%2581%2599sql http://blog.dacelo.info/mysql/entry-748.html#comments Fri, 11 Sep 2009 10:49:09 +0000 http://blog.dacelo.info/mysql/entry-748.html 続きを読む No related posts. Related posts brought to you by Yet Another Related Posts Plugin.]]>

tableに1000件くらいデータが入ってるんだけど、その中でtypeというキーに何種類くらいの値があるか知りたい…。そんなときに使います。

SELECT DISTINCT (type), *
FROM `table`

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

]]>
http://blog.dacelo.info/mysql/entry-748.html/feed 0
svnでコミット失敗 「ログメッセージを取得するのに外部エディタを使えませんでした。」 http://blog.dacelo.info/linux/entry-733.html?utm_source=rss&utm_medium=rss&utm_campaign=svn%25e3%2581%25a7%25e3%2582%25b3%25e3%2583%259f%25e3%2583%2583%25e3%2583%2588%25e5%25a4%25b1%25e6%2595%2597%25e3%2580%2580%25e3%2580%258c%25e3%2583%25ad%25e3%2582%25b0%25e3%2583%25a1%25e3%2583%2583%25e3%2582%25bb%25e3%2583%25bc%25e3%2582%25b8%25e3%2582%2592%25e5%258f%2596%25e5%25be%2597%25e3%2581%2599%25e3%2582%258b http://blog.dacelo.info/linux/entry-733.html#comments Thu, 10 Sep 2009 03:22:38 +0000 http://blog.dacelo.info/linux/entry-733.html 続きを読む Related posts:
  1. crontab / cronの編集エディタをviに指定する コマンド crontab -e でcronの編集が出来ますが、このサーバーでデフォルトで指定される「ed」というエディタが、ものすごく使いづらい。というか編集の仕方がよく分からず、「Ctrl+C」で、「保存せずに終了しま ...続きを読む...
  2. Linux : ファイルにテキストを追記で書き込む Linuxコマンドでは「 > ファイル名」と入力すれば、画面に出力されるものはなんでもそのファイルに書き込むことができます。 例えば、echo でaaaと書き込んでみましょう。 [dacelo@info&# ...続きを読む...
  3. メールのエラー「postdrop: warning: unable to look up public/pickup: No such file or directory」 サーバーのメールコマンドを使おうとしたら、こんなエラーが返ってきました。 [dacelo@dacelo.info ~]$ postdrop: warning: unable to look up public/picku...
Related posts brought to you by Yet Another Related Posts Plugin.]]>

subversionでコミットしようとしたら失敗した。

[dacelo@info]$ svn commit
svn: コミットに失敗しました (詳しい理由は以下のとおりです):
svn: ログメッセージを取得するのに外部エディタを使えませんでした。$SVN_EDITOR 環境変数を設定するか、--message (-m) か --file (-F) オプションを用いてみてください
svn: 環境変数 SVN_EDITOR, VISUAL, EDITOR のどれも設定されていなく、実行時の設定オプション 'editor-cmd' も見つかりません

svn updateは問題なくできているので、環境のせいではなさそう。
エラーメッセージによると、メッセージを編集するためのエディタが指定されていない、ということだった。

SVNコミットする際は、必ずコミット時メッセージが必要になるので、こまんどでメッセージを挿入するか、外部エディタを設定すればよい。

svn commit -m 'ここにコメント'
[dacelo@info CMScontroler]$ svn commit -m 'sidebar exclude設定'
送信しています              CMS/content.php
ファイルのデータを送信中です.....
リビジョン 3794 をコミットしました。

外部エディタにviを指定する方法でもOK。

# EDITOR=vi svn commit

Related posts:

  1. crontab / cronの編集エディタをviに指定する コマンド crontab -e でcronの編集が出来ますが、このサーバーでデフォルトで指定される「ed」というエディタが、ものすごく使いづらい。というか編集の仕方がよく分からず、「Ctrl+C」で、「保存せずに終了しま ...続きを読む...
  2. Linux : ファイルにテキストを追記で書き込む Linuxコマンドでは「 > ファイル名」と入力すれば、画面に出力されるものはなんでもそのファイルに書き込むことができます。 例えば、echo でaaaと書き込んでみましょう。 [dacelo@info&# ...続きを読む...
  3. メールのエラー「postdrop: warning: unable to look up public/pickup: No such file or directory」 サーバーのメールコマンドを使おうとしたら、こんなエラーが返ってきました。 [dacelo@dacelo.info ~]$ postdrop: warning: unable to look up public/picku...

Related posts brought to you by Yet Another Related Posts Plugin.

]]>
http://blog.dacelo.info/linux/entry-733.html/feed 0
関数でPHPの開発効率を上げる http://blog.dacelo.info/php/entry-745.html?utm_source=rss&utm_medium=rss&utm_campaign=%25e9%2596%25a2%25e6%2595%25b0%25e3%2581%25a7%25ef%25bd%2590%25ef%25bd%2588%25ef%25bd%2590%25e3%2581%25ae%25e9%2596%258b%25e7%2599%25ba%25e5%258a%25b9%25e7%258e%2587%25e3%2582%2592%25e4%25b8%258a%25e3%2581%2592%25e3%2582%258b-2 http://blog.dacelo.info/php/entry-745.html#comments Wed, 19 Aug 2009 01:29:43 +0000 http://blog.dacelo.info/uncategorized/entry-745.html 続きを読む No related posts. Related posts brought to you by Yet Another Related Posts Plugin.]]>

PHPの開発効率を上げる10個の関数 – PHP,MySQL,Flexな日々+イラストとか

変数、配列の内容をキレイに表示する関数「d」

変数や配列の内容をHTML構文でキレイに表示してくれます。

しかも、var_dumpと書くとタイピングが大変なので「d($hoge)」として簡単に記述。

これだけでも作業効率8倍

PHPの便利な関数色々。
こうして、自分のよく使う処理をオリジナル関数として持っておくと使い回せて便利そうですね。

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

]]>
http://blog.dacelo.info/php/entry-745.html/feed 0
httpd.confでRedirectの設定 http://blog.dacelo.info/apache/entry-714.html?utm_source=rss&utm_medium=rss&utm_campaign=httpdconf%25e3%2581%25a7redirect%25e3%2581%25ae%25e8%25a8%25ad%25e5%25ae%259a http://blog.dacelo.info/apache/entry-714.html#comments Tue, 26 May 2009 06:08:52 +0000 http://blog.dacelo.info/apache/entry-714.html 続きを読む No related posts. Related posts brought to you by Yet Another Related Posts Plugin.]]>

Webサイトの移転で必須のRedirect設定、.htaccessでやることが多いですが、
Apacheの設定ファイル・httpd.confでやってしまうと一括指定できて早いです。

<VirtualHost 192.168.0.200>
ServerName old.example.jp
Redirect permanent / http://www.example.com/
</VirtualHost>

上記例では、使わなくなったサブドメイン「old」をwwwに恒久的リダイレクトさせています。
複数のサブドメインを指定する際には、ServerAliasで設定すればOKです。

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

]]>
http://blog.dacelo.info/apache/entry-714.html/feed 0
Apacheのエラー:Could not reliably determine the server’s fully qualified domain name… http://blog.dacelo.info/apache/entry-713.html?utm_source=rss&utm_medium=rss&utm_campaign=apache%25e3%2581%25ae%25e3%2582%25a8%25e3%2583%25a9%25e3%2583%25bc%25ef%25bc%259acould-not-reliably-determine-the-servers-fully-qualified-domain-name-2 http://blog.dacelo.info/apache/entry-713.html#comments Mon, 25 May 2009 01:25:47 +0000 http://blog.dacelo.info/uncategorized/entry-713.html 続きを読む Related posts:
  1. apacheの prefork.cとworker.cの違い /etc/httpd/conf/httpd.conf を見ると、KeepAliveとかMaxClientとかの設定をする部分が、2つあることに気付きます。 # prefork MPM   StartServer ...続きを読む...
  2. UbuntuのApache2でmod_rewriteを使う UbuntuのApacheは、初期状態ではmod_rewriteが動いていない。 が、インストールはされているので、有効化してあげてApache再起動してあげれば解決。 dacelo@ubt:/var/www$ sudo ...続きを読む...
Related posts brought to you by Yet Another Related Posts Plugin.]]>

Apacheを再起動した際に、

httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

というエラーが出る場合がある。
これでも起動はするので、Apache自体は動くのだが、エラーをそのままにしておくのは気持ちが悪いし、あとあと問題を引き起こす可能性が高い。

日本語訳をすると

ServerNameに127.0.0.1を使用した、FQDN(完全に適切なドメイン名)が確定できませんでした。

といった感じか。

このエラーは、/etc/hosts にlocalhost以外に自分で設定したホスト名が、Apacheの設定ファイルに定義されていないために発生する。

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               dacelo localhost.localdomain localhost

と書いた場合、/etc/httpd/conf/httpd.conf のServerNameの設定にも次のように書いておく。

# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work.  See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName www.example.com:80
ServerName dacelo:80

Related posts:

  1. apacheの prefork.cとworker.cの違い /etc/httpd/conf/httpd.conf を見ると、KeepAliveとかMaxClientとかの設定をする部分が、2つあることに気付きます。 # prefork MPM   StartServer ...続きを読む...
  2. UbuntuのApache2でmod_rewriteを使う UbuntuのApacheは、初期状態ではmod_rewriteが動いていない。 が、インストールはされているので、有効化してあげてApache再起動してあげれば解決。 dacelo@ubt:/var/www$ sudo ...続きを読む...

Related posts brought to you by Yet Another Related Posts Plugin.

]]>
http://blog.dacelo.info/apache/entry-713.html/feed 14
MySQLでテーブル、フィールドをコピーする http://blog.dacelo.info/mysql/entry-685.html?utm_source=rss&utm_medium=rss&utm_campaign=mysql%25e3%2581%25a7%25e3%2583%2586%25e3%2583%25bc%25e3%2583%2596%25e3%2583%25ab%25e3%2580%2581%25e3%2583%2595%25e3%2582%25a3%25e3%2583%25bc%25e3%2583%25ab%25e3%2583%2589%25e3%2582%2592%25e3%2582%25b3%25e3%2583%2594%25e3%2583%25bc%25e3%2581%2599%25e3%2582%258b http://blog.dacelo.info/mysql/entry-685.html#comments Thu, 19 Feb 2009 13:50:00 +0000 /blog/mysql/entry-685.html 続きを読む Related posts:
  1. PHP+MySQL で文字化け対策 MySQLにクエリを出して呼び出した結果が「??????」で文字化けしてしまう! こんな感じで、普通にMySQLのSELECT文で情報を取得しようとしていた訳なんですが、日本語部分が全部「????」に文字化けしてしまう。 ...続きを読む...
Related posts brought to you by Yet Another Related Posts Plugin.]]>

とあるテーブルを違うテーブルに丸々コピーしたいとき。
一度でできる指定はないので、CREATEでテーブルを作ってから、中身をINSERTします。

テーブルをコピーする

INSERT INTO `TO_DB`.`TO_TABLE` SELECT * FROM `FROM_DB`.`FROM_TABLE`;

(例)
DB_NAMEというデータベースのconstructionというテーブルのバックアップを作りたい場合。

まずCREATE TABLEでconstructionBAKなどを作り…

INSERT INTO `DB_NAME`.`constructionBAK` SELECT * FROM `DB_NAME`.`construction`;

DB_NAMEのところを変更すれば、違うデータベースからのコピーもできます。

フィールドをコピーする

とあるテーブルのフィールドの中身を違うフィールドにコピーするのは簡単です。

UPDATE `TABLE` set `TO_FIELD`=`FROM_FIELD`

(テーブルTABLEのFROM_FIELDの内容がTO_FIELDにコピーされます)

(例)constructionのH1_TEXTをH2_TEXTにコピーする。

UPDATE `construction` set `H2_TEXT`=`H1_TEXT`

Related posts:

  1. PHP+MySQL で文字化け対策 MySQLにクエリを出して呼び出した結果が「??????」で文字化けしてしまう! こんな感じで、普通にMySQLのSELECT文で情報を取得しようとしていた訳なんですが、日本語部分が全部「????」に文字化けしてしまう。 ...続きを読む...

Related posts brought to you by Yet Another Related Posts Plugin.

]]>
http://blog.dacelo.info/mysql/entry-685.html/feed 1
Apacheアクセスログの設定 http://blog.dacelo.info/linux/entry-678.html?utm_source=rss&utm_medium=rss&utm_campaign=apache%25e3%2582%25a2%25e3%2582%25af%25e3%2582%25bb%25e3%2582%25b9%25e3%2583%25ad%25e3%2582%25b0%25e3%2581%25ae%25e8%25a8%25ad%25e5%25ae%259a http://blog.dacelo.info/linux/entry-678.html#comments Mon, 16 Feb 2009 13:57:00 +0000 /blog/linux/entry-678.html 続きを読む Related posts:
  1. Linux : ファイルにテキストを追記で書き込む Linuxコマンドでは「 > ファイル名」と入力すれば、画面に出力されるものはなんでもそのファイルに書き込むことができます。 例えば、echo でaaaと書き込んでみましょう。 [dacelo@info&# ...続きを読む...
  2. adduser で補助ユーザーを作成する 社内の複数人数で使っているサーバーで、共通のディレクトリを編集する、共通グループの補助的なユーザーを作成したいときのコマンドです。 ユーザーとしては別れていた方がいいんだけど、専用のディレクトリを持たせたりはしたくない。 ...続きを読む...
  3. メールのエラー「postdrop: warning: unable to look up public/pickup: No such file or directory」 サーバーのメールコマンドを使おうとしたら、こんなエラーが返ってきました。 [dacelo@dacelo.info ~]$ postdrop: warning: unable to look up public/picku...
Related posts brought to you by Yet Another Related Posts Plugin.]]>

httpd.confでVirtualHostのアクセスログの保存方法と場所を指定する。

common … 共通のログファイルに書き込む
combined … 個別のログファイルに書き込む

…ということだと思うんですが、事実誤認があったら教えてください。
combinedって「結合」って意味ですよね。そう考えるとなんか個別のってのもおかしいような気がするんですが、今のところこれで動いております。

CustomLog /var/www/logs/dacelo.info-access_log common
</pre>
<pre class="mysql">
CustomLog /var/www/logs/blog.dacelo.info-access_log combined
</pre>
使用例
<pre class="mysql">
#DACELO Blog
<VirtualHost *:80>
    ServerAdmin webmaster@example.com
    DocumentRoot /home/dacelo/html
    ServerName blog.dacelo.info
#    ServerAlias test.dacelo.info
    ErrorLog /var/www/logs/blog.dacelo.info-error_log
    CustomLog /var/www/logs/blog.dacelo.info-access_log combined
</VirtualHost>

Related posts:

  1. Linux : ファイルにテキストを追記で書き込む Linuxコマンドでは「 > ファイル名」と入力すれば、画面に出力されるものはなんでもそのファイルに書き込むことができます。 例えば、echo でaaaと書き込んでみましょう。 [dacelo@info&# ...続きを読む...
  2. adduser で補助ユーザーを作成する 社内の複数人数で使っているサーバーで、共通のディレクトリを編集する、共通グループの補助的なユーザーを作成したいときのコマンドです。 ユーザーとしては別れていた方がいいんだけど、専用のディレクトリを持たせたりはしたくない。 ...続きを読む...
  3. メールのエラー「postdrop: warning: unable to look up public/pickup: No such file or directory」 サーバーのメールコマンドを使おうとしたら、こんなエラーが返ってきました。 [dacelo@dacelo.info ~]$ postdrop: warning: unable to look up public/picku...

Related posts brought to you by Yet Another Related Posts Plugin.

]]>
http://blog.dacelo.info/linux/entry-678.html/feed 0
サービスの自動起動/停止を設定する http://blog.dacelo.info/linux/entry-677.html?utm_source=rss&utm_medium=rss&utm_campaign=%25e3%2582%25b5%25e3%2583%25bc%25e3%2583%2593%25e3%2582%25b9%25e3%2581%25ae%25e8%2587%25aa%25e5%258b%2595%25e8%25b5%25b7%25e5%258b%2595%25e5%2581%259c%25e6%25ad%25a2%25e3%2582%2592%25e8%25a8%25ad%25e5%25ae%259a%25e3%2581%2599%25e3%2582%258b http://blog.dacelo.info/linux/entry-677.html#comments Tue, 10 Feb 2009 02:18:00 +0000 /blog/linux/entry-677.html 続きを読む Related posts:
  1. メールのエラー「postdrop: warning: unable to look up public/pickup: No such file or directory」 サーバーのメールコマンドを使おうとしたら、こんなエラーが返ってきました。 [dacelo@dacelo.info ~]$ postdrop: warning: unable to look up public/picku...
Related posts brought to you by Yet Another Related Posts Plugin.]]>

Linuxのサービスの中で、必須のものは、サーバー起動時に自動的に立ち上がるようにしておく。自動起動になっていないサービスは、サーバー再起動の度に手動で立ち上げなくてはならない。例えばApacheなどは必須中の必須なので、忘れずに自動起動にしておく。

サービスの自動起動設定を見るコマンド

[root@dacelo.info]# chkconfig --list

このコマンドで、サービスの一覧が出てくる。

httpd           0:off   1:off   2:off   3:on    4:off   5:off   6:off
pand            0:off   1:off   2:off   3:off   4:off   5:off   6:off
pcscd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
portmap         0:off   1:off   2:off   3:on    4:on    5:on    6:off
postfix         0:off   1:off   2:on    3:on    4:on    5:on    6:off

それぞれのランレベルの定義は、一般的なLinuxディストリビューションでは次の通り。

ランレベル 	システム状態
0 	システム停止
1 	シングルユーザモード
2 	ローカルマルチユーザモード(NFSなどはなし)
3 	フルマルチユーザモード(テキストコンソール)
4 	未使用
5 	フルマルチユーザモード(グラフィカル環境)
6 	システム再起動

起動時に有効にするコマンド

# chkconfig サービス名 on

起動時に無効にするコマンド

# chkconfig サービス名 off

Related posts:

  1. メールのエラー「postdrop: warning: unable to look up public/pickup: No such file or directory」 サーバーのメールコマンドを使おうとしたら、こんなエラーが返ってきました。 [dacelo@dacelo.info ~]$ postdrop: warning: unable to look up public/picku...

Related posts brought to you by Yet Another Related Posts Plugin.

]]>
http://blog.dacelo.info/linux/entry-677.html/feed 0
scpコマンドでサーバー間のファイル転送 http://blog.dacelo.info/linux/entry-651.html?utm_source=rss&utm_medium=rss&utm_campaign=scp%25e3%2582%25b3%25e3%2583%259e%25e3%2583%25b3%25e3%2583%2589%25e3%2581%25a7%25e3%2582%25b5%25e3%2583%25bc%25e3%2583%2590%25e3%2583%25bc%25e9%2596%2593%25e3%2581%25ae%25e3%2583%2595%25e3%2582%25a1%25e3%2582%25a4%25e3%2583%25ab%25e8%25bb%25a2%25e9%2580%2581 http://blog.dacelo.info/linux/entry-651.html#comments Fri, 23 Jan 2009 13:27:00 +0000 /blog/linux/entry-651.html 続きを読む Related posts:
  1. Linux : ファイルにテキストを追記で書き込む Linuxコマンドでは「 > ファイル名」と入力すれば、画面に出力されるものはなんでもそのファイルに書き込むことができます。 例えば、echo でaaaと書き込んでみましょう。 [dacelo@info&# ...続きを読む...
  2. htaccessでのIP制限とBasic認証を併用する 社内では普通にアクセスできるけど、社外からはBasic認証が必要。 そんな風にしたいときは、次のように設定すると併用することができる。 AuthType Basic AuthUserFile /home/dacelo/. ...続きを読む...
  3. 公開鍵ファイルauthorized_keysの設置場所とパーミッション Linuxで鍵を作成するには、ssh-keygenコマンドを使用します。 で、出来た鍵を置く際のパーミッションで、よくハマる箇所があるのでメモ書き。 ファイル 場所 パーミッション ユーザールート /user 701 S ...続きを読む...
Related posts brought to you by Yet Another Related Posts Plugin.]]>

サイトの移転やデータの移し替えのときに、いちいちクライアントソフトでFTP接続してデスクトップに保存、また違うサーバーにつないでアップロード、は面倒ですよね。
リナックスサーバーをターミナルで操作できると、直接ファイル移動がセキュアにできて便利です。

scpコマンド

このscpコマンドは、SSHで暗号化してファイル転送をするUnixコマンドです。ローカル(転送元)からリモート(転送先)への転送、もしくはその逆ができます。

書式
scp ファイル名 リモートホストユーザ名@リモートホスト名:パス

オプション
-r ディレクトリを再帰的にコピー。フォルダ転送の場合に。
-p パーミッション、更新時刻などのファイル情報を保持。
-v 転送状況のログを画面に出力。

[使用例]

#./testディレクトリをexample.netの/home/usernameに転送
scp -r ./test username@example.net:/home/username

username@ksknet.net's password: (パスワードを入力)

逆の場合

#example.netの/home/username/testを現ディレクトリに転送
scp -r  username@example.net:/home/username/test ./

Related posts:

  1. Linux : ファイルにテキストを追記で書き込む Linuxコマンドでは「 > ファイル名」と入力すれば、画面に出力されるものはなんでもそのファイルに書き込むことができます。 例えば、echo でaaaと書き込んでみましょう。 [dacelo@info&# ...続きを読む...
  2. htaccessでのIP制限とBasic認証を併用する 社内では普通にアクセスできるけど、社外からはBasic認証が必要。 そんな風にしたいときは、次のように設定すると併用することができる。 AuthType Basic AuthUserFile /home/dacelo/. ...続きを読む...
  3. 公開鍵ファイルauthorized_keysの設置場所とパーミッション Linuxで鍵を作成するには、ssh-keygenコマンドを使用します。 で、出来た鍵を置く際のパーミッションで、よくハマる箇所があるのでメモ書き。 ファイル 場所 パーミッション ユーザールート /user 701 S ...続きを読む...

Related posts brought to you by Yet Another Related Posts Plugin.

]]>
http://blog.dacelo.info/linux/entry-651.html/feed 0