zoukankan      html  css  js  c++  java
  • Manjaro美化 配置教程

    Manjaro Linux的美化

    切换源

    sudo vi /etc/pacman.conf
    

    加入arch源

    [archlinuxcn]
    SigLevel = Optional TrustedOnly
    Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch 
    

    blackarch源(可以选择加入)

    [blackarch]
    SigLevel = Optional TrustAll
    Server = https://mirrors.ustc.edu.cn/blackarch/$repo/os/$arch
    

    面对高校的源

    [arch4edu]
    SigLevel = Never
    Server = http://mirrors.tuna.tsinghua.edu.cn/arch4edu/$arch
    

    ck源

    [repo-ck]                         
    Server = http://repo-ck.com/$arch
    

    设置国内源 选择前三个 快的

    sudo pacman-mirrors -i -c China -m rank
    

    全局更新

    sudo pacman -Syyu
    

    数据库被锁,删除/var/lib/pacman/db.lck

    rm /var/lib/pacman/db.lck
    

    导入key

    sudo pacman -Sy archlinuxcn-keyring
    
    

    导入失败

    sudo pacman -Syu haveged
    sudo systemctl start haveged
    sudo systemctl enable haveged
    sudo rm -rf /etc/pacman.d/gnupg
    pacman-key --init
    pacman-key --populate archlinux
    pacman-key --populate archlinuxcn
    
    

    挂载硬盘

    sudo mount -t ntfs-3g /dev/sda1 /mnt
    
    
    sudo fdisk -l
    #查看UUID
    sudo blkid
    sudo vim /etc/fstab
    UUID=DA18EBFA09C1B27D /mnt/Windows ntfs-3g rw,umask=0000,defaults 0 0
    
    
    

    常用命令

    安装 pacman -S package_name  |yay -S  package_name 
    删除 pacman -R package_name  
    查询net  pacman -Q |grep net
    
    
    

    解决Windows和Linux双系统时间不一致问题

    sudo timedatectl set-local-rtc 1

    搜狗拼音

    sudo pacman -S fcitx-im
    sudo pacman -S fcitx-configtool
    sudo pacman -S fcitx-sogoupinyin
    
    

    添加配置文件

    sudo vi ~/.xprofile
    
    

    内容

    export GTK_IM_MODULE=fcitx
    export QT_IM_MODULE=fcitx
    export XMODIFIERS=@im=fcitx
    
    
    fcitx-configtool
    #对于jetbrians系列fcitx无法跟随的情况 fcitx输入法配置>附加组件>勾选高级>xim前端>勾选on the spot
    
    
    

    安装工具

    sudo pacman -S yaourt yay
    
    
    

    SSR

    yay -S electron-ssr
    http://127.0.0.1:12333
    socks5://127.0.0.1:1080
    
    

    谷歌代理

    google-chrome-stable --proxy-server=socks5://127.0.0.1:1080
    
    
    

    终端代理

    yay -S proxychains-ng
    vim /etc/proxychains.conf
    //最后加入
    socket5 127.0.0.1 1080
    alias gfw='proxychains4'
    gfw curl ip.gs
    
    
    
    

    ZSH

    sudo pacman -S zsh
    sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    chsh -s /bin/zsh 
    
    
    

    可选插件安装

    高亮插件

    高亮zsh-syntax-highlighting 高亮你的zsh可用命令插件

    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
    
    
    

    激活插件

    sudo vi ~/.zshrc 
    
    
    

    加入插件

    plugins=(git zsh-syntax-highlighting)
    
    
    

    让他生效

    source ~/.zshrc 
    
    
    

    zsh-autosuggestions

    git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    
    
    

    加入插件

       plugins=(git zsh-syntax-highlighting zsh-autosuggestions) 
    
    
    

    生效 source ~/.zshrc

    zsh补全插件

    点击下载

    创建目录

    mkdir ~/.oh-my-zsh/custom/plugins/incr
    
    
    

    把下载的文件移动进去

    sudo vi ~/.zshrc 
    
    
    

    添加

    plugins=(git zsh-syntax-highlighting incr)
    
    
    

    在~/.zshrc文件末尾加上

    source ~/.oh-my-zsh/plugins/incr/incr*.zsh
    
    
    

    更新.zshrc文件:

    source ~/.zshrc
    
    
    

    spaceship主题

    git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
    ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
    
    
    

    打开 ~/.zshrc 设置主题

    ZSH_THEME="spaceship"
    
    
    

    中文字体

    文泉驿家族:

    sudo pacman -S --noconfirm wqy-microhei &&fc-cache -fv
    sudo pacman -S wqy-microhei-lite
    sudo pacman -S wqy-bitmapfont
    sudo pacman -S wqy-zenhei
    
    
    

    YaHei-Consolas字体

    cd /tmp&&git clone https://github.com/GitHubNull/YaHei-Consolas-Hybrid-1.12.git --depth 1&&sudo sh YaHei-Consolas-Hybrid-1.12/setup.sh
    
    
    

    选用:

    yaourt -S ttf-meslo
    sudo pacman -S adobe-source-han-sans-cn-fonts
    sudo pacman -S adobe-source-han-serif-cn-fonts
    sudo pacman -S noto-fonts-cjk
    
    
    

    软件安装

    谷歌 vim git vs vlc neofetch 网易云 foxitreader 火狐汉化 uget

     yay -S google-chrome vim  git visual-studio-code-bin  vlc  neofetch netease-cloud-music foxitreader  firefox-i18n-zh-cn   uget
    
    
    

    bat cat的克隆

    xmind zen

    pdf-footer-zh-CN.svg
    png-watermark-zh-CN.svg
    print-watermark-zh-CN.svg
    
    

    ncdu 可视化分析目录占用

    redshift 色温调节

    virtualbox 虚拟机 安装对应内核

    qalculate 计算器

    wiznote 为知笔记

    Albert 软件启动器

    wps wps字体 wps-office ttf-wps-fonts

    file-roller unrar unzip p7zip 压缩解压缩

    motrix

    aria2

    需要安装以下工具即可正常使用ifconfig

    sudo pacman -S net-tools dnsutils inetutils iproute2
    
    

    spacevim

    curl -sLf https://spacevim.org/cn/install.sh | bash
    
    

    cool-retro-term 一个怀旧的终端

    开发软件

    java: as idea tomcat maven gradle

    nodejs

    flutter

    git clone -b stable https://github.com/flutter/flutter.git
    
    
    
    vim ~/.zsh
    
    
    

    加上

    export PATH=~/Downloads/flutter/bin:$PATH
    //path为你安装flutter的目录
    source ~/.zshrc
    
    
    

    切换分支

    查看分支
    flutter channel
    切换master
    flutter channel master
    
    
    

    anaconda

    sudo vim ~/.zshrc
    export PATH=/opt/anaconda/bin:$PATH
    
    
    

    git 设置

    git config --global user.name "your_name"
    git config --global user.email "your_email"
    git config --global http.proxy 'socks5://127.0.0.1:1080' 
    
    
    

    ~/.gitconfig

    [http]
    	proxy = socks5://127.0.0.1:1080
    
    
    

    vscode调试html

    {
        "version": "0.2.0",
        "configurations": [{
            "type": "chrome",
            "request": "launch",
            "name": "chrome linux",
            "webRoot": "${workspaceFolder}",
            "runtimeExecutable": "/usr/bin/google-chrome-stable",
            "runtimeArgs": [
                "--remote-debugging-port=9222",
                "--no-first-run",
                "--no-default-browser-check",
                "--user-data-dir=/tmp/vscode-chrome-debug-rix",
                "${file}"
            ]
        }]
    }
    
    
    

    lnmp

    nginx

    sudo pacman -S nginx 
    systemctl来查看其状态
    systemctl status nginx
    sudo systemctl start nginx
    设置Nginx开机自启动。
    sudo systemctl enable nginx
    版本
    nginx -v
    在浏览器地址栏输入127.0.0.1
    
    
    

    mariaDB

    sudo pacman -S mariadb
    在启动MariaDB服务之前,需要用下面的mysql_install_db命令初始化MariaDB的数据目录,
    sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
    启用
    sudo systemctl start mysqld
    systemctl status mysqld
    运行安全脚本
    sudo mysql_secure_installation
    版本
    mysql --version
    
    
    

    PHP7

    sudo pacman -S php-fpm
    安装后,我们要让Nginx使用php-fpm来运行php。编辑/etc/nginx/nginx.conf文件。
    
    sudo nano /etc/nginx/nginx.conf
    找到location ~ .php$这部分的配置,将这部分配置修改成如下。
    
    location ~ .php$ {
                root           /usr/share/nginx/html;
                fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include        fastcgi_params;
            }
    保存文件。然后启动php-fpm,并设置开机自启动。
    
    sudo systemctl start php-fpm
    sudo systemctl enable php-fpm
    测试PHP
    在网站根目录创建一个test.php文件。默认的网站根目录是/usr/share/nginx/html。
    
    sudo nano /usr/share/nginx/html/test.php
    在文件中添加如下PHP代码。
    
    <?php
      phpinfo();
    ?>
    保存文件。重新加载Nginx。
    
    sudo systemctl reload nginx
    然后在浏览器地址栏输入http://server-ip/test.php。将server-ip替换成Arch Linux的IP 。你应该可以看见服务器的PHP信息。
    
    test.php文件只是用来测试PHP的,为了不让他人看见服务器的信息,测试之后要将它删除。
    
    sudo rm /usr/share/nginx/html/test.php
    启用PHP扩展
    编辑 /etc/php/php.ini配置文件。
    
    sudo nano /etc/php/php.iniwps-office   ttf-wps-fonts
    找到如下两行文字,去掉前面的#符号以启用mysqli和pdo_mysql。
    
    ;extension=mysqli.so
    ;extension=pdo_mysql.so
    mysqli.do用来建立数据库连接。pdo_mysql.so是drupal内容管理系统所必要的PHP扩展。如果需要在WordPress, Drupal内容管理系统中剪裁、旋转图片,那么需要启用imagemagick这个扩展。
    好了!我们成功地在Arch Linux服务器安装了LNMP (Nginx, MariaDB, PHP7)
    
    
    

    总结

    sudo pacman -S nginx php php-fpm php-gd mariadb
    
    sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
    sudo systemctl start mysqld
    sudo systemctl enable mysqld
    sudo mysql_secure_installation
    sudo systemctl enable nginx
    sudo systemctl start nginx
    sudo systemctl start php-fpm
    sudo systemctl enable php-fpm
    sudo gedit /etc/nginx/nginx.conf
    
        location ~ .php$ {
                root           /usr/share/nginx/html;
                fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
                fastcgi_index  index.php;
                include fastcgi.conf;
            }
    
    
    

    tomcat8 jdk8 notepadqq sublime-text-dev-zh-cn

    androidstudio idea pycham node

    typora filezilla

    美化

    主题文件

    /usr/share/themes

    Flat-Remix-GTK

    Ant-Dracula

    图标文件

    /usr/share/icons

    Zafiro icons

    sudo vim  /etc/lsb-release
    改第一行跟最后一行,比如改成ArchLinux和Arch Linux
    
    

    游戏

    0ad 跨平台的“帝国时代”

    wesnoth 回合制策略

    2048-qt 经典的2048游戏

    zaz 经典的泡泡射击游戏;

    gnome-mines 扫雷

  • 相关阅读:
    向表中添加列 ALTER TABLE ADD Column_name
    向表中添加列 ALTER TABLE ADD Column_name
    C#类和结构(C# 编程指南)
    C#类和结构(C# 编程指南)
    SQL大小写转换
    SQL大小写转换
    (最新)IIS Express发布网站,实现IP,域名访问站点
    (最新)IIS Express发布网站,实现IP,域名访问站点
    IIS Express允许外部访问(外部调试)
    IIS Express允许外部访问(外部调试)
  • 原文地址:https://www.cnblogs.com/yancy9862/p/11373108.html
Copyright © 2011-2022 走看看