您的位置:首页 > 运维架构 > Nginx

mac 安装 nginx

2014-07-16 16:18 190 查看
nginx需要pcre支持

使用macprot安装pcre

sudoportinstallpcre

接下来的步奏参考centos下nginx的安装。

macport安装

因为Mac的底层是bsd的,所以我们一可以使用bsd的软件包安装方式–Macports,类似linux下的yumapt-get.

访问官方网站http://www.macports.org/install.php,这里提供有dmg安装和源码安装两种方式,dmg就不多说了,下一步下一步安装即可。

下载地址http://distfiles.macports.org/MacPorts/

1、

vim~/.bash_profile


export
PATH=/opt/local/bin:$PATH

source
~/.bash_profile


2、通过Source安装MacPort

wgethttp://distfiles.macports.org/MacPorts/MacPorts-2<strongid="speechFragmentSeparator__1_13"class="speechFragmentSeparator"style="margin:0px;padding:0px;border:0px;font-size:12px;font:inherit;vertical-align:baseline;font-weight:inherit;font-style:inherit;">.1</strong>.2.tar.gz
tarzxvfMacPorts-2.1.2.tar.gz
cdMacPorts-2.1.2
./configure&&make&&sudomakeinstall
cd../
rm-rfMacPorts-2<strongid="speechFragmentSeparator__1_16"class="speechFragmentSeparator"style="margin:0px;padding:0px;border:0px;font-size:12px;font:inherit;vertical-align:baseline;font-weight:inherit;font-style:inherit;">.1</strong>.2*


MacPorts使用

参见官方文档:http://guide.macports.org/#installing.shell
sudoport-vselfupdate


搜索索引中的软件
portsearchname


安装新软件
sudoportinstallname


sudoportuninstallname



查看有更新的软件以及版本
portoutdated



升级可以更新的软件
sudoportupgradeoutdated
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: