Archlinux Installation in Oracle Cloud

인스턴스 생성 / 이미지 및 구성 / 이미지 소스에서 Archlinux image 선택 후 이미지 선택

SSH 키 추가하고

사용자정의 부트 볼륨 크기 지정

고급옵션표시 / Cloud-init 스크립트 붙여넣기 아래 내용 입력
Oracle Cloud 에이전트에서 플러그인 선택해제후 생성

system_info: 
  default_user: 
    name: arch 
    lock_passwd: True 
    gecos: arch Cloud User 
    groups: [wheel, adm] 
    sudo: ["ALL=(ALL) NOPASSWD:ALL"] 
    shell: /bin/bash 
#cloud-config 
users: 
- name: arch 
  ssh_authorized_keys:
    ssh-rsa AAAAB3N……

생성되었으면
1분정도 뒤 ssh로 접속

[arch@instance-20230128-1123 pacman.d]$ sudo -i
[root@instance-20230128-1123 ~]# echo "Server = http://mirror.premi.st/archlinux/$repo/os/$arch" > mirrorlist
[root@instance-20230128-1123 ~]pacman -Sy archlinux-keyring
[root@instance-20230128-1123 ~]pacman-key --refresh-keys
[root@instance-20230128-1123 ~]pacman -Syu && yes | paman -Scc
[root@instance-20230128-1123 ~]pacman -S vi

systemd/Timers

archlinux를 기본설치하면 cron이 설치되지 않는다.

cronie 를 설치할까하다, systemd/Timers 를 이용하여 매일 package를 업데이트하도록 설정한다.

[arch@seobi.gq system]$ cd /etc/systemd/system
[arch@seobi.gq system]$ cat pacsyu.service
[Unit]
Description=package upgrade

[Service]
ExecStart=pacman -Syu --noconfirm && yes|pacman -Scc

[arch@seobi.gq system]$ cat pacsyu.timer
[Unit]
Description=package upgrade timer

[Timer]
OnBootSec=1min
OnCalendar=*-*-* 4:0:0

[Install]
WantedBy=multi-user.target

[arch@seobi.gq system]$ sudo systemctl enable pacsyu.timer
[arch@seobi.gq system]$ sudo systemctl start pacsyu.timer
[arch@seobi.gq system]$ systemctl list-timers
NEXT                        LEFT     LAST                        PASSED   UNIT                     >
Fri 2022-06-24 18:12:18 KST 8h left  Thu 2022-06-23 18:12:18 KST 15h ago  systemd-tmpfiles-clean.ti>
Sat 2022-06-25 00:00:00 KST 14h left Fri 2022-06-24 00:00:38 KST 9h ago   shadow.timer             >
Sat 2022-06-25 04:00:00 KST 18h left Fri 2022-06-24 09:46:33 KST 7min ago pacsyu.timer             >

3 timers listed.
Pass --all to see loaded but inactive timers, too.

참고 : https://wiki.archlinux.org/title/Systemd/Timers

Desktop Specification

[joseph@archlinux sway]$ head /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 16
model : 4
model name : AMD Phenom(tm) II X3 710 Processor
stepping : 2
microcode : 0x10000db
cpu MHz : 800.000
cache size : 512 KB
physical id : 0
[joseph@archlinux sway]$ grep bogo /proc/cpuinfo
bogomips : 5225.50
bogomips : 5225.50
bogomips : 5225.50
[joseph@archlinux sway]$ free -h
total used free shared buff/cache available
Mem: 3.8Gi 420Mi 2.5Gi 92Mi 945Mi 3.1Gi
Swap: 2.0Gi 0B 2.0Gi
[joseph@archlinux sway]$ sudo fdisk -l | grep ^Disk
Disk /dev/sda: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: OCZ-VERTEX3 MI
Disklabel type: dos
Disk identifier: 0x21c61497
Disk /dev/sdb: 232.89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: SAMSUNG HD250HJ
Disklabel type: dos
Disk identifier: 0x334e334d
[joseph@myarch sway]$ head /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Pentium(R) CPU G860 @ 3.00GHz
stepping : 7
microcode : 0x25
cpu MHz : 1864.704
cache size : 3072 KB
physical id : 0
[joseph@myarch sway]$ grep bogo /proc/cpuinfo
bogomips : 5988.68
bogomips : 5988.68
[joseph@myarch sway]$ free -h
total used free shared buff/cache available
Mem: 1.8Gi 446Mi 440Mi 91Mi 908Mi 1.0Gi
Swap: 2.0Gi 0B 2.0Gi
[joseph@myarch sway]$ sudo fdisk -l | grep ^Disk
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WD5000BEVT-2
Disklabel type: dos
Disk identifier: 0xf5ff8098
[joseph@archlinux ~]$ head /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz
stepping	: 7
microcode	: 0x23
cpu MHz		: 3100.000
cache size	: 3072 KB
physical id	: 0
[joseph@archlinux ~]$ grep bogo /proc/cpuinfo
bogomips : 6188.38
bogomips : 6188.38
bogomips : 6188.38
bogomips : 6188.38
[joseph@archlinux ~]$ free -h
total used free shared buff/cache available
Mem: 3.8Gi 429Mi 2.3Gi 63Mi 1.0Gi 3.1Gi
Swap: 2.0Gi 0B 2.0Gi