- NGINX Cookbook
- Tim Butler
- 210字
- 2021-07-03 00:04:18
Debian/Ubuntu
On Ubuntu/Debian, install the required build tools:
apt-get install devscripts
This will install quite a few packages on your system, so if you're trying to keep your production environment lean, then I'd recommend that you use a separate build box to complete this.
We can now install the build prerequisites for NGINX:
apt-get build-dep nginx
Once you have the required build dependencies, we can now get a copy of the source code. Again, rather than the plain TAR file, we're going to get the packaged variant so that we can easily build them. Here's how we do it:
mkdir ~/nginxbuild
cd ~/nginxbuild
apt-get source nginx
You should now have a directory with the original TAR file, the Debian description, and any Debian specific patches. The apt-get source command will automatically extract and apply patches, as required, into a source directory.
To build without any changes, enter the directory and create the packages:
cd nginx-1.9.10/
fakeroot debian/rules binary
Compiling the code may take a while, depending on how many processors your workstation or server has. Once it has compiled, you should see two binaries in the parent (nginxbuild) directory. The resulting files should be:
- nginx-dbg_1.9.10-1~jessie_amd64.deb
- nginx_1.9.10-1~jessie_amd64.deb
You can now install NGINX via the newly compiled package:
sudo dpkg -i nginx_1.9.10-1~jessie_amd64.deb
- TypeScript Essentials
- UML和模式應(yīng)用(原書第3版)
- WebAssembly實(shí)戰(zhàn)
- 三維圖形化C++趣味編程
- 精通軟件性能測試與LoadRunner實(shí)戰(zhàn)(第2版)
- Python GUI Programming Cookbook
- Processing互動(dòng)編程藝術(shù)
- Practical Game Design
- PHP+MySQL網(wǎng)站開發(fā)項(xiàng)目式教程
- 琢石成器:Windows環(huán)境下32位匯編語言程序設(shè)計(jì)
- KnockoutJS Starter
- R Deep Learning Cookbook
- R用戶Python學(xué)習(xí)指南:數(shù)據(jù)科學(xué)方法
- 分布式數(shù)據(jù)庫原理、架構(gòu)與實(shí)踐
- 零基礎(chǔ)輕松學(xué)C++:青少年趣味編程(全彩版)