Wednesday, June 22, 2022
HomeITFind out how to set up Linux purposes from the command line

Find out how to set up Linux purposes from the command line


Linux is not practically as exhausting as you assume it’s. Actually, Linux has turn out to be one of many best desktop and server working programs on the planet. How is that potential? For one factor, trendy Linux distributions make it so that you by no means want to the touch the command-line interface. That is proper, you are able to do the whole lot you want inside the point-and-click GUI–identical to you do with macOS and Home windows. It truly is that straightforward.

And although you actually can do the whole lot from inside the well-designed GUI instruments, there may come a time when it’s essential to (or simply need to) make use of the terminal. One such event is likely to be in the event you’ve deployed Linux as a server with no desktop surroundings. You may need to have a Linux server on your private home LAN to deploy issues to, together with net servers, file servers, media streaming platforms, and extra. When that is the case, you will have to know find out how to set up purposes from the command line. 

For instance, you need to set up the Nextcloud cloud-based content material administration and collaboration platform. Or possibly you need to construct a complete web site from scratch and serve it up through the Apache net server. You may even desire a full LAMP (Linux Apache MySQL PHP) stack in your server.

No matter why, you will have to know find out how to set up these purposes from the CLI (command-line interface). I’ll present you the way. Let’s persist with our LAMP stack instance for instance how to do that on Ubuntu, AlmaLinux, Arch Linux, and openSUSE (which ought to cowl most distributions).

Prepared? Let’s go.

Putting in a LAMP stack on Ubuntu-based distributions

Our first demonstration will likely be on the user-friendly Ubuntu distribution. Ubuntu makes use of the APT (Superior Packaging Instrument) bundle supervisor and makes putting in a full LAMP stack extremely straightforward. A primary APT set up appears like this:

sudo apt set up PACKAGENAME -y

The place PACKAGENAME is the title of the software program you need to set up. Earlier than you run the set up, you may need to first replace APT with:

With APT up to date, you are prepared to put in the LAMP stack. One of many helpful tips with Ubuntu and the LAMP stack is that you could set up all of it with a single easy command, which is:

sudo apt set up lamp-server^ -y

When you do not need to go that route, you may set up the packages individually. First set up the Apache net server with:

sudo apt set up apache2 -y

Subsequent, set up the MySQL database server with:

sudo apt set up mysql-server -y

You may then set up the newest model of PHP with:

sudo apt set up php8.1-fpm php8.1 libapache2-mod-php8.1 php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-imap php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-intl php8.1-bcmath unzip -y

After all, you may decide to do all of it with the single-line command proven above.

Putting in a LAMP stack on AlmaLinux

AlmaLinx is a Pink Hat Enterprise Linux-based distribution, and the set up requires you to put in every bundle individually. 

First, set up the online server with:

sudo dnf set up httpd -y

Subsequent, set up the MySQL database server with:

sudo dnf set up mysql-server mysql -y

Lastly, you put in PHP with:

Putting in a LAMP stack on Arch Linux

Arch Linux is almost as user-friendly as is both Ubuntu or AlmaLinux. Arch Linux makes use of the pacman bundle supervisor and should first be up to date with:

As soon as up to date, set up Apache with:

Subsequent, set up the MySQL database server with:

Lastly, set up PHP with:

sudo pacman -S php php-apache

The choices used above are:

Putting in a LAMP server on openSUSE

Lastly, we’ll set up the LAMP server on openSUSE, which makes use of the zypper bundle supervisor. Replace zypper with:

Set up Apache on openSUSE with:

sudo zypper set up apache2

Set up the MariaDB database with:

sudo zypper set up mariadb mariadb-client mariadb-tools

Set up PHP7 with:

sudo zypper set up php7 php7-mysql apache2-mod_php7

The commonality

Apart from Arch Linux, the set up of software program is usually dealt with like so:

sudo PACKAGEMANAGER set up SOFTWARE

The place PACKAGEMANAGER is the bundle supervisor utilized by the distribution and SOFTWARE is the title of the software program to be put in.

The identical holds true for eradicating software program, as in:

sudo PACKAGEMANAGER take away SOFTWARE

Once more, the place PACKAGEMANAGER is the bundle supervisor utilized by the distribution and SOFTWARE is the title of the software program to be put in.

To higher illustrate this, you may set up the Firefox net browser on every platform like so:

  • Ubuntu – sudo apt set up firefox -y

  • AlmaLinux – sudo dnf set up firefox -y

  • openSUSE – sudo zypper firefox -y

After all, with Arch Linux, that command could be:

sudo pacman -S firefox -y

And that is actually the fundamentals of putting in software program from the Linux command line. It actually is really easy anybody who can sort can set up software program from the Linux command line.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments