Skip to content
forked from nginx/nginx

An official read-only mirror of http://hg.nginx.org/nginx/ which is updated hourly. Pull requests on GitHub cannot be accepted and will be automatically closed. The proper way to submit changes to nginx is via the nginx development mailing list, see http://nginx.org/en/docs/contributing_changes.html

Notifications You must be signed in to change notification settings

lightningMan/nginx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

如何在 Mac 下编译并修改 Nginx 代码

1.本地创建编译完成之后, Nginx 最终目录

sudo mkdir /apps
sudo chmod 777 /apps

2.下载代码到用户目录

cd ~
mkdir github && cd github
git clone [email protected]:lightningMan/nginx.git

3.配置、编译、安装

cd ~/github/nginx
./run

4.验证编译是否成功

a.编译完之后的 Nginx 所有的文件可以在 /apps/nginx 中找到,你可以通过以下指令来验证

cd /apps/nginx/sbin
./nginx

然后,打开你的浏览器,输入 http://127.0.0.1 便可看到效果

b.由于本仓库编译出来的代码是可以集成到 clion 中 debug 的,因此,你必须确保 ~/github/nginx/objs 下有名为 nginx 的文件,并且此文件也可以直接运行

cd ~/github/nginx/objs
nginx

集成到 clion

我们的目标当然是直接修改源码,并且最终按一下 Debug,就自动完成编译,运行,效果如下 集成 clion 那么到底如何实现?且听下回分解。

About

An official read-only mirror of http://hg.nginx.org/nginx/ which is updated hourly. Pull requests on GitHub cannot be accepted and will be automatically closed. The proper way to submit changes to nginx is via the nginx development mailing list, see http://nginx.org/en/docs/contributing_changes.html

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 77.0%
  • HTML 6.4%
  • Roff 5.8%
  • Shell 4.2%
  • Makefile 2.4%
  • C++ 1.3%
  • Other 2.9%