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

<channel>
	<title>開発環境 &#8211; WordPress Memo</title>
	<atom:link href="https://blog.riverforest-wp.info/tag/%E9%96%8B%E7%99%BA%E7%92%B0%E5%A2%83/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.riverforest-wp.info</link>
	<description>WordPress に関する覚え書き</description>
	<lastBuildDate>Tue, 20 Jan 2026 00:27:45 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.riverforest-wp.info/wp-content/uploads/2018/05/cropped-icon-256x256-1-32x32.png</url>
	<title>開発環境 &#8211; WordPress Memo</title>
	<link>https://blog.riverforest-wp.info</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>WordPress ローカルネットワークでの開発環境構築 ～ Ubuntu 20.04.1</title>
		<link>https://blog.riverforest-wp.info/wordpress-local-ubuntu/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Mon, 03 May 2021 23:57:37 +0000</pubDate>
				<category><![CDATA[開発環境]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ローカルネットワーク]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=2668</guid>

					<description><![CDATA[次ページ：SSH 接続 &#62;&#62; 1構成及び初期設定 2SSH 接続 3Samba のインストールと設定 4LAMP のインストールと設定 5Apache2 を SSL 化 6プロキシサーバーのインストールと設定 [&#8230;]]]></description>
										<content:encoded><![CDATA[<div class="pagebreak-description-next-page-link"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/2/" class="post-page-numbers">次ページ：SSH 接続 &gt;&gt;</a></div><div class="pagebreak-description-pagination"> <span class="cp_tooltip_description"><span class="post-page-numbers current" aria-current="page">1</span><span class="cp_tooltip_description_text">構成及び初期設定</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/2/" class="post-page-numbers">2</a><span class="cp_tooltip_description_text">SSH 接続</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/3/" class="post-page-numbers">3</a><span class="cp_tooltip_description_text">Samba のインストールと設定</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/4/" class="post-page-numbers">4</a><span class="cp_tooltip_description_text">LAMP のインストールと設定</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/5/" class="post-page-numbers">5</a><span class="cp_tooltip_description_text">Apache2 を SSL 化</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/6/" class="post-page-numbers">6</a><span class="cp_tooltip_description_text">プロキシサーバーのインストールと設定</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/7/" class="post-page-numbers">7</a><span class="cp_tooltip_description_text">メールサーバーのインストールと設定</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/8/" class="post-page-numbers">8</a><span class="cp_tooltip_description_text">WordPress のインストール及びその他</span></span></p></div><div class="pagebreak-description-for-over">マウスオーバーか長押しで説明を表示。</div><div class="pagebreak-description-next-page-link"></div>
<h1 class="wp-block-heading">はじめに</h1>



<p>開発環境を再構築しました。備忘録として記します。</p>



<ul class="wp-block-list">
<li>ローカルネットワーク内での SSL アクセス
<ul class="wp-block-list">
<li>ショップサイトのテストの為</li>
</ul>
</li>



<li>ローカルネットワーク内でのメール送受信
<ul class="wp-block-list">
<li>作成したチュートリアル動画をボカシ無しで作成する為</li>
</ul>
</li>



<li>ローカルネットワーク内での GUI でのファイル操作
<ul class="wp-block-list">
<li>プラグイン開発時の省力化</li>
</ul>
</li>



<li>PHP のコマンドラインでの実行
<ul class="wp-block-list">
<li>プラグインのアドオンとしてコマンドラインスクリプトをいくつか作成しているが、その大規模なテストを行いたい為</li>
</ul>
</li>
</ul>



<p>仮想マシン（Virtual Box）や、コンテナ型仮想環境（Docker）でもできるかと思いますが、ストレージやメモリがかなり必要になるのと、以前、Docker で動作させたものが遅かったのもあり、手元に使用してないマシンがあったので、それを使用して構築しました。</p>



<p>※記事更新時の、2024年1月時点で、<strong>WSL2(Windows Subsystem for Linux)</strong> での環境も構築しました。この記事内の方法で、同様に構築できます。</p>



<ul class="wp-block-list">
<li><strong>WSL2</strong> での長所
<ul class="wp-block-list">
<li>１台で全てが済む。</li>



<li>インストール時に、IP アドレスが決まるので設定の必要無し。（各ホスト名は設定の必要あり。）</li>



<li>シェルが立ち上がるので、SSH 関連の設定の必要無し。</li>



<li>エクスプローラーから、ディスクが見えるので、Samba が必要無し。</li>
</ul>
</li>



<li><strong>WSL2</strong> での短所
<ul class="wp-block-list">
<li>現在のバージョンでは、外部端末からの接続が、port を開けるなどの面倒な手順が必要。</li>
</ul>
</li>
</ul>



<style>
.simpleblogcard_img_block2d9e612733aba0e4b8f453cbe4a2672d {
  float: right;
  padding: 10px;
}
.simpleblogcard_border2d9e612733aba0e4b8f453cbe4a2672d {
  border-left: solid 8px #cd162c;
  padding: 0.25em 0.25em;
  background: transparent;
}
.simpleblogcard_title2d9e612733aba0e4b8f453cbe4a2672d {
  line-height: 155%;
  font-weight: bold;
  display: block;
}
.simpleblogcard_description2d9e612733aba0e4b8f453cbe4a2672d {
  line-height: 155%;
  color: #333;
}
</style>
<div class="simpleblogcard_wrap">
			<a style="text-decoration: none;" href=https://learn.microsoft.com/ja-jp/windows/wsl/>
				<figure class="simpleblogcard_img_block2d9e612733aba0e4b8f453cbe4a2672d">
			<img decoding="async" style="border-radius: 5px; width: 100px; height: 52px;" src="https://learn.microsoft.com/en-us/media/open-graph-image.png" alt="Windows Subsystem for Linux のドキュメント | Microsoft Learn" />
		</figure>
		<div class="simpleblogcard_inner">
		<div class="simpleblogcard_border2d9e612733aba0e4b8f453cbe4a2672d">
			learn.microsoft.com			<div class="simpleblogcard_title2d9e612733aba0e4b8f453cbe4a2672d">
				Windows Subsystem for Linux のドキュメント | Microsoft Learn			</div>
							<div class="simpleblogcard_description2d9e612733aba0e4b8f453cbe4a2672d">
					Windows Subsystem for Linux のドキュメントの概要。				</div>
					</div>
	</div>
	<div style="clear: both;"></div>
	</a>
</div>



<h2 class="wp-block-heading">初期構成</h2>



<ul class="wp-block-list">
<li>Lenovo Yoga Book with Windows
<ul class="wp-block-list">
<li>CPU: Atom 1.44Ghz</li>



<li>メモリ: 4G</li>



<li>ストレージ: 64G</li>
</ul>
</li>
</ul>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e6bfc33257a&quot;}" data-wp-interactive="core/image" data-wp-key="69e6bfc33257a" class="wp-block-image aligncenter size-large wp-lightbox-container"><img fetchpriority="high" loading="eager" decoding="async" width="1024" height="768" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu-1024x768.jpg" alt="" class="wp-image-2725" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu-1024x768.jpg 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu-300x225.jpg 300w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu-768x576.jpg 768w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu-1536x1151.jpg 1536w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu-1920x1439.jpg 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="拡大する"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p>現在、Micro USB からの給電のみで、全てメイン機から操作しています。Ubuntu Server で無いのは、Micro USB に繋げた USB ハブが認識されずにキーボードが使えなかったからですが、結果的に良かったです。Ubuntu では、本体のハロキーボード（独特のタッチタイプの光るキーボード）は使えませんが、タッチパネル（GUI の時）は使えます。</p>



<p>ちなみに、後ろに見えるメイン機は、Surface Pro 6 (Windows10)です。</p>



<h2 class="wp-block-heading">インストール</h2>



<p>インストールは、Micro USB にダイレクトに接続できる USB メモリが手元にあったので、そこからブートさせて行いました。電源ボタンと音量の＋ボタンを同時に押すと、Bios が立ち上がりそこで選択できます。</p>



<h2 class="wp-block-heading">現在の構成（実機）</h2>



<p>※記事更新時の、2024年1月時点では、<a href="https://www.intel.co.jp/content/www/jp/ja/products/sku/205033/intel-nuc-11-performance-kit-nuc11pahi3/specifications.html">Intel NUC11PAHI3 </a>を使用しています。サーバーは早い方が良いです！</p>



<ul class="wp-block-list">
<li>Intel NUC11PAHI3
<ul class="wp-block-list">
<li>CPU: Corei3-1115G4</li>



<li>メモリ: 8G</li>



<li>ストレージ: 256G</li>
</ul>
</li>
</ul>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e6bfc332c72&quot;}" data-wp-interactive="core/image" data-wp-key="69e6bfc332c72" class="wp-block-image aligncenter size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="639" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://blog.riverforest-wp.info/wp-content/uploads/20210506/win11-ubuntu-riverforest-1024x639.jpg" alt="" class="wp-image-3345" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20210506/win11-ubuntu-riverforest-1024x639.jpg 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/win11-ubuntu-riverforest-300x187.jpg 300w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/win11-ubuntu-riverforest-768x480.jpg 768w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/win11-ubuntu-riverforest-1536x959.jpg 1536w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/win11-ubuntu-riverforest-2048x1279.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="拡大する"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<h2 class="wp-block-heading">現在の構成（WSL2）</h2>



<p>※記事更新時の、2024年1月時点では、<a href="https://support.microsoft.com/ja-jp/surface/surface-pro-6-%E3%81%A4%E3%81%AE%E4%BB%95%E6%A7%98%E3%81%A8%E6%A9%9F%E8%83%BD-ade5cfc2-e99a-6fd1-abbe-c0e8a8a3942d">Surface Pro 6</a> を使用しています。必要十分の動作速度・安定感です。</p>



<ul class="wp-block-list">
<li>CPU: Core i5-8250U</li>



<li>メモリ: 8G</li>



<li>ストレージ: 256G </li>
</ul>



<h2 class="wp-block-heading">ホストを決める</h2>



<p>IP アドレスを 192.168.179.2 に固定しました。</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e6bfc333306&quot;}" data-wp-interactive="core/image" data-wp-key="69e6bfc333306" class="wp-block-image aligncenter size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="832" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu_settings_ip-1024x832.jpg" alt="" class="wp-image-2727" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu_settings_ip-1024x832.jpg 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu_settings_ip-300x244.jpg 300w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu_settings_ip-768x624.jpg 768w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu_settings_ip-1536x1247.jpg 1536w, https://blog.riverforest-wp.info/wp-content/uploads/20210506/ubuntu_settings_ip-1920x1559.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="拡大する"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p>そのアドレスに対応するホストを以下の様に決めました。</p>



<pre class="prism line-numbers"><code class="language-php language-html">192.168.179.2	riverforest.test /* メイン */
192.168.179.2	shop.riverforest.test /* 英語専用のショップサイト */
192.168.179.2	shop-jp.riverforest.test /* 日本語専用のショップサイト */
192.168.179.2	mail.riverforest.test /* メールサーバー */
192.168.179.2	compe.riverforest.test /* 競技会採点システムのサイト */
192.168.179.2	bdc.riverforest.test /* ボールルームダンス競技会採点システムのサイト */</code></pre>



<p>名前解決の為に、上記を以下に追記しました。</p>



<ul class="wp-block-list">
<li>Ubuntu: /etc/hosts</li>



<li>Windows10: C:\Windows\System32\drivers\etc\hosts</li>
</ul>



<p>Ubuntu 側は、次の SSH 接続が出来てから編集しました。</p>


<div class="pagebreak-description-next-page-link"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/2/" class="post-page-numbers">次ページ：SSH 接続 &gt;&gt;</a></div><div class="pagebreak-description-pagination"> <span class="cp_tooltip_description"><span class="post-page-numbers current" aria-current="page">1</span><span class="cp_tooltip_description_text">構成及び初期設定</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/2/" class="post-page-numbers">2</a><span class="cp_tooltip_description_text">SSH 接続</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/3/" class="post-page-numbers">3</a><span class="cp_tooltip_description_text">Samba のインストールと設定</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/4/" class="post-page-numbers">4</a><span class="cp_tooltip_description_text">LAMP のインストールと設定</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/5/" class="post-page-numbers">5</a><span class="cp_tooltip_description_text">Apache2 を SSL 化</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/6/" class="post-page-numbers">6</a><span class="cp_tooltip_description_text">プロキシサーバーのインストールと設定</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/7/" class="post-page-numbers">7</a><span class="cp_tooltip_description_text">メールサーバーのインストールと設定</span></span> <span class="cp_tooltip_description"><a href="https://blog.riverforest-wp.info/wordpress-local-ubuntu/8/" class="post-page-numbers">8</a><span class="cp_tooltip_description_text">WordPress のインストール及びその他</span></span></p></div><div class="pagebreak-description-for-over">マウスオーバーか長押しで説明を表示。</div><div class="pagebreak-description-next-page-link"></div>]]></content:encoded>
					
		
		<enclosure url="https://blog.riverforest-wp.info/wp-content/uploads/20210506/ssh_login.mp4" length="556417" type="video/mp4" />

			</item>
	</channel>
</rss>
