openSUSE Leap 15.0

˵

openSUSE Leap һĸ˼ʼǱԻĻ Linux ɲ
ϵͳʹƣʣƬ㹫񣬹ƵƷ
֣Ȥ

: ?աGrover ChouDingzhong Chen
ڣ2019-11-2615.0.20191126.2e3aa44c

1 װ
2 ϵͳ
3 
4 Ӳ
5 
6 ȫ
7 
8 Ϣͷ

openSUSE Leap 15.0 άѾΪ˱ϵͳҰȫĿǰ
openSUSE 汾ڿʼ֮ǰȷӦ openSUSE Leap 15.0 ά¡

˽йǰ openSUSE 汾 https://zh.opensuse.org/SDB:ϵ
ͳ

һɵİ汾 openSUSE Leapǰ汾ķ˵https://
zh.opensuse.org/openSUSE:˵

й openSUSE ĿϢοhttps://www.opensuse.org

1 װ

½Ϊڰװ̵ϸָοĵ https://doc.opensuse.org/
documentation/leap/startup/html/book.opensuse.startup/part.basics.html

زĵ 4  ?Ӳ?

1.1 ʹϵͳɫԭӸ

װ֧µϵͳɫ openSUSE Kubic ĳɹϵͳ
ɫװµĸϵͳܣԣԵԶӦø£ҪԺ
ɵػԭЩ¡Щܻ SUSE  openSUSE аһͬİ
ߡζţopenSUSE Leap 15.0 ϵͳɫܹľ RPM 
ҲܹϹ

ע

ע⣺ݵ

Щǵ RPM %post ű޸ /var  /srv ݡЩ
ݵġ㷢ύȱݱ档

ҪṩЩܣ˸ϵͳڣ

  Btrfs գ  ϵͳ¿ʼ֮ǰɸļϵͳһµ Btrfs ա
    ȻԸøµĸĶᱻװ´ Btrfs СҪɸ£
    ϵͳʹøÿա

    Ҫ£ֻҪǰһϵͳɡ

  ֻļϵͳ  Ϊ˱´ݶʧ⣬ļϵͳ벻д
    ˣļϵͳͨʱֻء

    Ҫô˰װùҪļϵͳĸģҪд /etc 
    ãĿ¼ԶΪʹ OverlayFS/var ǶӾԱд
    롣

Ҫ

ҪҪ 12 GB Ĵ̿ռ

ϵͳɫҪ 12 GB Ĵ̴С Btrfs ա

Ҫʹ£ȫҪʼʹ transactional-update  YaST
 Zypper

  ϵͳtransactional-update up

  װtransactional-update pkg in 

  Ƴtransactional-update pkg rm 

  ҪԭĿգһζԸļϵͳĸģȷϵͳ
    յһȻУtransactional-update rollback

    ߣĩβһյ ID Իعָ ID

ʹôϵͳɫʱĬϣϵͳִճ² 3:00  5:00 ֮
ǻ systemd бҪ systemctl ã

tux@linux > sudo systemctl disable --now transactional-update.timer rebootmgr.service

µϢ openSUSE Kubic  https://
kubic.opensuse.org/blog/2018-04-04-transactionalupdates/  https://
kubic.opensuse.org/blog/2018-04-20-transactionalupdates2/.

1.2 Сϵͳװ

СװϵͳȱͨΪȻĳЩܣ

  ǽǰˣаװ firewalld

   YaSTаװ patterns-yast-yast2_basis

1.3 װ 12 GB Ӳ

װֻڴ̿ôС 12 GB ʱὨ밲װС
ӳʹֶָ

1.4 UEFI??ͳһչ̼ӿ

 openSUSE װʹ UEFIͳһչ̼ӿڣļǰر
һӲƼĹ̼£ңеĻ밲װĸ¡Ԥװ
Windows 8 °汾Ǳʹ UEFI һԱ־

Щ UEFI ̼⣬ᵼ UEFI 洢дʱ𻵡
ǲû綨Ϊ??

openSUSE дϵͳСݣӶ÷տ͡С
ζŸ֪ UEFI ̼ openSUSE λáĬϽ Linux ںʹ
 UEFI 洢ͱϢpstoreĹܡȻƼװӲ
Ƽκι̼¡

1.5 UEFIGPT  MS-DOS 

 EFI/UEFI 淶һµķGPTGUID ·ʹ
ȫΨһʶ128 λֵʾ 32 ʮ֣ʶ豸ͷ͡

⣬UEFI 淶Ҳͳ MBRMS-DOSLinux ELILO  GRUB2
᳢ΪЩͳʽķԶһ GUIDд뵽̼С
GUID Ƶ仯д̼дͬɣƳʹǰһ


ʽ̼ռѼɾͷڴԤĹ̼
ͷЩʱͻᵼ⡣ʹϵͳ޷

ܷܼ򵥣ͳ MBR תµ GPT ⡣

1.6 ڴи DPI ʾĵŰװ UI

YaST װĬϲΪ DPI ʾ UIӵһ DPI ʾĵ
ԣ YaST ΪʾԶ UIҪ
QT_AUTO_SCREEN_SCALE_FACTOR=1 С

2 ϵͳ

½гϵͳصע͡ϸָοĵ https://
doc.opensuse.org/documentation/leap/startup/html/book.opensuse.startup/
cha.update.osuse.html

زĵ 4  ?Ӳ?

˽Ϣ 3  ??

2.1  openSUSE Leap 42.3 

2.1.1 ϵͳڼ

openSUSE Leap 15.0  RPM Ϣ˸ӵ openSUSE Leap 汾ַ
ˣЩ openSUSE Leap 42.3 صΰ汾ͬʾΪ
ʵϰĶֻͬǶԲͬϵͳıѡ

2.1.2 cryptconfig Ƴ

֮ǰ汾 openSUSE Leap ֧ͨ cryptconfig Ŀ¼еܡ˹ܺ 
cryptconfig openSUSE Leap 15.0 Ѳ֧֡

Ҫ openSUSE Leap 15.0 ϼûݣܰĿ¼Ӿ

ʾ

ʾǰȽ

ǽִд openSUSE Leap 42.3 ǰĿ¼homeļܡ
openSUSE Leap 15.0 £ȻʹеļĿ¼ײ㼼pam_mount Կ
ܲм򵥵;

ͬʱ openSUSE Leap 15.0 ӵûҲûзĿ¼

2.1.3 Postfix Admin ʹ󲻼ݵĿ¼

Ӱ汾 3.2 ʼ openSUSE Leap 15.0 е Postfix Admin 
postfixadminʹһµ󲻼ݵĿ¼֣

  ļƶ /etc/postfixadmin

  PHP ƶ /usr/share/postfixadmin

  Smarty ƶ /var/cache/postfixadmin

Postfix Admin ٴǰλöȡļòԶǨơˣҪ
ֶǨĿ

   /srv/www/htdocs/postfixadmin н config.local.php ƶ /etc/
    postfixadmin

  б༭ config.inc.php״̬뽫ЩԶúϲ /etc/
    postfixadmin/config.local.phpǽ鱣 config.inc.php δ޸ġ

   Apache Уӻñ /postfixadmin

      ҪʹñУ

        tux@linux > sudo a2enflag POSTFIXADMIN && rcapache2 restart

      ҪʹضϿã뽫ñӵС

2.1.4 ܹĴӳʱʧ

ʹðװʵʱ԰ܹݷ /homeѡ֮
ǰװϵͳʹ YaST װ

 /etc/fstab ļݷ豸ӳ䣬 /dev/mapper/
cr_homeڰװУYaST ޷·Զ⵽ľ

Ҫɹʹܣʼ֮ǰ /etc/fstab ʹ豸 UUID 
豸ơҪȷ豸 UUIDʹ

tux@linux > blkid | grep "豸ӳ"

ַ UUID= һ UUID

2.1.5 GPG µԿݿʽ

openSUSE Leap 42.3  GPG 2.0 openSUSE Leap 15.0  GPG 2.2Щ
GPG 汾УµԿݿʽGPG 2.2 ԶԿµĸʽ
ǣԿھɰ汾 GPG ޷ʹá

ҪľɰԿݿɿã openSUSE Leap 15.0 ֮ǰ
Ŀ¼ ~/.gnupg

2.1.6 ntpd ѱ Chrony 滻

ʱͬػ ntpd ѱִػ Chrony 滻

˸ıʾ ntp_client  AutoYaST ļҪΪ˲ָ³¸ʽ AutoYaST
ntp_client ʽĸϢ鿴 https://doc.opensuse.org/projects/autoyast/#
Configuration.Network.Ntp

Ϊ˼ͬʱ䣬YaST  cron ļ openSUSE Leap 15.0 ڴ
ļ yast2-ntp-client ӵУ֮ǰκļ
 novell.ntp-synchronization Ϊ suse-ntp_synchronization Ը cron
ļһ¡ openSUSE Leap ǰ汾ԶִУҵ˴о
ֵļָ ntpd ý滻 chrony á

3 

3.1 õ

õṩΪаһ֣ƻ¸ openSUSE Leap 汾Ƴ
ЩΪ˷Ǩƣʹǿܲյ¡

ȷϰװǷάȰװ lifecycle-data-openSUSE 
ִ

tux@linux > zypper lifecycle

3.2 Ƴ

Ƴ淢аһ𷢲

  cryptconfigѲάʹ÷ܴ档Ϣ鿴 2.1.2  ?
    cryptconfig Ƴ?

  SuSEfirewall2滻Ϊ firewalldǨ firewalld Ϣ鿴
    https://en.opensuse.org/Firewalld  https://doc.opensuse.org/documentation
    /leap/security/html/book.security/cha.security.firewall.html#
    sec.security.firewall.firewalld

  php7-imap: ṩѡ IMAP PHP չΪ UW IMAP οʵֲάˡ

4 Ӳ

4.1  Nvidia GPU ͻԿĹ

 openSUSE Leap 15.0 GM صںˣNvidia Կ Nouveau ܻ
ػʱԴڼҪʹûԿϵͳ
 Intel Կ Nvidia ԿıʼǱԡ

ȱݽں˵ά޸Ϊװӳ񲻻յ£ڰװ
װ״ʱܷ£иʱĽ
nouveau.modeset=0 ѡڰװ˰޸ں˺ͿƳѡˡ

4.2 ר Nvidia ֧ Wayland  KDE

KDE Plasma Wayland Ự֧רе Nvidia ʹ KDE ר
Nvidia ͣ X Ự

5 

½г openSUSE Leap 15.0 ϵ͸ġ

5.1 ûĬϵ Compose ϼ

֮ǰ openSUSE 汾УCompose ϼ׼޷ṩַġ
Ϊ ???Ҫ²ͷ Shift? Ctrl ٰ a Ρ

 openSUSE Leap 15.0 У Shift? Ctrl ޷˲Ĭ趨
Compose 

  Ҫһϵͳȫֵ Compose ϣ޸ļ /etc/X11/Xmodmap еУ

    [...]
    !! Third example: Change right Control key to Compose key.
    !! To do Compose Character, press this key and afterwards two
    !! characters (e.g. `a' and `^' to get 342).
    !remove  Control  = Control_R
    !keysym Control_R = Multi_key
    !add     Control  = Control_R
    [...]

    Ҫȡעʾ룬Ƴ׵ ! ַע⣬ʹ setxkbmap 
    ĻXmodmap ļеýᱻǡ

  趨û Compose ϣʹ滷ṩļ趨߻ʹ
    setxkbmapйߣ

    tux@linux > setxkbmap [...] -option compose:COMPOSE_KEY

    е COMPOSE_滻ϲļ ralt Alt lwin
    Windows rwin Windows menu˵rctl Ctrl 
    capsд

  ⣬ʹ IBus 뷨ҲַҪʹ Compose 

5.2 Use update-alternatives to Set Display Manager and Desktop Session

In the past, you could use /etc/sysconfig or the YaST module /etc/sysconfig
Editor to define the display manager (also called the login manager) and
desktop session. Starting with openSUSE Leap 15.0, the values are not defined
using /etc/sysconfig anymore but with the alternatives system.

ʹ´ƷĬϣ

  Display manager: default-displaymanager

  Wayland Ựdefault-waylandsession.desktop

  X Ựdefault-xsession.desktop

磬Ҫ default-displaymanager ֵʹã

tux@linux > sudo update-alternatives --display default-displaymanager

Ҫл default-displaymanager  xdmʹã

tux@linux > sudo update-alternatives --set default-displaymanager \
  /usr/lib/X11/displaymanagers/xdm

Ϊ alternatives ͼι棬ʹ YaST ģ Alternatives԰
װ yast2-alternatives

5.3 ʹ GNOME Shell ʹ GDM ʱĻ

 GNOME Shell  GDM ĵ¼ SDDM  LightDM ͬʹʱĻ
ջ֮⣬Ҳ޷ڲ˳¼лû

Ҫ GNOME Shell ʹĻĵ¼ GDM

 1. ȷ gdm Ѱװ

 2. 趨 GDM Ϊʾ

    tux@linux > sudo update-alternatives --set default-displaymanager \
      /usr/lib/X11/displaymanagers/gdm

 3. ϵͳ

5.4 ڴи DPI ʾĵ SDDM UI

KDE Ĭϵ¼SDDMĬϲΪ DPI ʾ UIӵи
DPI ʾĵԣʹļ /etc/sddm.conf  SDDM ΪʾԶ
 UI

[X11]
EnableHiDPI=true
ServerArguments=-nolisten tcp -dpi DPI_ֵ

 DPI_ֵ滻Ϊһʵ DPI ֵ 192ҪõŽʹĬ
DPI 96 ı

5.5 ڴи DPI ʾĵ YaST UI

YaST ĬϲΪ DPI ʾ UIӵи DPI ʾļ
 YaST ΪʾԶ UIҪôû
QT_AUTO_SCREEN_SCALE_FACTOR=1

5.6 ڻϸ/ DPI µ Qt ӦóʹԶ

Qt ֧ X Զÿֱšʹ X Ļ DPI ֵ
СֵĬΪ 96 DPIʹ DPI ȫ
 DPI

㷺ʹõḲǵ Qt Ϊ˸˵ǲã

  GNOME 趨 Xft.dpi Ϊ 96 DPI ñ

  KDE Plasma  Qt ԶŲʹֶá

ϣ Qt ΪЧʾΪ DPI>=
 144 DPIŵ Qt Ӧó壬 VLCмʵֻ
ŵԤСһ롣ûŵӦó YaSTĬãм
ʹͬ DPIˣڸ DPI ϿС

⣬ʹʱĽ

  ʹó DPI ļΪŵӦóڸ DPI 
    ȷš

  趨ʵ DPIXft.dpiùɡҲÿ
    ¼

    tux@linux > echo Xft.dpi:DPI_ֵ | xrdb -nocpp -merge

     DPI_ֵ滻Ϊʵ DPI ֵ

5.7  Wayland  Firefox  Chromium ޷Ļ

Firefox  Chromium ͨ Web ĹߣƵӦó򣩹Ļ
Ӧó򴰿ڡ Wayland £ִ֧˹ܡ

Ϊܹ Firefox  Chromium йĻ X

5.8  MP3 ýļ

ڲ MP3 ýļĽɱ׼ֿṩ

ʹ gstreamer ܵĳ Rhythmbox  Totemʹøý밲װ
gstreamer-plugins-ugly 

5.9 LibreOffice ֧ Type-1 

LibreOffice 5.3 °汾ֹ֧ʱ Type-1 壨׺Ϊ .afm Լ .pfb
ļھ󲿷ûһκӰ졣ΪѾ
TrueType.ttfԼ OpenType.otfʽ

˱Ӱ쵽ûͨ Type-1 תֵ֧ĸʽ TrueType
ʹת塣ʹ FontForgefontforge תϣ
ͨűתԲο https://fontforge.github.io/en-US/documentation/
scripting/

5.10 FreeType Ⱦ

FreeType 2.6.4 һµĬ΢汾 38ϵͳӽ
ĳЩϵͳ?ģ?Ҫָǰ FreeType Ϊѡ
μϵͳΧûضض»

FREETYPE_PROPERTIES="truetype:interpreter-version=35"

5.11  KDE Plasma 

Firefox  Chromium/Chrome  Plasma ʹ KDE ϵͳ߼ضý
أͨ KDE Plasma ṩԱǩĿٷʡ

ɹɣҪЭͬ

  沿ֿ԰װ plasma-browser-integration

  ̵ֿаװ

      Firefoxhttps://addons.mozilla.org/firefox/addon/plasma-integration/

      Chromium/Chromehttps://chrome.google.com/webstore/detail/
        plasma-integration/cimiefiiaegbelhefglklhhakcgmhkai

ע⣬˹дڿ׶ΣopenSUSE Leap 15.0 ڰ汾

5.12  Emacs psgml ģ

Ϊ Emacs ĬϰװģͻopenSUSE Leap 15.0 ޷Զ psgml
ģ顣˽飬 psgml е README ļ

6 ȫ

г openSUSE Leap 15.0 аȫԵı

6.1 GPG ֧ GPG V3 Կ Zypper rpm ־

openSUSE Leap 42.3  GPG 2.0 openSUSE Leap 15.0  GPG 2.2Щ
GPG 汾֮䣬Ƴ˶ GPG V3 Կ֧֡ϵͳԿݿ԰ GPG V3
Կִܻ Zypper  rpm ʱյڴϢľ棬ΪЩ
ڼݿԡЩʽΪwarning: Unsupported version of
key: V3

ͨЩΪԵģΪЩԿϵͳϲõĴ洢ߴ洢
ԿЩԿȻ洢⼤ţǾͱ뱻
滻

  openSUSE Leap 15.0 ޷ʹ֤ԡ

  ԿǲȫġǾܾɰ߽ʹ֤
    ԣ˼ĽҲΡ

ҪɾԿִµģ

 1. һ rpm Ըϸģʽ

    tux@linux > rpm -vv -qf /etc
    ufdio: 1 reads, 18883 total bytes in 0.000006 secs
    [...]
    D: read h# 168 Header sanity check: OK
    warning: Unsupported version of key: V3
    [...]

    ʾУײ 168 һڵԿ??⵽ضײʱ潫Ϣֱ
    ʾ

 2. ײԿ룺

    tux@linux > rpm -q --querybynumber ײ

    滻 HEADER ΪҪײ롣ʾУӦΪ 168

     gpg-pubkey- ͷԿʶ

 3. ʹԿʶKEY_ID˽ԿĸϢ

    tux@linux > rpm -qi Կ_ID

 4. ϵͳƳԿ

    tux@linux > sudo rpm -e Կ_ID

 5. ʹп棬ظ̡

6.2 systemctl stop apparmor 

ȥ AppArmor ʱsystemctl зǳƵ reload  restart
ܾ˻

  systemctl reload apparmor ȷ¼ AppArmor ļ
    һֱƼ¼ AppArmor ļķʽ

  systemctl restart apparmor ζ AppArmor ֹͣȻҲͻж
    AppArmor ļȻ¿ʼҲζеǰڵĽ̶ʧȥơ
    ֻĽ̻ٴޡ

źǣsystemd ûĵԪļʽṩԽ restart Ӧó
⡣

 AppArmor 2.12 ʼ systemctl stop apparmor ٹ
systemctl restart apparmor ȷ¼ AppArmor ļ

Ҫж AppArmor ļʹ aa-teardownָ֮ǰ
systemctl stop apparmor Чһ¡

ҪȡϢ https://bugzilla.opensuse.org/show_bug.cgi?id=996520 
https://bugzilla.opensuse.org/show_bug.cgi?id=853019

7 

7.1 µ Btrfs Ӿ

openSUSE Leap 15.0 µĬ Btrfs Ӿ֣ĿΪˣ

  򻯿պͻع

  ֹݶʧ

  洢 /var ݿ VM ӳĸ

openSUSE Leap 15.0 ȫ /var װӾǶ /var ĲͬĿ¼ʹ
 Btrfs ӾӾдʱƵĹܡ

ûȷķµ Btrfs Ӿ֡ˣĺô
ȫ°װ openSUSE Leap 15.0 

Ҫ˽Ĭ Btrfs Ӿִ˴θǰϢ https://
en.opensuse.org/SDB:BTRFS

7.2 Wicked̫ʹ RFC 4361 DHCPv4 client-id

RFC 4361  RFC 2132 ½ 9.14  client-id Լ DHCP 6 client-id
duid Infiniband (RFC 4390) ϱʹ RFC 4361 DHCP 4  DHCP 6 
ִ̫ͬ DNS ¼µĲҲҪ

 openSUSE Leap 15.0 У

  ISC DHCP 4.3.x ֧µ RFC 4361Ҫ DNS £

  Wicked ṩ˸ѡڷ client-id Զ DHCPv4 ʹû DHCPv6 
    client-idʹ Infiniband

Ҫڰװڼ䷢͸ client-idʹ linuxrc https://en.opensuse.org/
SDB:Linuxrc ifcfg

ifcfg=eth0=dhcp,DHCLIENT_CLIENT_ID=01:03:52:54:00:02:c2:67,DHCLIENT6_CLIENT_ID=00:03:52:54:00:02:c2:67

Ϣ man 5 wicked-configwicked duid --help  wicked iaid --help 
鿴 dhcp4 "create-cid"dhcp6 "default-duid" ѡĵ

̫ϴͳʹõ RFC 2132 DHCPv4 client-id Ӳͣ01 ̫
ȻӲַMAC ַʾ

01:52:54:00:02:c2:67

 0xffӲͣͷ RFC 4361 client-id  DHCPv6 IAID
ϵĽӿڵַ ID,  DHCPv6 DUIDʶ client-id

ʹӲͺͻӲַ DUIDĬʹ LLT ͣµ RFC 4361
DHCPv4 client-id Ϊ

  ʹ MAC ַһֽΪ IAID
    ff:00:02:c2:67:00:01:xx:xx:xx:xx:52:54:00:02:c2:67

   IAID Ǹ򵥵ĵ֣
    ff:00:00:00:01:00:01:xx:xx:xx:xx:52:54:00:02:c2:67

DUID-LLT  xx:xx:xx:xx ǴʱDUID-LL00:03:00:01:MACʱ


8 Ϣͷ

  Ķװϵ README ĵ

   RPM лȡĳضϸ޶ʷϢ

    tux@linux > rpm --changelog -qp ļ.rpm

    ļ滻Ϊ RPM ơ

  鿴ʶĿ¼е ChangeLog ļðʱеȫʷ

  ڽϵ docu ļлȡϢ

  Ϣµĵ https://doc.opensuse.org/

  ȡ openSUSE ²Ʒţ https://www.opensuse.org

Ȩ ? SUSE LLC

? 2017 SUSE

