Root-Server Tutorial

ROOT-SERVER TUTORIAL

Installing Homebrew on Your netcup Server

Learn how to install Homebrew on your netcup Server and carry out basic functions like installing, removing and managing packages.

Author:

Nishant Bhagat

Last updated:

23/10/2023

Introduction

In this tutorial, you will learn how to install Homebrew on your netcup server to manage software packages. Homebrew simplifies software management, especially in Unix and Unix-like environments. This guide will also equip you with knowledge on performing basic operations like installing, removing and managing packages.

This tutorial is focused on Linux distributions and should be read with that context in mind.

Requirements

A netcup server running a fairly modern distribution of Linux such as the latest Ubuntu or Debian. You will need root or sudo privileges to complete the installation.

Step 1 - Install dependencies

First, ensure your server has all required dependencies.

sudo apt-get install build-essential curl git

Step 2 - Install Homebrew

Download and run the Homebrew installation script using the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then, adjust the PATH variable to include Homebrew, using:

echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

Step 3 - Verify Homebrew installation

Use the command brew doctor to confirm Homebrew is working as expected. You may also verify that everything is installed properly by installing a package:

brew install python

Common Homebrew commands

  • Install a package: brew install package_name
  • Uninstall a package: brew remove package_name
  • List installed packages: brew list
  • Remove unneeded dependencies: brew autoremove

Removing Homebrew

Download and run the uninstallation script to remove Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

You may manually remove leftover directories to finalize the uninstallation.

Conclusion

Homebrew can be a handy addition that helps with software management on your netcup server. Homebrew can simplify tasks, from installing to managing packages.

License

MIT

Copyright (c) 2021 netcup

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributor's Certificate of Origin

By making a contribution to this project, I certify that:

  1. The contribution was created in whole or in part by me and I have the right to submit it under the license indicated in the file; or

  2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same license (unless I am permitted to submit under a different license), as indicated in the file; or

  3. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

  4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the licence(s) involved.

Published 23/10/2023 by Nishant Bhagat

Submit your tutorial

Get 60€ netcup vouchers for every published tutorial.