Skip to content

Instantly share code, notes, and snippets.

@dswwsd
Last active August 9, 2022 06:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dswwsd/4649be95285dc39ccd1c8a089b72c5b9 to your computer and use it in GitHub Desktop.
Save dswwsd/4649be95285dc39ccd1c8a089b72c5b9 to your computer and use it in GitHub Desktop.
国内源
[global]
trusted-host = mirrors.aliyun.com
index-url = https://mirrors.aliyun.com/pypi/simple
# Debian
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
# Update
sudo apt-get --only-upgrade install google-chrome-stable
# 文泉字体
apt-get install ttf-wqy-*
# --------------------------------------------
# Redhat
# /etc/yum.repos.d/google-chrome.repo
# [google-chrome]
# name=google-chrome
# baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
# enabled=1
# gpgcheck=1
# gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
yum install google-chrome-stable
# 文泉字体
yum install ttf-wqy-*
# remote debug
google-chrome --headless --remote-debugging-port=9222 --disable-gpu --remote-debugging-address=0.0.0.0
# centos7
yum groupinstall "fonts"
vim /etc/locale.conf
# LANG="zh_CN.UTF-8"
source /etc/locale.conf
npm set registry https://r.cnpmjs.org # 注册模块镜像
npm set disturl https://cnpmjs.org/dist # node-gyp 编译依赖的 node 源码镜像
npm set chromedriver_cdnurl http://cnpmjs.org/mirrors/chromedriver # chromedriver
npm set operadriver_cdnurl http://cnpmjs.org/mirrors/operadriver # operadriver
npm set phantomjs_cdnurl http:/cnpmjs.org/mirrors/phantomjs # phantomjs
npm set sass_binary_site http://cnpmjs.org/mirrors/node-sass # node-sass
npm set electron_mirror http://cnpmjs.org/mirrors/electron/ # electron
npm set selenium_cdnurl=http://cnpmjs.org/mirrors/selenium
npm set node_inspector_cdnurl=https://cnpmjs.org/mirrors/node-inspector
export NVM_NODEJS_ORG_MIRROR=https://cnpmjs.org/mirrors/node
export PUPPETEER_DOWNLOAD_HOST=https://storage.googleapis.com.cnpmjs.org
export SHARP_DIST_BASE_URL=https://npm.taobao.org/mirrors/sharp-libvips/
# HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment