title: manjaro basis beautification
Date: 2019-04-24 22:59:57
Tags: Manjaro
Categories: Manjaro
Switching source
sudo vi /etc/pacman.conf
Join arch source
[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
blackarch source (may opt)
[blackarch]
SigLevel = Optional TrustAll
Server = https://mirrors.ustc.edu.cn/blackarch/$repo/os/$arch
Facing the source of colleges and universities
[arch4edu]
SigLevel = Never
Server = http://mirrors.tuna.tsinghua.edu.cn/arch4edu/$arch
ck source
[repo-ck]
Server = http://repo-ck.com/$arch
Set before domestic source selection of three fast
sudo pacman-mirrors -i -c China -m rank
Global Update
sudo pacman -Syyu
Database is locked, deleted/var/lib/pacman/db.lck
rm /var/lib/pacman/db.lck
Import key
sudo pacman -Sy archlinuxcn-keyring
Import Failed
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
Mount hard disk
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
Common Commands
安装 pacman -S package_name |yay -S package_name
删除 pacman -R package_name
查询net pacman -Q |grep net
Windows and Linux system to solve the dual problem of time inconsistency
sudo timedatectl set-local-rtc 1
Sogou Pinyin
sudo pacman -S fcitx-im
sudo pacman -S fcitx-configtool
sudo pacman -S fcitx-sogoupinyin
Add a profile
sudo vi ~/.xprofile
content
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
fcitx-configtool
#对于jetbrians系列fcitx无法跟随的情况 fcitx输入法配置>附加组件>勾选高级>xim前端>勾选on the spot
Installation Tools
sudo pacman -S yaourt yay
SSR
yay -S electron-ssr
http://127.0.0.1:12333
socks5://127.0.0.1:1080
Google Proxy
google-chrome-stable --proxy-server=socks5://127.0.0.1:1080
Terminal agent
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
Optional plug-in installation
Highlighting plugin
Highlight zsh-syntax-highlighting highlighting your zsh command plug-ins available
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Activation plug-ins
sudo vi ~/.zshrc
Add plugin
plugins=(git zsh-syntax-highlighting)
Let him take effect
source ~/.zshrc
zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Add plugin
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
Become effective source ~/.zshrc
zsh completion plugin
Create a directory
mkdir ~/.oh-my-zsh/custom/plugins/incr
The move into the downloaded file
sudo vi ~/.zshrc
Add to
plugins=(git zsh-syntax-highlighting incr)
At the end of ~ / .zshrc file plus
source ~/.oh-my-zsh/plugins/incr/incr*.zsh
Update .zshrc file:
source ~/.zshrc
spaceship theme
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"
Open the ~/.zshrc
Settings topic
ZSH_THEME="spaceship"
Chinese font
WenQuanYi family:
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 font
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
Selection:
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
Software Installation
Google vim git vs vlc neofetch Netease cloud foxitreader Firefox finished uget
yay -S google-chrome vim git visual-studio-code-bin vlc neofetch netease-cloud-music foxitreader firefox-i18n-zh-cn uget
bat
cat cloning
xmind zen
pdf-footer-zh-CN.svg
png-watermark-zh-CN.svg
print-watermark-zh-CN.svg
ncdu
Visual analysis directory occupancy
redshift
Color temperature adjustment
virtualbox
The virtual machine to install the corresponding kernel
qalculate
Calculator
wiznote
To know notes
Albert
Software initiator
wps wps字体
wps-office ttf-wps-fonts
file-roller unrar unzip p7zip
Compression and decompression
motor
aria2
You need to install the following tools can be used normally ifconfig
sudo pacman -S net-tools dnsutils inetutils iproute2
spacevim
curl -sLf https://spacevim.org/cn/install.sh | bash
cool-retro-term
A nostalgic terminal
develop software
java: as idea tomcat maven gradle
nodejs
flutter
git clone -b stable https://github.com/flutter/flutter.git
vim ~/.zsh
Plus
export PATH=~/Downloads/flutter/bin:$PATH
//path为你安装flutter的目录
source ~/.zshrc
Switching branch
查看分支
flutter channel
切换master
flutter channel master
anaconda
sudo vim ~/.zshrc
export PATH=/opt/anaconda/bin:$PATH
git settings
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 debugging 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)
to sum up
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
beautify
Theme file
/usr/share/themes
Ant-Dracula
Icon file
/usr/share/icons
Zafiro icons
Kai logo
sudo vim /etc/lsb-release
改第一行跟最后一行,比如改成ArchLinux和Arch Linux
game
0ad
"Age of Empires" cross-platform
wesnoth
Turn-based strategy
2048-qt
The classic 2048 game
zaz
The classic bubble shooter game;
gnome-mines
Mine-sweeping