0%

代码库源配置

代码库源配置

Linux

  • Ubuntu: /etc/apt/sources.list
  • ArchLinux: /etc/pacman.d/mirrorlist
  • CentOS: /etc/yum.repo.d/CentOS-Base.repo

Python

  • Get it by sudo apt-get install python python3
  • PyPI(PythonPackageIndex)
    • download pip
    • python setup.py install
    • vi ~/.pip/pip.conf
      1
      2
      [global]
      index-url = https://pypi.tuna.tsinghua.edu.cn/simple

Perl

  • Get it by sudo apt-get install perl
  • CPAN
    • sudo apt-get install perl-modules
    • vi ~/.cpan/CPAN/MyConfig.pm
    • change the urllist in config to mirror like [http://mirror.bit.edu.cn/CPAN/]
    • Install modules perl -MCPAN -e shell or cpan install GD or cpan GD
    • Automatic/manual installation, in ~/.cpan/build
      manual
      1
      2
      3
      4
      5
      6
      7
      8
      9
      $ perl Makefile.PL
      $ make
      $ make test (optional, test dependence and feedback "all test ok")
      $ make install
      or
      $ perl Build.PL
      $ ./Build
      $ ./Build test
      $ ./Build install

      Node.js

  • Get it by sudo apt-get install nodejs
  • npm
    • Get npm sudo apt-get install npm
    • Taobao镜像: http://npm.taobao.org/
    • 配置
      • npm set registry https://npm.tuna.tsinghua.edu.cn/
      • 或者~/.npmrc 添加 registry=https://npm.tuna.tsinghua.edu.cn

Ruby

  • Get Gem sudo apt-get install gem