ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

arch安装备忘

2019-03-21 21:39:13  阅读:546  来源: 互联网

标签:01 x86 arch pacman gpg 备忘 archlinux 64 安装


============
https://www.archlinux.org/

https://wiki.archlinux.org/
https://wiki.archlinux.org/index.php/Installation_guide
https://wiki.archlinux.org/index.php/Main_page_(简体中文)
============
下载 fuse freetype2 这两个属于 extra 仓的包,这是 grub 的依赖 

https://archlinux.pkgs.org/rolling/archlinux-extra-x86_64/fuse2-2.9.9-1-x86_64.pkg.tar.xz.html
安装Howto
1. 在/etc/pacman.conf上启用额外的存储库:
[extra]
Include = /etc/pacman.d/mirrorlist
2. 安装fuse2 xz包:
# pacman -Sy fuse2

https://archlinux.pkgs.org/rolling/archlinux-extra-x86_64/fuse3-3.4.2-1-x86_64.pkg.tar.xz.html
# pacman -Sy fuse3

https://archlinux.pkgs.org/rolling/archlinux-extra-x86_64/freetype2-demos-2.10.0-1-x86_64.pkg.tar.xz.html
# pacman -Sy freetype2-demos

https://archive.archlinux.org/packages/l/lib32-freetype2/lib32-freetype2-2.8-2-x86_64.pkg.tar.xz


=======

https://www.archlinux.org/download/
当前版本: 2019.03.01
包含的内核: 4.20.13
ISO尺寸: 602.0 MB

PGP签名: https://www.archlinux.org/iso/2019.03.01/archlinux-2019.03.01-x86_64.iso.sig
MD5: 8164667750c46cf297720b21145e1e27
SHA1: e32acb5a7b7cfb2bdba10697cce48ab69e13c186


$ ls
archlinux-2019.03.01-x86_64.iso
archlinux-2019.03.01-x86_64.iso.sig
$
$ md5sum archlinux-2019.03.01-x86_64.iso
8164667750c46cf297720b21145e1e27 archlinux-2019.03.01-x86_64.iso
$ sha1sum archlinux-2019.03.01-x86_64.iso
e32acb5a7b7cfb2bdba10697cce48ab69e13c186 archlinux-2019.03.01-x86_64.iso
$
$ gpg --keyserver pgp.mit.edu --keyserver-options auto-key-retrieve --verify archlinux-2019.03.01-x86_64.iso.sig
gpg: assuming signed data in 'archlinux-2019.03.01-x86_64.iso'
gpg: Signature made Fri 01 Mar 2019 10:57:55 AM EST
gpg: using RSA key 4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC
gpg: requesting key 7F2D434B9741E8AC from hkp server pgp.mit.edu
gpg: key 7F2D434B9741E8AC: 32 signatures not checked due to missing keys
gpg: /home/tom/.gnupg/trustdb.gpg: trustdb created
gpg: key 7F2D434B9741E8AC: public key "Pierre Schmitz <pierre@archlinux.de>" imported
gpg: WARNING: server 'gpg-agent' is older than us (2.2.13 < 2.2.14)
gpg: Note: Outdated servers may lack important security fixes.
gpg: Note: Use the command "gpgconf --kill all" to restart them.
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
gpg: Good signature from "Pierre Schmitz <pierre@archlinux.de>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 4AA4 767B BC9C 4B1D 18AE 28B7 7F2D 434B 9741 E8AC
$
$ gpgconf --kill all
$ gpg --list-keys
/home/tom/.gnupg/pubring.kbx
----------------------------
pub rsa2048 2011-04-10 [SC]
4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC
uid [ unknown] Pierre Schmitz <pierre@archlinux.de>
sub rsa2048 2011-04-10 [E]

$ gpg --keyserver pgp.mit.edu --keyserver-options auto-key-retrieve --verify archlinux-2019.03.01-x86_64.iso.sig
gpg: assuming signed data in 'archlinux-2019.03.01-x86_64.iso'
gpg: Signature made Fri 01 Mar 2019 10:57:55 AM EST
gpg: using RSA key 4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC
gpg: Good signature from "Pierre Schmitz <pierre@archlinux.de>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 4AA4 767B BC9C 4B1D 18AE 28B7 7F2D 434B 9741 E8AC
$
$ gpg --verify archlinux-2019.03.01-x86_64.iso.sig
gpg: assuming signed data in 'archlinux-2019.03.01-x86_64.iso'
gpg: Signature made Fri 01 Mar 2019 10:57:55 AM EST
gpg: using RSA key 4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC
gpg: Good signature from "Pierre Schmitz <pierre@archlinux.de>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 4AA4 767B BC9C 4B1D 18AE 28B7 7F2D 434B 9741 E8AC
$
------------
https://blog.fooleap.org/hard-disk-installation-for-archlinux.html
https://vsxen.github.io/2016/11/08/install-arch-with-win7/
https://hyjk2000.github.io/2014/01/23/arch-linux-install-guide/
http://blog.lucode.net/linux/archlinux-install-tutorial.html

添加启动项目:

title install arch1
loopback loop (hd0,2)/arch20190301/archlinux-2019.03.01-x86_64.iso
linux (loop)/arch20190301/vmlinuz archisolabel=ARCH_201903
initrd (loop)/arch20190301/archiso.img
boot

title install arch2msdos
loopback loop (hd0,msdos2)arch20190301/archlinux-2019.03.01-x86_64.iso
linux (loop)/arch20190301/vmlinuz archisolabel=ARCH_201903
initrd (loop)/arch20190301/archiso.img
boot

title Install Arch3
root (hd0,2)
kernel /arch20190301/vmlinuz archisolabel=ARCH_201903
initrd /arch20190301/archiso.img

启动过程提示找不到,得到一个 Shell,进行下面的操作


#mkdir -p /dev/disk/by-label //
# mkdir/sb3
# mount /dev/sdb3 /sb3
# modprobe loop
# losetup /dev/loop6 /sb3/archlinux-2019.03.01-x86_64.iso
# ln -s /dev/loop6 /dev/disk/by-label/ARCH_201903
# exit

 


一切没有问题将会自动以 root 登录,目前 Arch Linux 的安装方式和 Gentoo 差不多,
都通过 Change Root。

# mkfs.ext4 /dev/sda6
# mount /dev/sda6 /mnt

# mkdir /mnt/home
# mount /dev/sda7 /mnt/home

mkswap /dev/sda9
# swapon /dev/sda9

blkid
/dev/sda3: LABEL="Siso" UUID="af774cb3-2e32-7642-9584-fc92ee6cd406" TYPE="ext4" PARTUUID="e1b09aec-03"
/dev/sda6: LABEL="slinux" UUID="94182d0f-e327-4571-80d2-1e3bdd7d72b6" TYPE="ext4" PARTUUID="e1b09aec-06"
/dev/sda7: LABEL="Shome" UUID="3591c8cd-47f7-4bf6-a417-e62b685f9144" TYPE="ext4" PARTUUID="e1b09aec-07"
/dev/sda9: UUID="13802d9f-8485-4d1f-a08c-583abe64961f" TYPE="swap" PARTUUID="e1b09aec-09"

-----------
若没有网络,那下载而来的 core 仓库在此时就用上了,可以按以下步骤使用本地仓

# mkdir /mnt/repo
# cp -R /path/to/core /mnt/repo
/etc/pacman.conf
[core]
SigLevel = PackageRequired
Server = file:///mnt/repo/core
\# 并把默认的 core, extra, community 注释掉
pacman -Sy

安装系统
通过 pacstrap 安装基本系统
# pacstrap -i /mnt base base-devel
pacstrap -i /mnt base base-devel net-tools (netstat,ifconfig...)

生成 fstab 配置
# genfstab -U -p /mnt >> /mnt/etc/fstab
chroot 到刚安装的新系统
# arch-chroot /mnt
现在已经根目录已经切换到刚安装的系统,所进行的一切操作也即是对新系统的。
arch-chroot /mnt /bin/bash
alias ls='ls --color'

安装 Grub
# pacman —U /path/to/fuse<version>.pkg.tar.xz /path/to/freetype2<version>.pkg.tar.xz
pacman -Sy fuse2

# pacman -S grub-bios
# grub-install --recheck /dev/sda
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
# grub-mkconfig -o /boot/grub/grub.cfg

-------------
配置系统
修改 Locale,定义用户所使用的语言及字符集。
/etc/locale.gen
en_US.UTF-8 UTF-8
zh_CN.GB18030 GB18030
zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8
zh_CN GB2312
# locale-gen
$ cat /etc/locale.conf
LANG="en_US.UTF-8"
# echo LANG=en_US.UTF-8 > /etc/locale.conf
# export LANG=en_US.UTF-8
注意:不要在这里把系统全局设置成中文,因为终端无法显示中文,请单独将桌面环境设置为中文。

终端字体(可选)
编辑 /etc/vconsole.conf:
KEYMAP=us
FONT=Lat2-Terminus16
or
FONT=

配置时区及硬件时间
# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# hwclock --systohc --utc

设置系统时间:
$ date -s "03 23, 2019 12:23:04"
或利用 ntp 自动校时:
$ pacman -S ntp
$ ntpdate time.nist.gov
将系统时间写入硬件时钟:
$ hwclock --systohc --utc
注意:
Linux 的硬件时钟使用 UTC,而 Windows 则使用本地时间。
如果要和 Windows 进行双系统启动,可以将 Windows 设置为使用 UTC 硬件时钟,参见这里。
同时关闭 Windows 上的自动校时功能,只用 Linux 上的 ntp。
https://wiki.archlinux.org/index.php/System_time
https://linux.cn/lfs/LFS-BOOK-7.7-systemd/chapter07/clock.html

设置 hostname
# echo tompc > /etc/hostname
你还得修改/etc/hosts文件的内容
nano /etc/hosts
你会看到如下内容:
127.0.0.1 localhost.localdomain localhost 主机名
::1 localhost.localdomain localhost 主机名
这里面的主机名也需要修改

配置网络
# pacman -S wireless_tools wpa_supplicant wpa_actiond dialog
# wifi-menu wlan0
# systemctl enable net-auto-wireless.service

配置 pacman,启用 multilib 源,此源可在 Arch Linux 64 位系统上运行 32 位的程序
/etc/pacman.conf
[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

修改 root 密码
# passwd
创建用户,并设置密码
# useradd -m -g users -s /bin/bash tom
# passwd tom
安装并配置顺手的 Sudo
# pacman -S sudo
/etc/sudoers
root ALL=(ALL)ALL
tom ALL=(ALL)ALL
至此完成基本的配置,重启继续折腾
先退出 chroot 环境:
exit
然后,卸载分区并重启系统:
umount -R /mnt
/mnt/home
reboot
-------------
1.安装ALSA(声卡)
pacman -S alsa-utils
2.安装显卡驱动
由于我使用的是Intel核显,因此如下是核显驱动的安装,如果你使用的是其他显卡,请参考官方wiki,点击进入。
pacman -S mesa xf86-video-intel
3.安装触摸板驱动
pacman -S xf86-input-synaptics

4. 安装显示服务器
这里可选wayland和xorg-server,gnome对于前者已经支持的比较完善了,当然大家亦可选择全装。
# xorg及其utils
pacman -S xorg-server xorg-xinit
# wayland
pacman -S wayland

 

安装桌面环境
这里以 GNOME 为例:
$ pacman -S gnome
要启用图形界面登录和锁屏等功能,可启用 gdm:
$ systemctl enable gdm.service
安装 GNOME 的一些常用工具(更多工具和扩展请参见这里):
$ pacman -S gnome-tweak-tool gnome-packagekit gnome-settings-daemon-updates
pacman -S file-roller gedit cheese
pacman -S unrar unzip p7zip
安装中文输入法,GNOME 集成了 iBus,所以只需安装合适的输入法引擎,然后在 GNOME 系统设置中启用即可,参见这里:
$ pacman -S ibus-libpinyin

3.安装浏览器
这里我们使用chromium,至于为什么不是firefox,原因有二,其一,我觉得它更快;其二,它能用最近的flash插件。
pacman -S chromium
最新的flash插件需要到AUR上去下,这里提供下载地址,点击下载。
下载完成后,解压,进入相关目录。
makepkg
pacman -U 生成的文件名,以.xz结尾

5.注册相关服务
务必记得安装networkmanager,不然无法开启网络的自动探测。
pacman -S networkmanager
开启网络服务
systemctl enable NetworkManager
如果你安装的是Gnome,你需要开启gdm。
systemctl enable gdm

https://wiki.archlinux.org/index.php/Systemd-boot#Configuration


bash-4.4$ dnf list installed *zip*
Installed Packages
bzip2.x86_64 1.0.6-28.fc29 @anaconda
bzip2-libs.x86_64 1.0.6-28.fc29 @anaconda
gzip.x86_64 1.9-7.fc29 @anaconda
perl-Archive-Zip.noarch 1.64-1.fc29 @fedora
perl-Compress-Bzip2.x86_64 2.26-9.fc29 @fedora
perl-Compress-Raw-Bzip2.x86_64 2.081-5.fc29 @anaconda
unzip.x86_64 6.0-42.fc29 @updates
zip.x86_64 3.0-23.fc29 @anaconda
bash-4.4$
bash-4.4$ dnf list installed *pinyin*
Installed Packages
ibus-libpinyin.x86_64 1.11.0-1.fc29 @updates
libpinyin.x86_64 2.2.2-1.fc29 @updates
libpinyin-data.x86_64 2.2.2-1.fc29 @updates
bash-4.4$

 

 

 


========================
https://wiki.archlinux.org/index.php/GnuPG
https://www.gnupg.org/
https://www.openpgp.org/
https://wiki.archlinux.org/index.php/List_of_applications/Security#Encryption,_signing,_steganography

GnuPG是RFC4880(也称为PGP)定义的OpenPGP标准的完整且免费的实现。GnuPG允许您加密和签署您的数据和通信。
它具有通用的密钥管理系统以及各种公钥目录的访问模块。GnuPG,也称为GPG,是一个命令行工具,具有与其他应用程序轻松集成的功能。
提供丰富的前端应用程序和库。GnuPG的第2版还提供对S / MIME和Secure Shell(ssh)的支持。

Verify a signature
To verify a signature use the --verify flag: 使用--verify验证签名
$ gpg --verify doc.sig
where doc.sig is the signed file containing the signature you wish to verify.

If you are verifying a detached signature, both the signed data file and the signature file must be present when verifying. For example, to verify Arch Linux's latest iso you would do:
如果要验证分离的签名,则验证时必须存在(签名数据文件)和(签名文件)。且位于同一目录下
$ gpg --verify archlinux-version.iso.sig
$ gpg --verify archlinux-2019.03.01-x86_64.iso.sig

You can also specify the signed data file with a second argument:
不在同一目录下,需要指定路径
$ gpg --verify archlinux-version.iso.sig /path/to/archlinux-version.iso


===================
创建密钥对
通过键入终端生成密钥对:

$ gpg --full-gen-key

===========
http://pgp.mit.edu/
MIT PGP公钥服务器

提交密钥 Submitting a key
1. 将公钥的ASCII装甲版本剪切并粘贴到文本框中。
2. 按“提交”。
就这么简单!密钥服务器将立即处理您的请求。
如果您愿意,可以使用提取过程检查您的密钥是否存在。

提取密钥
在“搜索字符串”框中键入要搜索的文本。如果要通过其十六进制KeyID查找密钥,则必须在ID前面加上0x
选中“索引”或“详细索引”复选框。“详细”选项将在键上显示签名。
按“执行搜索!”按钮。
服务器将返回与搜索文本匹配的键列表。该页面将包含每个KeyID和每个括号分隔标识符(即< marc@mit.edu >)的链接。
单击超文本链接将显示公钥的ASCII装甲版本。

提取警告
搜索引擎与pgp程序使用的搜索引擎不同。它将返回包含搜索字符串中所有单词的所有键的信息。
在此上下文中的“单词”是一串连续的字母字符。例如,在字符串marc@mit.edu中,单词是marc, mit和edu。
这意味着您可能不会返回某些键。如果数据库中存在Marc Edu <mit.foo.com>的密钥,则上述查询将返回此密钥。
如果您不想查看所有这些额外匹配,可以选择“仅返回完全匹配”,并且只返回包含指定搜索字符串的键。
在任何情况下, 该算法都不匹配部分单词。因此,如果您习惯只指定长名称的一部分,则此名称将不再有效。
目前,仅为KeyID和在匹配括号之间找到的文本生成超文本链接。(将您的电子邮件地址放在密钥ID字符串中的括号内是一种常见的惯例。)


==================
https://wiki.archlinux.org/index.php/List_of_applications/Security#Encryption,_signing,_steganography
网络安全
另见维基百科:数据包分析器的比较。
https://en.wikipedia.org/wiki/Comparison_of_packet_analyzers
=====================

 

标签:01,x86,arch,pacman,gpg,备忘,archlinux,64,安装
来源: https://www.cnblogs.com/sztom/p/10574788.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有