<?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>LINUX &#8211; WL</title>
	<atom:link href="https://wwl3.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://wwl3.com</link>
	<description>越来越好，越好越来</description>
	<lastBuildDate>Thu, 18 Sep 2014 14:10:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://wwl-1316477995.cos.ap-shanghai.myqcloud.com/uploads/2023/01/logo-188x188.jpg</url>
	<title>LINUX &#8211; WL</title>
	<link>https://wwl3.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Mac环境配置Nginx</title>
		<link>https://wwl3.com/2012/08/mac-nginx-mac-ports/</link>
		
		<dc:creator><![CDATA[王万林]]></dc:creator>
		<pubDate>Wed, 29 Aug 2012 12:12:57 +0000</pubDate>
				<category><![CDATA[Retweeted]]></category>
		<category><![CDATA[LINUX]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">http://wwl3.com/?p=774</guid>

					<description><![CDATA[Mac OS X 安装 nginx + php fcgi + mysql
Install MacPorts
Mac中MacPorts安装和使用]]></description>
										<content:encoded><![CDATA[<h2>引用文章</h2>
<hr />
<p><a href="http://www.myhack58.com/Article/48/67/2011/32619.htm" target="_blank">Mac OS X 安装 nginx + php fcgi + mysql</a></p>
<p><a href="http://www.macports.org/install.php" target="_blank">Install MacPorts</a></p>
<p><a href="http://www.zikercn.com/node/8" target="_blank"> Mac中MacPorts安装和使用</a></p>
<h2>MacPorts安装</h2>
<hr />
<p>1.cd到Downloads/目录下wget下载 <strong>MacPorts-2.1.1.tar.gz</strong><br />
输入: <strong>wget <a href="https://distfiles.macports.org/MacPorts/MacPorts-2.1.1.tar.gz">https://distfiles.macports.org/MacPorts/MacPorts-2.1.1.tar.gz</a><br />
<img decoding="async" src="http://www.zikercn.com/sites/default/files/image/wget%20MacPorts-2.1.1.png" alt="wget MacPorts-2.1.1.tar" data-markzhi="registered" /></strong></p>
<p>2.解压 MacPorts-2.1.1.tar.gz 输入: <strong>tar zxvf MacPorts-2.1.1.tar.gz</strong> (tar jxvf MacPorts2.1.1.tar.bz2)<br />
<img decoding="async" src="http://www.zikercn.com/sites/default/files/image/tar%20zxvf%20MacPorts-2.1.1.png" alt="tar zxvf MacPorts-2.1.1.tar" /></p>
<p>3.cd到解压到的目录MacPorts-2.1.1输入: <strong>./configure &amp;&amp; make &amp;&amp; sudo make install</strong> 安装<br />
<img decoding="async" src="http://www.zikercn.com/sites/default/files/image/MacPorts%20configure%20%26%26%20make%20%26%26%20sudo%20make%20install.png" alt="configure &amp;&amp; make &amp;&amp; sudo make install" /><br />
中间提示输入密码完成安装!</p>
<p>7.然后将/opt/local/bin和/opt/local/sbin添加到$PATH搜索路径中<br />
编辑/etc/profile文件 $ sudo vim /etc/profile (特许编辑,强制保存退出 wq!)文件最后加上下面两句</p>
<div>
<div id="highlighter_102433">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
</td>
<td>
<div>
<div><code>export</code> <code>PATH=</code><code>/opt/local/bin</code><code>:$PATH</code></div>
<div><code>export</code> <code>PATH=</code><code>/opt/local/sbin</code><code>:$PATH</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<h2>MacPorts使用</h2>
<hr />
<p>1.Mac Port中第三方软件下载包存放的默认路径是：<strong>/opt/local/var/macports/distfiles/</strong><br />
为了提高安装速度，可以在安装新port时直接将此目录下的文件拷贝到新的Mac Port相同的目录中就可以避免Port去网上下载。</p>
<p>2.使用Mac Port前应该首先更新Port的index<br />
输入: $ <strong>sudo port -v selfupdate</strong> (强烈推荐第一次运行的时候使用-v参数，显示详细的更新过程)<br />
<img decoding="async" src="http://www.zikercn.com/sites/default/files/image/sudo%20port%20-v%20selfupdate.png" alt="sudo port -v selfupdate" /></p>
<div>
<h2>安装Nginx</h2>
<hr />
</div>
<div>在Mac上使用macport安装和配置Nginx非常方便，首先安装nginx</div>
<div>sudo port install nginx spawn-fcgi</div>
<div>安装完成后启动nginx会说没有nginx.conf文件，到/opt/local/etc/nginx目录下看到以下几个文件:</div>
<div>fastcgi_params.example koi-utf koi-win mime.types.example nginx.conf.example win-utf</div>
<div>直接复制example文件:</div>
<div>sudo mv mime.types.example mime.types</div>
<div>sudo mv nginx.conf.example nginx.conf</div>
<div>启动nginx:</div>
<div>sudo nginx</div>
<div>访问http://127.0.0.1/，就可以看到Nginx的Welcome页面。</div>
<div>如何重启nginx？</div>
<div># 检测配置文件是否有效</div>
<div>sudo nginx -t</div>
<div># 重启</div>
<div>sudo nginx -s reload</div>
<div># 帮助</div>
<div>sudo nginx -h</div>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
