Installing NGINX

  1. Download the zlib installation file.

›_ Console

# wget https://nginx.org/download/nginx-1.23.1.tar.gz 
  1. Extract the file.

›_ Console

# tar -zxf nginx-1.23.1.tar.gz 
  1. Go to the directory where the file is extracted.

›_ Console

# cd nginx-1.23.1 
  1. Run the following command to compile and install.

›_ Console

# ./configure --sbin-path=/usr/local/nginx/nginx --conf-

path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --

with-pcre=/home/pcre-8.44 --with-zlib=/home/zlib-1.2.11 --withhttp_ssl_module --with-stream --with-cc-opt="-I 

/usr/local/openssl/include" --with-ld-opt="-L /usr/local/openssl/lib -ldl 

-Wl,-rpath,/usr/local/openssl/lib" 

# make 

# make install 
  1. Verify that the NGINX has been installed with the correct version of openssl.

›_ Console

# ./nginx -V 
image-3284894148-1.jpg

Nginx version

  1. After the installation is finished, start NGINX.

›_ Console

# ./nginx 
image-3284894148-2.jpg

Nginx service start

  1. Open http://<nginx_server_ip> in any browser and verify that you can see nginx welcome page.

image-3284894148-3.jpg

Nginx Welcome Page with Http