How To Install Pip on Ubuntu 18.04 LTS

Install Pip on Ubuntu 18

The Pip command is a tool for installing and managing Python packages, such as those found in the Python Package Index. With the help of pip you can also install the package of particular version. Most importantly pip has a feature to manage full lists of packages and corresponding version numbers, possible through a “requirements” file. It performs the same basic job as easy_install, but with some extra features.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Pip Python on a Ubuntu 18.04 LTS (Bionic Beaver) server.

Install Pip on Ubuntu 18.04 LTS Bionic Beaver

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing PIP on Ubuntu 18.04 LTS.

Install the pip by using apt-get command:

apt install python-pip

Once the installation is completed you can verify that it was successful by using the following command:

pip --version

Step 3. Basic Usage pip command.

After installing python-pip package, the pip command will be available on system. There are multiple options available with pip command:

To install new python package type:

pip install Package_Name

To uninstall python package installed by pip type:

pip uninstall Package_Name

To search python package type:

pip search Package_Name

For more Pip options and usage examples you can use the –help flag:

[[email protected] ~]# pip --help

Usage:   
  pip <command></command> [options]

Commands:
  install                     Install packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  zip                         DEPRECATED. Zip individual packages.
  unzip                       DEPRECATED. Unzip individual packages.
  bundle                      DEPRECATED. Create pybundles.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output.
  --log-file            Path to a verbose non-appending log, that only logs failures. This
                              log is active by default at /home/sharad/.pip/pip.log.
  --log                 Path to a verbose appending log. This log is inactive by default.
  --proxy              Specify a proxy in the form [user:passwd@]proxy.server:port.
  --timeout              Set the socket timeout (default 15 seconds).
  --exists-action     Default action when a path already exists: (s)witch, (i)gnore,
                              (w)ipe, (b)ackup.
  --cert                Path to alternate CA bundle.
[[email protected] ~]#

Congratulation’s! You have successfully installed Pip. Thanks for using this tutorial for installing Pip Python on Ubuntu 18.04 LTS Bionic Beaver system. For additional help or useful information, we recommend you to check the official Python web site.

How To Install Go on Ubuntu 18.04 LTS

Install Go on Ubuntu 18

Golang is an open source programming language that makes it easy to build simple, reliable, and efficient software. In a nutshell, Go is an elegant language with a clean and concise specifications that are readable and comprehensive. One of the major strengths of Golang is its concurrency, which means multiple process of the Go applications can run at same time.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Go programming language on Ubuntu 18.04 LTS Bionic Beaver server.

Install Go on Ubuntu 18.04 LTS Bionic Beaver

Step 1. First, make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Go on Ubuntu 18.04 LTS.

Method 1. Install Go using Golang installer.


wget -q https://storage.googleapis.com/golang/getgo/installer_linux

Make the Golang installation executable:

chmod +x installer_linux

Then, run the installer_linux executable to install Go on your Ubuntu system:

### ./installer_linux 
Welcome to the Go installer!
Downloading Go version go1.10 to /home/linuxconfig/.go
This may take a bit of time...
Downloaded!
Setting up GOPATH
GOPATH has been set up!

One more thing! Run `source /home/wpcademy/.bash_profile` to persist the
new environment variables to your current session, or open a
new shell prompt.

As prompted by installer, run the source command to update your current shell session variables to include the new GOPATH, or simply open a new shell session:

source /home/wpcademy/.bash_profile

You can confirm with the Go version installed:

### go version
go version go1.10 linux/amd64

Method 2. Install Go from Ubuntu repostiory.


apt install golang

Next, we first need to set GOPATH:

echo 'export GOPATH=$HOME/go' >> ~/.bashrc 
echo 'export PATH=${PATH}:${GOPATH}/bin' >> ~/.bashrc 
source ~/.bashrc

Method 3. Install Go using Snap.


snap install go --classic

Next, set GOPATH:

echo 'export GOPATH=$HOME/go' >> ~/.bashrc 
echo 'export PATH=${PATH}:${GOPATH}/bin' >> ~/.bashrc 
source ~/.bashrc

Check for installed version:

### go version
go version go1.10 linux/amd64

Congratulations! You have successfully installed Go. Thanks for using this tutorial for installing Go programming language in Ubuntu 18.04 LTS Bionic Beaver systems. For additional help or useful information, we recommend you to check the official Go programming language web site.

How To Install Nginx on Ubuntu 18.04 LTS

Install Nginx on Ubuntu 18

Nginx is a powerful web server software that can be used on your server. It is also known for its high performance and low memory usage which will allow fewer resources to be used but getting the job done efficiently. A popular set up is to use it as a proxy for Apache, which can then serve application requests.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Nginx on a Ubuntu 18.04 (Bionic Beaver) server.

Install Nginx on Ubuntu 18.04 LTS Bionic Beaver

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Nginx.

Installing nginx package on Ubuntu 18.04 Bionic Beaver) is as easy as running:

apt-get install nginx

After that, run the commands to enable Nginx to automatically startup when your server starts:

sudo systemctl stop nginx.service
sudo systemctl start nginx.service
sudo systemctl enable nginx.service

To test Nginx setup, open your browser and browse to the server hostname or IP address and you should see Nginx default test page as shown below:

Nginx-Default-Page-Ubuntu

Step 3. Configure Nginx.

Nginx site-specific configuration files are kept in /etc/nginx/conf.d/. Generally you will want a separate file in this directory for each domain or subdomain you will be hosting.

Copy the default configuration file. Replace wpcademy.com with your website’s domain name or your public IP address.


sudo cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/https://wpcademy.com.conf

Open your site’s configuration file in a nano text editor. Replace example.com in the server_name directive with your site’s domain name or IP address. If you already have content ready to serve (such as a WordPress installation) replace the path in the root directive with the path to your site’s content:


server {
 listen 80;
 server_name wpcademy.com;

#charset koi8-r;
 #access_log /var/log/nginx/host.access.log main;

location / {
 root /usr/share/nginx/html;
 index index.html index.htm;
 }

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
 #
 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root /usr/share/nginx/html;
 }
}

Test your configuration for errors:

nginx -t

Step 4. Configure the Firewall for Nginx.
Firewall software needs to be adjusted to allow access to the service. Nginx registers itself as a service with ufw upon installation, making it straightforward to allow Nginx access:

sudo ufw allow 'Nginx HTTP'

Congratulations! You have successfully installed Nginx. Thanks for using this tutorial for installing Nginx web server in Ubuntu 18.04 LTS (Bionic Beaver) system. For additional help or useful information, we recommend you to check the official Nginx web site.

How To Install IntelliJ IDEA on Ubuntu 18.04 LTS

Install IntelliJ IDEA on Ubuntu 18

IntelliJ IDEA is an integrated development environment for Java development. Notably, Google uses IntelliJ IDEA as the base for its Android Studio, an open source Android development IDE for developing Android applications. It is developed by JetBrains and is available in two editions, Community and Ultimate.

IntelliJ IDEA also supports major build automation tools such as Maven, Ant and Gradle, version controls systems such as Git and SVN. It has a built-in terminal, database tools, code completion, inline debugger. Also, it supports detecting duplicates, connecting Docker containers and application servers such as Tomcat, JBoss, etc.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation IntelliJ IDEA on a Ubuntu 18.04 (Bionic Beaver) server.

Install IntelliJ IDEA on Ubuntu 18.04 LTS Bionic Beaver

Step 1. First, make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing IntelliJ IDEA on Ubuntu.

The recommended approach to install IntelliJ on Ubuntu 18.04 Linux system is to use the Snaps package. Run the following command to install the IntelliJ IDEA snap package:

### INTELLIJ IDEA COMMUNITY ###
sudo snap install intellij-idea-community --classic --edge

### INTELLIJ IDEA ULTIMATE ###
sudo snap install intellij-idea-ultimate --classic --edge

That’s it. IntelliJ IDEA has been installed on your Ubuntu desktop.

Step 3. Starting IntelliJ IDEA.

After successful instalation to start IntelliJ IDEA IDE via terminal run following command:

### INTELLIJ IDEA COMMUNITY ###
intellij-idea-community

### INTELLIJ IDEA ULTIMATE ###
intellij-idea-ultimate

Alternatively, you can start it by clicking on the IntelliJ IDEA icon (Activities -> IntelliJ IDE).

Congratulation’s! You have successfully installed IntelliJ IDEA. Thanks for using this tutorial for installing IntelliJ IDEA on your Ubuntu 18.04 system. For additional help or useful information, we recommend you to check the official IntelliJ IDEA website.

How To Install HAProxy on Ubuntu 18.04 LTS

Install HAProxy on Ubuntu 18

HAProxy is a free HTTP/TCP high availability load balancer and proxy server. It spreads requests among multiple servers to mitigate issues resulting from single server failure. HA Proxy is used by a number of high-profile websites including GitHub, Bitbucket, Stack Overflow, Reddit, Tumblr, Twitter and Tuenti and is used in the OpsWorks product from Amazon Web Services.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation HAProxy on an Ubuntu 18.04 bionic beaver.

Install HAProxy on Ubuntu 18.04 LTS Bionic Beaver

Step 1. First, make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Network Details.

To install and configure HAProxy load balancer on Ubuntu 18.04 we will consider three system as follows:
Web Server Details:

Server 1: web1.wpcademy.com 192.168.1.104
Server 2: web1.wpcademy.com  192.168.1.105
HAProxy Server:
HAProxy: haproxy 192.168.1.46

Step 3. Installing HAProxy on Ubuntu.

At first we will install HAProxy by executing below commands:

sudo add-apt-repository ppa:vbernat/haproxy-1.7
sudo apt update
sudo apt install haproxy

Step 4. Configuring HAProxy.

Now edit haproxy default configuration file /etc/haproxy/haproxy.cfg and start configuration:

nano /etc/haproxy/haproxy.cfg

At the end of the file we will add folowing information:

<em>frontend Local_Server
bind 192.168.1.46:80
mode http
default_backend webserver</em>

backend webserver
mode http
balance roundrobin
option forwardfor
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
option httpchk HEAD / HTTP/1.1rnHost:localhost
server system1.osradar.com 192.168.1.104:80
server system2.osradar.com 192.168.1.105:80

To verify the configuration:

sudo haproxy -c -f /etc/haproxy/haproxy.cfg

If above command return output as “configuration file is valid” then restart HAProxy service:

systemctl restart haproxy

Step 5. Accessing HAProxy.

With the HAProxy configured and running, open your load balancer server’s public IP in a web browser and check that you get connected to your backend correctly. The parameter stats uri in the configuration enables the statistics page at the defined address:

http://192.168.0.46

Congratulation’s! You have successfully installed HAProxy. Thanks for using this tutorial for installing HAProxy load balancer in Ubuntu 18.04 bionic beaver system. For additional help or useful information, we recommend you to check the official HAProxy website.

How To Install TensorFlow on Ubuntu 18.04 LTS

Install TensorFlow on Ubuntu 18

TensorFlow is a free and open source platform for machine learning built by Google. It is used by a number of organizations including Twitter, PayPal, Intel, Lenovo, and Airbus. TensorFlow can be installed system-wide, in a Python virtual environment or as a Docker container using pip.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation TensorFlow on a Ubuntu 18.04 (Bionic Beaver) server.

Install TensorFlow on Ubuntu 18.04 LTS Bionic Beaver

Step 1. First, make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing Python 3 and venv.

Run the commands below to install Python and Python venv:

sudo apt install python3 python3-pip python3-venv

To verify what version of Python is installed, run the commands below:

python3 -V

Step 3. Creating a Virtual Environment.

Now, we create a new directory for the TensorFlow project and navigate into it:

mkdir my_tensorflow
cd my_tensorflow

Once inside the directory, run the following command to create the virtual environment:

python3 -m venv venv

To start using this virtual environment, you need to activate it by running the activate script:

source venv/bin/activate

Step 4. Installing TensorFlow on Ubuntu.

Now that the virtual environment is activated, it’s time to install the TensorFlow package:

pip install --upgrade tensorflow

To verify the installation use the following command which will print the TensorFlow version:

python -c 'import tensorflow as tf; print(tf.__version__)'

Congratulation’s! You have successfully installed TensorFlow. Thanks for using this tutorial for installing TensorFlow on Ubuntu 18.04 systems. For additional help or useful information, we recommend you to check the official TensorFlow website.

How To Install Angular on Ubuntu 18.04 LTS

Install Angular on Ubuntu 18

Redis is a in memory key-value data structure store mainly used as a database, message broker or as a cache. Redis supports wide languages with flexibility and high performance. It supports different data structures like strings, lists, sets, maps, spatial indexes, and bitmaps.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Angular on an Ubuntu 18.04 bionic beaver.

Install Angular on Ubuntu 18.04 LTS Bionic Beaver

Step 1. First, make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing NodeJs and NPM.

To install Angular on Ubuntu 18.04 we first need to install NodeJs and the Node Package Manager (NPM):

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

Then install NPM:

sudo npm install npm@latest -g

Step 3. Installing Install Angular on CentOS.

We will now install the Angular CLI using NPM:

npm install -g @angular/cli

The Angular CLI makes use of git to pull down required modules so we need to make sure we have git configured. If you have not configured the git user name and email then run the following commands to do so:

git config --global user.email "[email protected]"
git config --global user.name "ramona"

Step 4. Creating a new Angular Application.

Now that we have Angular installed we can create a basic scaffolding for a new application. We will use our newly installed Angular CLI to accomplish this:

ng new wpcademy

First change into the newly created directory for our application:

cd wpcademy

We can run our application easily using the NPM command:

npm start

You will see a link in the output that tells you how to view your application:
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

**AngularLiveDevelopmentServerislisteningonlocalhost:4200,openyourbrowseronhttp://localhost:4200/ **

Congratulation’s! You have successfully installed Angular. Thanks for using this tutorial for installing Angular in Ubuntu 18.04 bionic beaver system. For additional help or useful information, we recommend you to check the official Angular website.