Archlinux install and configuration [Archlinux 安装和配置]

Archlinux install [安装篇]

Prepare for the installation

  • Prepare the ISO of archlinux, and brasero it into USB flash disk
  • Partiton: use cfdisk, use the UEFI install, the mkfs
/dev/sda1 to UEFI boot: ef00, 1G
/dev/sda2 to 119G
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
  • Select mirrorlist:
nano -w /etc/pacman.d/mirrorlist add 
Server = http://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
Server = http://mirrors.163.com/archlinux/$repo/os/$arch
  • Wireless network link
iwconfig to find the name of your wireless moudule: like wlan0
then:
ip link set wlan0 up
wpa_supplicant -D nl80211,wext -i wlan0 -c <(wpa_passphrase "your_SSID" "your_key")
dhcpcd wlan0
now the wireless should be connected

Basic install

  • Mount the partition
muont /dev/sda2 /mnt
mkdir -p /mnt/boot/EFI
mount /dev/sda1 /mnt/boot/EFI
  • Bbasic system install
pacstrap /mnt base base-devel
  • Generate the fstab
genfstab -p /mnt >> /mnt/etc/fstab
  • Went into the new system and update the system
arch-chroot /mnt
nano /etc/loacle.gen  en.us & en.cn # remove#
locale-gen
nano /etc/locale.gen    # 反注释需要的 locale
locale-gen    # 生成 locale
echo LANG=<locale>  > /etc/locale.conf # 设置默认 locale
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc --utc
  • Add passwd and users
echo yourname > /etc/hostname
nano /etc/hosts
passwd 111111(2 times)
useradd -m -g users -s /bin/bash name
passwd name 111111(2 times)
nano -w /etc/sudos add line name ALL=(ALL) ALL
  • Grub installation
# pacman -S dosfstools grub efibootmgr
# grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=arch_grub --recheck
# grub-mkconfig -o /boot/grub/grub.cfg
  • Install X windows and gnome
pacman -S alsa-utils xorg-server xorg-xinit xorg-server-utils
pacman -S xf86-video-intel xf86-input-synaptics
pacman -S gnome gnome-extra
systemctl enable gdm.service
systemctl enable NetworkManager.service
exit 
umount /mnt/boot/EFI
umount /mnt
reboot

Software install

  • Yaourt installation
sudo nano -w /etc/pacman.conf
remove # before mutilib
add  
[archlinuxfr] 
Server = http://repo.archlinux.fr/$arch
in the last line
then exit
sudo pacman -Syyuu
  • Software installation
sudo pacman -S yaourt emacs gnome-tweak-tool firefox libreoffice clementine vlc smplayer vim gimp shotwell blender impressive r osdlyrics stardict gnome-search-tool dropbox
yaourt wqy-microhei mendeleydesktop  wps acroread acroread-chinese-fonts texstudio
pacman codecs (nedded)
  • Install textlive as the peking BBS

Configuration [配置篇]

Fcitx

sudo pacman -S fcitx fcitx-im fcitx-configtool ibus
sudo cp /usr/bin/ibus-daemon /usr/bin/ibus-daemon.cp
sudo rm -rf /usr/bin/ibus-daemon
sudo gsettings set org.gnome.settings-daemon.plugins.keyboard active false
sudo nano -w .xprofile add
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
yaourt fcitx-googlepinyin fcitx-sogoupinyin

Web to hidden

yaourt lantern
Add new firefox autoproxy server
127.0.0.1 8787
sudo systemctl enable lantern.service

Startdict

sudo pacman -S startdict
cp dict /usr/share/stardict/dic
cp WyabdcRealPeopleTTS /usr/share/WyabdcRealPeopleTTS
cp startdict config /home

Samba

cp /etc/samba/smb.conf.default /etc/samba/smb.conf
sudo systemctl enable/start smbd.service nmbd.service
sudo systemctl start/enable cups
add printer

Bumblebee

sudo pacman -S bumblebee mesa nvidia nvidia-settings xf86-video-intel
sudo gpasswd -a user bumblebee
sudo systemctl enable bumblebeed.service

Firefox

cp config
rm .mozilla/Firefox/9999/.parentlock
(bookmaker add-ons: noscript autopager autoproxy stumbleupon deafaultzoom xnot instantfox flashlock videodownloadhelper greasemonkey allsidebar downloadstatbar zotero firegesture)

Dnsmasq: maybe out of data

sudo gedit /etc/NetworkManager/dispatcher.d/localhost-prepend
add
#!/bin/bash                                       
# Prepend localhost to resolv.conf for dnsmasq

if [[ ! $(grep 127.0.0.1 /etc/resolv.conf) ]]; then
  sed -i '1s|^|nameserver 127.0.0.1\n|' /etc/resolv.conf
fi
sudo chmod +x /etc/NetworkManager/dispatcher.d/localhost-prepend

Questions [问题篇]

GNOME3.6 文件夹默认打开方式关联问题

Edit /usr/share/applications/audacious.desktop 
and remove following line:
MimeType=inode/directory;
sudo nano /usr/share/applications/mimeinfo.cache
sudo gedit /usr/share/applications/mimeinfo.cache

Add module auto

sudo gedit /etc/modules-load.d/virtio-net.conf
#Load 'virtio-net.ko' at boot.
virtio-net

LIWORD start fonts problem

sudo gedit /etc/fonts/conf.d/65-nonlatin.conf
save 
then open LIWORD is ok.

Emacs fcitx

sudo nano -w .bashrc add
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

Creative Commons licensing

TITLE: Archlinux install and configuration [Archlinux 安装和配置]
AUTHOR: lengyueyang
DATE: 2016-02-05 19:26:52 UTC+08:00
UPDATED:
LICENSE: The blog is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, commercial use is not allowed, for any reprint, please indicate address and signature. 88x31.png

Comments

Comments powered by Disqus