首先是拿到代码python
@bogon:~/git/nginx> #git clone https://xxxx.nginx.git nginx
clone下来以后我,签出一个本地分支nginx
@bogon:~/git/nginx> git checkout v1.5.13 @bogon:~/git/nginx> git branch local @bogon:~/git/nginx> git checkout local
而后我看状况的修改了configure,具体怎么改我有哦不太明白,我只是把安装的目标位置换了一下,我不想configure的时候手动输入那么长一串参数。git
在个人机器上面configure的时候报错了shell
./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option.
search了一下,说:ui
@bogon:~/git/nginx> sudo zypper install pcre-devel
能解决这个报错,试了一下,新的问题来了。code
./configure: error: the HTTP gzip module requires the zlib library. You can either disable the module by using --without-http_gzip_module option, or install the zlib library into the system, or build the zlib library statically from the source with nginx by using --with-zlib=<path> option.
由于个人机器是全新安装的,不少的支持库开发库头文件之类的东西都没有,因此继续searchip
@bogon:~/git/nginx> sudo zypper install zlib-devel -y
而后后面就几乎没报环境错误了,可是有不少的 not found,好比说:md5
checking for md5 in system md library ... not found checking for md5 in system md5 library ... not found checking for md5 in system OpenSSL crypto library ... not found checking for sha1 in system md library ... not found checking for sha1 in system OpenSSL crypto library ... not found
@bogon:~/git/nginx> sudo zypper install openssl-devel -y
解决掉了部分问题,可是没有解决所有 。至于这个对个人运行有没有影响我如今还不太明白,等我真的用得上来了估计就会看明白了把。
ssl
无论了,直接编译了开发
@bogon:~/git/nginx> make
没有报错
@bogon:~/git/nginx> make install
基本上大功告成了。
最后清理一下编译结果,本身的git分支清理干净。
@bogon:~/git/nginx> make clean
而后找到install以后的nginx就能够跑跑试试了,个人由于我修改了configure,因此
@bogon:/usr/nginx/sbin>sudo ./nginx
也能够软连接到 /usr/sbin里面去的。今天就过去了,改睡觉了。