Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Compiling Software from Source in SUSE Linux Enterprise

In this hands-on lab, we will be compiling software from source code and then deploying and testing that software.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 30m
Published
Clock icon Jan 10, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Install the GNU Compiler, Retrieve the Nginx Source Files Package, and Extract It

    1. Install the GNU compiler:

      sudo -i zypper in -y gcc
      
    2. From your home directory, download the Nginx package:

      wget https://nginx.org/download/nginx-1.16.1.tar.gz
      
    3. Extract the package, and switch to its directory:

      tar zxf nginx-1.16.1.tar.gz
      cd nginx-1.16.1
      
  2. Challenge

    Once Inside the Package Directory, Configure the Make File, and Run the Compile and Install Commands

    1. Run the configure command and read the output:

      ./configure
      
    2. Correct the issue using the --without directive:

      ./configure --without-http_rewrite_module
      
    3. Continue until your configure runs with no issues:

      ./configure --without-http_rewrite_module --without-http_gzip_module
      
    4. Once this has completed, run the compile and install commands:

      make
      
      sudo make install
      
  3. Challenge

    Run Nginx and Ensure It Loads, and Then Stop Nginx

    1. Start Nginx:

      sudo /usr/local/nginx/sbin/nginx
      
    2. Make sure it is working by loading the index page:

      curl 127.0.0.1
      
    3. Locate the master process ID:

      ps -ax | grep nginx
      

      Copy the ID of the master process.

    4. Stop Nginx:

      sudo kill <MASTER_PROCESS_ID>
      
    5. Verify Nginx is not running:

      ps -ax | grep nginx
      

      It should return only the grep command.

  4. Challenge

    Create a `websrv` Directory, Reconfigure Nginx to Install to That Directory, and Make and Install It to the `websrv` Directory

    1. Ensure you are in the Nginx source directory:

      cd ~/nginx-1.16.1
      
    2. Clean up the make environment:

      make clean
      
    3. Configure the makefile:

      ./configure --prefix=/home/cloud_user/websrv --without-http_rewrite_module --without-http_gzip_module
      
    4. Make the software and install it:

      make
      sudo make install
      
  5. Challenge

    Run and Verify That Nginx Is Working from the `websrv` Directory

    1. Start the Nginx you just installed:

      cd ~/websrv/sbin
      sudo ./nginx
      
    2. Verify it is working:

      curl 127.0.0.1
      
    3. Locate the master process ID:

      ps -ax | grep nginx
      
    4. Stop the process:

      sudo kill <MASTER_PROCESS_ID>
      

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans