Ana içeriğe geç

Ubuntu 20.04 LTS Genel Ayarlar

Sources list

  • APT paketlerin bulunduğu kaynaklara nasıl erişebileceğinin bilgisini /etc/apt/sources.list dosyasında saklar.
  • sources.list (K)ubuntu program paketlerinin bulunduğu depoların adreslerini içerir. Varsayılan olarak bazı depolar bu listede kapatılmıştır. Bu depoları listeyi değiştirerek kullanabilirsiniz. Ayrıca bu listeye yeni depo adresleri ekleyebilirsiniz. Bu listede yer alan depolardan kurulan programlar root yetkisi ile kurulduğundan güvenilir kaynakları tercih etmeniz tavsiye edilir.
nano /etc/apt/sources.list
  • Sources list yukarıdaki dizinde bulunuyor. Yukarıda da olduğu gibi nano editörü ile düzenlenebilir

Ubuntu 20.04 LTS 64 Bit (Apt-Cacher-NG)

# deb cdrom:[Ubuntu 20.04 LTS _Focal Fossa_ - Release amd64 (20200423)]/ focal main restricted
#deb-src http://192.168.1.247:3142/archive.ubuntu.com/ubuntu focal main restricted #Added by software-properties

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal main restricted
deb-src http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal main multiverse restricted universe

## Major bug fix updates produced after the final release of the
## distribution.
deb http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb-src http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal-updates main multiverse restricted universe

## 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://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal universe
deb http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal-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://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal multiverse
deb http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal-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://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://192.168.1.247:3142/archive.ubuntu.com/ubuntu/ focal-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://192.168.1.247:3142/archive.canonical.com/ubuntu focal partner
deb-src http://192.168.1.247:3142/archive.canonical.com/ubuntu focal partner

deb http://192.168.1.247:3142/security.ubuntu.com/ubuntu focal-security main restricted
deb-src http://192.168.1.247:3142/security.ubuntu.com/ubuntu focal-security main multiverse restricted universe
deb http://192.168.1.247:3142/security.ubuntu.com/ubuntu focal-security universe
# deb-src http://192.168.1.247:3142/security.ubuntu.com/ubuntu focal-security universe
deb http://192.168.1.247:3142/security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://192.168.1.247:3142/security.ubuntu.com/ubuntu focal-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

Ubuntu 20.04 LTS 64 Bit

# deb cdrom:[Ubuntu 20.04 LTS _Focal Fossa_ - Release amd64 (20200423)]/ focal main restricted
# deb-src http://archive.ubuntu.com/ubuntu focal main restricted #Added by software-properties

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

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

## 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/ focal universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal universe
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-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/ focal multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-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/ focal-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ focal-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 focal partner
deb-src http://archive.canonical.com/ubuntu focal partner

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

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

sudoers

  • İlgili kullanıcının hiç bir şifre sorulmaksızın tüm komutları çalıştırabilmesini istiyoruz
sudo sed -i '27i sarikaya ALL=(ALL:ALL) NOPASSWD:ALL' /etc/sudoers

sshd_config

sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
  • Servisi yeniden başlatalım
systemctl restart ssh

Gerekli kurulumlar

  • Komut 1
apt update && apt full-upgrade -y && apt autoclean -y && apt autoremove -y
  • Komut 2
apt install -y net-tools curl mc htop git ntp unzip gnupg2 tree dirmngr openssl openssh-server vim zip unzip ca-certificates software-properties-common perl libnet-ssleay-perl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python wget apt-transport-https python-netaddr python-apt

netdata kurulumu

bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)  --stable-channel --dont-wait

hostname

  • Hostname ayarlaması sağlıyoruz
hostnamectl set-hostname test01.sarikaya.com

locales

dpkg-reconfigure locales

tzdata

dpkg-reconfigure tzdata

bash_completion

source /etc/bash_completion

logind.conf

/etc/systemd/logind.conf
  • Default
#HandleLidSwitch=suspend
  • Change
HandleLidSwitch=ignore
  • restart
systemctl restart systemd-logind

Önyükleme

sudo apt install -y net-tools curl mc htop git ntp unzip gnupg2 tree dirmngr openssl openssh-server vim zip ca-certificates software-properties-common perl libnet-ssleay-perl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python wget apt-transport-https python-netaddr python-apt qemu-guest-agent python3-netaddr python3-apt screen ntpdate locate locales-all cloud-init libpam-systemd snmpd sudo rsync nfs-common tcpdump mysql-client gnupg-agent jq

Python Pip3 Kurulumu

sudo apt update
sudo apt install python3-pip
pip3 --version

Python2 Pip2 kurulumu

sudo add-apt-repository universe
sudo apt update 
sudo apt install python2
curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
sudo python2 get-pip.py
pip2 --version