• 当前位置: 主页 > Linux安装教程 > 环境部署 >

    Archlinux配置_archlinux完全中文设置步骤

    时间:2016-01-21 11:31来源:未知 作者:Linux先生 举报 点击:
    湖南成人高考 成人高考 成人高考 成人高考  成人高考 成人高考 
    安装完archlinux之后,还有许多内容需要进行配置,顺便将配置的过程简单记录一下

    安装完archlinux之后,还有许多内容需要进行配置,顺便将配置的过程简单记录一下

    桌面环境

    • Xorg是最基本显示服务,必须安装。启动 X 可以通过安装软件包 xorg-xinit (可以使用登录管理器替代)。
    • 窗口管理器:完整的桌面环境提供了完全的用户界面,但是通常会占用不少系统资源,希望系统性能最大化的用户可以只安装窗口管理器。
    • 显示管理器:也就是登录管理器,如GDM、KDM等,Gnome3默认已经包含 GDM 了。
    • 桌面环境:包含了 窗口管理器、显示管理器及其他许多软件等,各个桌面环境相 比较 。

    Gnome3

    • 窗口管理器:Mutter
    • 显示管理器:GDM
    • 任务栏:gnome-shell
    • 文件管理器:nautilus

    查看显卡类型,安装驱动,参考 xorg

    gnome3

    ZSH

    $ lspci | egrep '3D|VGA'
    00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
    01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 850M] (rev a2)
    $ pacman -S nvidia
    $ lspci | egrep '3D|VGA'
    00:02.0 VGAcompatiblecontroller: IntelCorporation 4th GenCoreProcessorIntegratedGraphicsController (rev 06)
    01:00.0 3D controller: NVIDIACorporationGM107M [GeForceGTX 850M] (reva2)
    $ pacman -S nvidia
    

    安装桌面环境

    gnome3

    ZSH

    $ pacman -S xorg xorg-server xorg-server-utils 
    $ pacman -S gnome gnome-extra gnome-packagekit gnome-software
    $ pacman -S xorgxorg-serverxorg-server-utils 
    $ pacman -S gnomegnome-extragnome-packagekitgnome-software
    

    字体

    fonts

    Default

    $ pacman -S wqy-microhei
    $ pacman -S wqy-microhei
    

    中文输入法

    Gnome3默认安装了ibus,我们接着安装一个中文输入法

    input

    ZSH

    # 安装 ibus-pinyin,然后通过系统选项进行配置
    $ pacman -S ibus-pinyin
    # 安装 ibus-pinyin,然后通过系统选项进行配置
    $ pacman -S ibus-pinyin
    

    科学上网

    socks5 ,本地服务配置

    config.json

    JavaScript

    /etc/*******/config.json
    {
        "server":"my_server_ip",
        "server_port":8388,
        "local_address": "127.0.0.1",
        "local_port":1080,
        "password":"mypassword",
        "timeout":300,
        "method":"aes-256-cfb",
        "fast_open": false,
        "workers": 1
    }
    /etc/*******/config.json
    {
        "server":"my_server_ip",
        "server_port":8388,
        "local_address": "127.0.0.1",
        "local_port":1080,
        "password":"mypassword",
        "timeout":300,
        "method":"aes-256-cfb",
        "fast_open": false,
        "workers": 1
    }
    

    sslocal

    ZSH

    # 直接从shell运行
    $ sslocal -c /etc/*********/config.json
    # 使用systemctl运行,服务名称为 *********@.service,如果配置文件为config.json,则服务为 *********@config.service
    $ systemctl enable *********@config.service    # 开机启动
    $ systemctl start/stop **********@config.service    # 启动/停止服务
    # 直接从shell运行
    $ sslocal -c /etc/*********/config.json
    # 使用systemctl运行,服务名称为 *********@.service,如果配置文件为config.json,则服务为 *********@config.service
    $ systemctlenable *********@config.service    # 开机启动
    $ systemctlstart/stop **********@config.service    # 启动/停止服务
    

    http/https

    可以使用 privoxy 或者 delegate 将socks5代理转换为http/https代理,但是我尝试了 privoxy 没有成功,可能是配置的问题。使用了 delegate 搞定:

    delegate

    ZSH

    $ delegated -P 10801 SERVER=http SOCKS=127.0.0.1:1080
    $ delegated -P 10802 SERVER=https SOCKS=127.0.0.1:1080
    $ delegated -P 10801 SERVER=httpSOCKS=127.0.0.1:1080
    $ delegated -P 10802 SERVER=httpsSOCKS=127.0.0.1:1080
    

    Chrome && Chromium

    两者的区别:Chromium是开源的,更新比较快,新功能会较早出现;Chrome是基于Chromium的,非开源,一般比Chromium更加稳定。

    如果习惯使用Chromium,可以直接安装:

    chromium

    Default

    $ pacman -S chromium
    $ pacman -S chromium
    

    而如果习惯Chrome,则可以通过AUR安装:

    chrome

    Default

    # 找到google-chrome的aur源: https://aur.archlinux.org/packages/google-chrome/
    # 点击右侧的 Download snapshot 下载,或者直接通过git clone
    $ cd ~/google-chrome
    $ vim PKGBUILD
    # 由于国内网络原因,这里需要科学上网才能下载到google-chrome.deb,但是我们也可以先通过其他方式下载deb到本地,然后通过nginx搭建本地服务器进行安装,修改
    # source_x86_64=("google-chrome-${_channel}_${pkgver}_amd64.deb::http://localhost/google-chrome-${_channel}_current_amd64.deb")
    $ makepkg -sri
    # -s/--syncdeps 表示自动执行pacman安装依赖关系
    # -r/--rmdeps 会在编译后删除不需要的编译时依赖
    # -i/--install 会安装软件包
    # 找到google-chrome的aur源: https://aur.archlinux.org/packages/google-chrome/
    # 点击右侧的 Download snapshot 下载,或者直接通过git clone
    $ cd ~/google-chrome
    $ vimPKGBUILD
    # 由于国内网络原因,这里需要科学上网才能下载到google-chrome.deb,但是我们也可以先通过其他方式下载deb到本地,然后通过nginx搭建本地服务器进行安装,修改
    # source_x86_64=("google-chrome-${_channel}_${pkgver}_amd64.deb::http://localhost/google-chrome-${_channel}_current_amd64.deb")
    $ makepkg -sri
    # -s/--syncdeps 表示自动执行pacman安装依赖关系
    # -r/--rmdeps 会在编译后删除不需要的编译时依赖
    # -i/--install 会安装软件包
    

    OpenSSH

    openssh

    ZSH

    $ pacman -S openssh
    $ ssh-keygen -t rsa -C user@user-pc
    # 配置 ssh config
    $ vim ~/.ssh/config
    $ pacman -S openssh
    $ ssh-keygen -t rsa -C user@user-pc
    # 配置 ssh config
    $ vim ~/.ssh/config
    

    ssh config

    Default

    Host jiehua
        Hostname chenjiehua.me
        User user
        Port 22
    Hostjiehua
        Hostnamechenjiehua.me
        Useruser
        Port 22
    

    VirtualBox

    virtualbox

    Default

    $ pacman -S virtualbox
    $ pacman -S virtualbox
    

    启动后提示错误

    virtualbox

    Default

    Kernel driver not installed (rc=-1908) 
    The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
    'pacman -S virtualbox-modules'
    as root. If you don't use our stock kernel, install virtualbox-host-source andexecute dkms autoinstall
    Kerneldrivernot installed (rc=-1908) 
    TheVirtualBoxLinuxkerneldriver (vboxdrv) is eithernot loadedor thereis a permissionproblemwith /dev/vboxdrv. Pleasereinstallthekernelmodulebyexecuting
    'pacman -S virtualbox-modules'
    as root. If youdon't use ourstockkernel, installvirtualbox-host-sourceandexecutedkmsautoinstall
    

    virtualbox

    Default

    $ pacman -S virtualbox-modules
    $ modprobe vboxdrv
    $ pacman -S virtualbox-modules
    $ modprobevboxdrv
    

    其他

    安装 terminator

    other

    Default

    $ pacman -S terminator
    $ pacman -S terminator
    

    安装 oh-my-zsh,vim-spf13,autojump,fuck


    推荐内容