这是本节的多页打印视图。 点击此处打印.

返回本页常规视图.

Os

1 - CoreOS

rpm-ostree

# omz chsh
sudo rpm-ostree install git wget zsh vim util-linux-user
# compile
sudo rpm-ostree install make gcc g++ patch
# pkg
sudo rpm-ostree install dnf

sudo systemctl reboot

python

curl https://pyenv.run | bash

# add to ~/.zshrc
cat <<EOF >> ~/.zshrc
export PYENV_ROOT="\$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="\$PYENV_ROOT/bin:\$PATH"
eval "\$(pyenv init -)"
EOF

# dep lib to compile
sudo rpm-ostree install readline-devel zlib-devel openssl-devel bzip2-devel sqlite-devel libffi-devel lzma-sdk-devel

pyenv versions
pyenv install 2.7.18
pyenv install 3.9.13
pyenv global 2.7.18

# pyarrow
sudo rpm-ostree install libarrow-devel libarrow-python-devel

2 - libvirt

install

  • mac
brew install qemu gcc libvirt
brew install virt-manager

# macOS doesn't support QEMU security features
echo 'security_driver = "none"' >> /opt/homebrew/etc/libvirt/qemu.conf
echo "dynamic_ownership = 0" >> /opt/homebrew/etc/libvirt/qemu.conf
echo "remember_owner = 0" >> /opt/homebrew/etc/libvirt/qemu.conf

brew services start libvirt

vagrant

# https://developer.fedoraproject.org/tools/vagrant/vagrant-libvirt.html
# https://vagrant-libvirt.github.io/vagrant-libvirt/installation.html

# vagrant plugin install vagrant-libvirt
Vagrant.configure("2") do |config|
  config.vm.provider :libvirt do |libvirt|
    libvirt.driver = "qemu"
  end
end
# export VAGRANT_DEFAULT_PROVIDER=libvirt
# vagrant up --provider=libvirt

create

from iso

mkdir ~/vms && cd ~/vms

qemu-img create -f qcow2 debian.qcow2 50g
virsh define debian.xml
virsh start debian
virsh list

from qcow2/raw

# https://cdimage.debian.org/images/cloud/stretch/daily/
# yum install qemu-kvm qemu-kvm-tools virt-manager libvirt virt-install –y

virt-install --name debian --ram 2048 --vcpus=2 --disk path=debian.qcow2 --network=bridge:en0 --force --import --autostart
virsh console --domain debian --force

# KVM format convert
qemu-img convert -p -t directsync -O qcow2 test.raw test.qcow2
qemu-img convert -p -t directsync -O raw test.qcows test.raw

3 - Oh My Zsh

zsh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 

cp ~/.oh-my-zsh/themes/agnoster.zsh-theme ~/.oh-my-zsh/custom/themes/
mv ~/.oh-my-zsh/custom/themes/agnoster.zsh-theme ~/.oh-my-zsh/custom/themes/myagnoster.zsh-theme
# vim ~/.oh-my-zsh/custom/themes/myagnoster.zsh-theme
# replace blue to cyan
# vim ~/.zshrc
# ZSH_THEME="myagnoster"

# add zsh-autosuggestions zsh-syntax-highlighting
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-autosuggestions --depth 1
git clone https://github.com/zsh-users/zsh-syntax-highlighting --depth 1
# . ~/.zshrc

vim

Vim-Plug

# PlugInstall [pluginName]
# PlugUpdate [pluginName]
# PlugDiff : show changelog
# PlugUpgrade : upgrade itself
# PlugStatus
# PlugClean
# PlugSnapshot [filePath] : save a snapshot
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
" ~/.vim/bundle for Vundle(https://github.com/VundleVim/Vundle.vim
) compatibility
" Plug 'userName/repoName' or Plug 'pluginName' for https://github.com/vim-scripts
" Vim-Plug download Plugin like this: git -C ~/.vim/bundle clone --recursive https://github.com/vim-scripts/L9.git

call plug#begin('~/.vim/bundle')
    " Plug 'file:///path/to/plugin'
    " Plug "git:https://exmaple.com/user/repo.git"

    " dir tree
    Plug 'preservim/nerdtree'
    " start screen
    Plug 'mhinz/vim-startify' 
    " highlighting and navigating through different words in a buffer
    Plug 'lfv89/vim-interestingwords'
    " Check syntax 
    Plug 'dense-analysis/ale'
    " lean & mean status/tabline for vim that's light as air
    Plug 'vim-airline/vim-airline'
call plug#end()

5 - Windows

虚拟机

去掉虚拟机标识

:echo rename PRLS__ to NOBOX_
REG COPY HKLM\HARDWARE\ACPI\DSDT\PRLS__ HKLM\HARDWARE\ACPI\DSDT\NOBOX_ /s
REG DELETE HKLM\HARDWARE\ACPI\DSDT\PRLS__ /f

:modify SystemBiosVersion
REG ADD HKLM\HARDWARE\DESCRIPTION\System /v SystemBiosVersion /t REG_MULTI_SZ /d "NOBOX   - 1\018.0.2 (53077)\0Some EFI x64 18.0.2-53077 - 12CF55\0" /f
REG ADD HKLM\HARDWARE\DESCRIPTION\System /v VideoBiosVersion /t REG_MULTI_SZ /d "" /f
pause