Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Monday, 7 January 2019

Cara Merubah Repo Ubuntu Server 18.04


Repositori pada Ubuntu Server dapat dirubah karena suatu alasan. Saya sendiri menggunakan repo dari US, karena merasa lebih lengkap sepertinya. Masukkan perintah berikut untuk masuk ke file konfigurasi.

nano /etc/apt/sources.list 

Ubah konfigurasi menjadi seperti berikut.

#deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

Simpan file jika sudah. Lakukan proses update dan upgrade dengan perintah,

apt-get update
apt-get upgrade 

Jika bandwith international kalian kecil, kalian bisa menggunakan repo yang berasal dari Indonesia. Sudah tersedia banyak dimesin pencarian untuk repo Ubuntu 18.04 dari Indonesia. Pastikan link repo sesuai dengan versi Ubuntu yang digunakan.

Cara Mengatasi Tidak Bisa Update Ubuntu, Error Saat Update & Upgrade Ubuntu, Update & Upgrade Ubuntu 18.04, Cara Mengatasi Error Install Package Ubuntu.

Thursday, 13 December 2018

Cara Set Static IP Ubuntu 18.04


Konfigurasi network pada ubuntu versi sebelumnya berada pada file interface. Pada Ubuntu 18.04, konfigurasi network disimpan pada file yang bernama 50-cloud-init.yaml. Kali ini saya menggunakan server dengan tipe IBM X3100 M4. Untuk merubah konfigurasi DHCP IP menjadi static dapat dilakukan dengan perintah,

nano /etc/netplan/50-cloud-init.yaml

Setelah itu ubah konfigurasi seperti berikut

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        enp6s0:
            addresses: [172.XXX.XXX.173/25]
            gateway4: 172.XXX.XXX.169
            nameservers:
              addresses: [172.XXX.XXX.131]


Jika ada banyak interface, cari interface yang aktif sedang digunakan. Cek apakah konfigurasi sudah benar dengan perintah,

netplan -debug generate

Pastikan tidak ada errornya.

 
Lalu apply konfigurasi dengan perintah,

netplan apply

Apabila konfigurasi error, coba gunakan spasi daripada tab saat mengedit file konfigurasi. Atau kita juga bisa copy paste file konfigurasi menggunakan Putty via remote, namun untuk cara ini server harus mendapatkan IP dari DHCP agar kita bisa meremotenya.

Cara Ubah Static IP Ubuntu 18.04, Set IP Ubuntu 18.04, IP Static Ubuntu, Setting IP Ubuntu, Setting IP Ubuntu 18.04, Ganti IP Ubuntu 18.04