Home » 2018 (Page 2)

Yearly Archives: 2018

Address

Jl. Meranti Wing 22 Level 4
Kampus IPB Darmaga
Bogor 16680, Jawa Barat, Indonesia
Tlp./Fax +62 (251) 8624535

Hours
Monday—Friday: 08:00–16:00

Setting IP Address (Ubuntu 18.04)

Based on this you configuration in .yaml (sudo /etc/netplan/50-xxxx.yaml) can be:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.97/25]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

Or some appropriate netmask.

Netmask cannot be 255.255.255.1. Netmask for class C addresses can be:

Prefix size         | Subnet mask   
/24                 | 255.255.255.0 
/25                 | 255.255.255.128
/26                 | 255.255.255.192
/27                 | 255.255.255.224
/28                 | 255.255.255.240
/29                 | 255.255.255.248
/30                 | 255.255.255.252
# sudo netplan apply

How To Install R on Ubuntu 18.04

Introduction

R is an open-source programming language that specializes in statistical computing and graphics. In this tutorial, we will install R on an Ubuntu 18.04 server.

For a more detailed version of this tutorial, with better explanations of each step, please refer to How To Install R on Ubuntu 18.04.

Step 1 — Add GPG Key

The Ubuntu archives on CRAN are signed with the key of “Michael Rutter ” with key ID 0x51716619e084dab9. To add the key to your system with one command use (thanks to Brett Presnell for the tip):

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

An alternate method can be used by retrieving the key with

gpg --keyserver keyserver.ubuntu.com --recv-key E298A3A825C0D65DFD57CBB651716619E084DAB9

and then feed it to apt-key with

gpg -a --export E298A3A825C0D65DFD57CBB651716619E084DAB9 | sudo apt-key add -

Some people have reported difficulties using this approach. The issue is usually related to a firewall blocking port 11371. If the first gpg command fails, you may want to try (thanks to Mischan Toosarani for the tip):

gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

and then feed it to apt-key with

gpg -a --export E298A3A825C0D65DFD57CBB651716619E084DAB9 | sudo apt-key add -

Another alternative approach is to search for the key at http://keyserver.ubuntu.com:11371/ and copy the key to a plain text file, say key.txt. Then, feed the key to apt-key with

sudo apt-key add key.txt

Step 2 — Add the R Repository

To obtain the latest R 4.0 packages, add an entry like

deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/

or

deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/

or

deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran40/

Step 3 — Update Package Lists

  • sudo apt update

Step 4 — Install R

  • sudo apt install r-base r-base-dev

If prompted to confirm installation, press y to continue.

Step 5 — Test Install

Start R’s interactive shell as root.

  • sudo -i R

You should receive output similar to the following:

Output

R version 3.5.1 (2018-07-02) -- "Feather Spray"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
...
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>

This confirms that we’ve successfully installed R and entered its interactive shell.

Source:

  • https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-18-04-quickstart

Installing MariaDB on Ubuntu 18.04 from the MariaDB Repositories

At the time of writing this article, the latest version of MariaDB available from the official MariaDB repositories is MariaDB version 10.3. Before continuing with the next step you should visit the MariaDB Repository page and check if there is a new version available.

To install MariaDB 10.3 on your Ubuntu 18.04 server perform the following steps:

  1. First add the MariaDB GPG key to your system using the following command:
    sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8

    Copy

  2. Once the key is imported, add the MariaDB repository with:
    sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://ftp.utexas.edu/mariadb/repo/10.3/ubuntu bionic main'

    Copy

    If you get an error message saying add-apt-repository command not found install the software-properties-common package.

  3. To be able to install packages from the MariaDB repository you’ll need to update the packages list:
    sudo apt update

    Copy

  4. Now that the repository is added install the MariaDB package with:
    sudo apt install mariadb-server

    Copy

  5. The MariaDB service will start automatically, to verify it type:
    sudo systemctl status mariadb

    Copy

    ● mariadb.service - MariaDB 10.3.8 database server
    Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/mariadb.service.d
            └─migrated-from-my.cnf-settings.conf
    Active: active (running) since Sun 2018-07-29 19:36:30 UTC; 56s ago
        Docs: man:mysqld(8)
            https://mariadb.com/kb/en/library/systemd/
    Main PID: 16417 (mysqld)
    Status: "Taking your SQL requests now..."
        Tasks: 31 (limit: 507)
    CGroup: /system.slice/mariadb.service
            └─16417 /usr/sbin/mysqld

    Copy

    And print the MariaDB server version, with:

    mysql -V

    Copy

    mysql  Ver 15.1 Distrib 10.3.8-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

    Copy

Run the mysql_secure_installation command to improve the security of the MariaDB installation:

sudo mysql_secure_installation

Copy

The script will prompt you to set up the root user password, remove the anonymous user, restrict root user access to the local machine and remove the test database. At the end the script will reload the privilege tables ensuring that all changes take effect immediately.

All steps are explained in detail and it is recommended to answer “Y” (yes) to all questions.

To connect to the MariaDB server through the terminal we can use the MariaDB client.

To log in to the MariaDB server as the root user type:

mysql -u root -p

Copy

You will be prompted to enter the root password you have previously set when the mysql_secure_installation script was run.

Once you enter the password you will be presented with the MariaDB shell as shown below:

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 49
Server version: 10.1.29-MariaDB-6 Ubuntu 18.04

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Fix MariaDB Plugin ‘Unix_socket’ Is Not Loaded Error On Ubuntu 18.04

Step 1: Add Unix Authentication Plugin To MariaDB Config

If this issue relates to Unix authentication plugin, the quickest fix is to open MariaDB configuration file and add a single line into the file and save. Run the commands below to open MariaDB default configuration file.

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

Then add the line below [mysqld] section.

plugin-load-add = auth_socket.so

After adding the line into the file, run the commands below to restart MariaDB

sudo systemctl restart mariadb.service

Next, try to sign  on to the database again.

sudo mysql -u root

Running the commands above should logon onto the database without password prompt… that’s because it’s using unix socket authentication.

Step 2: Change To Standard Authentication

Step 1 should be enough to get you into MariaDB server… and should work as long as you keep using unix socket authentication. However, other apps and services like phpMyAdmin that depend on standard password authentication will stop working when you enable socket authentication for the root user.

A typical error you’ll get when unix socket authentication is being used will be  ERROR 1698 (28000): Access denied for user ‘root’@’localhost’

So now that you’ve access to the database, run the commands below to disable unix socket authentication for the root user…

use mysql;
update user set plugin='' where User='root';
flush privileges;
exit

Exit out and you’re done. Now you should be able to logon to the server with standard password authentication.

That’s it!

Source:

  • https://linuxize.com/post/how-to-install-mariadb-on-ubuntu-18-04/
  • https://websiteforstudents.com/fix-mariadb-plugin-unix_socket-is-not-loaded-error-on-ubuntu-17-04-17-10/
November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories