Installation configuration nginx ubuntu without root privileges under the circumstances

As the case of the company's common development machine assign permissions to each user, and as developers do not know the root password, how to install and use nginx.

 

 

1, preparation of documents

https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#sources  - official documents

 

 

2, create a new folder, cd into

/home/myplace/download/soft/nginx

 

 

3, good, directly into the build environment to prepare, under the new directory folder nginx, nginx first download dependence

Since most PCs have two other things, so I'll just do this:

$ wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz

 

 

4, download nginx

I chose the nginx-1.17.6

$ wget https://nginx.org/download/nginx-1.17.6.tar.gz

 

 

5, extract all downloaded above

$ Ls *. of .gz | xargs -n1 of xzvf

 

 

6, this time need to see a compilation of nginx parameters

Enter nginx directory

$ cd nginx-1.17.6/

 

我按自己的需求,运行的编译参数如下:(指定了我的安装目录为我个人文件夹下的 nginx 文件夹)

$ ./configure --with-http_ssl_module --with-http_v2_module --with-pcre=../pcre-8.43 --prefix=/home/myplace/nginx

 

 

7、编译

make & make install

Guess you like

Origin www.cnblogs.com/yummylucky/p/12061207.html