私有源配置(R/Pypi/Conda)
pypi私服客户端配置
windows pypi私有源配置(用户配置)
环境要求:
·安装pip3和其它插件
·网络通192.168.223.77:8081
默认源配置:
创建或修改配置文件(一般是创建)
创建pip.ini文件
win+R,输入%APPDATA%
新建pip文件夹,在pip文件夹中创建pip.ini
打开pip.ini文件,在文件中加入如下行
[global]
timeout = 60
trusted-host = 192.168.223.77
index-url =http://192.168.223.77:8081/repository/pipy03/simple
手动指定私服配置:
pip3 install --trusted-host 192.168.223.77 -i http://192.168.223.77:8081/repository/pipy03/simple packagename
linux pypi私有源配置(用户配置)
环境要求:
·安装pip3和其它插件
·网络通192.168.223.77:8081
默认源配置:
创建或修改配置文件(一般都是创建)
linux的文件在~/.pip/pip.conf,加入如下行
[global]
timeout = 60
trusted-host = 192.168.223.77
index-url = http://192.168.223.77:8081/repository/pipy03/simple
手动指定私服配置:
pip3 install --trusted-host 192.168.223.77 -i http://192.168.223.77:8081/repository/pipy03/simple packagename
R私有源配置
Windows R客户端配置
环境要求
·安装Rstudio
·安装R
·网络通服务端10.91.246.12:8081
仅配置账户生效(所有用户均可配置)
-
优点:所有版本R均生效(如电脑上有R-4.1.2和R-4.2.1,则配置一个文件,两个R版本均生效)
-
缺点:每个账户都需要配置一次
默认源配置:
打开记事本或者其他文本编辑软件,输入如下配置,保存文件到"此电脑>文档"下,文件名为.Rprofile(注意文件没有后缀名,保存类型选择所有文件),配置完成后重新打开R页面即可
options(BioC_mirror="http://10.91.246.12:8081/repository/bioconductor-owe")
options("repos"=c(CRAN="http://10.91.246.12:8081/repository/r-tsinghua"))
所有用户生效(仅管理员账户可配置)
-
优点:管理员账户配置一次,所有账户均生效
-
缺点:需要在R安装路径去配置,只对已配置的R版本有效
默认源配置:
进入R的配置目录,修改或新建Rprofile.site文件(具体配置目录看安装路径,路径可能是C:\ProgramFiles\R\R-4.0.2\etc\Rprofile.site),配置完成后保存退出,重新打开R页面即可
options(BioC_mirror="http://10.91.246.12:8081/repository/bioconductor-owe")
options("repos"=c(CRAN="http://10.91.246.12:8081/repository/r-tsinghua\"))
Linux R源配置
环境要求
·安装Rstudio
·安装R
·网络通服务端10.91.246.12:8081
仅配置账户生效(所有用户均可配置)
-
优点:所有版本R均生效(如系统中有R-4.1.2和R-4.2.1,则配置一个文件,两个R版本均生效)
-
缺点:每个账户都需要配置一次
默认源配置:
vi \~/.Rprofile 输入如下内容,之后保存退出即可
options(BioC_mirror="http://10.91.246.12:8081/repository/bioconductor-owe")
options("repos"=c(CRAN="http://10.91.246.12:8081/repository/r-tsinghua"))
所有用户生效(仅管理员账户可配置)
-
优点:管理员账户配置一次,所有账户均生效
-
缺点:需要在R安装路径去配置,只对已配置的R版本有效
默认源配置:
进入R的配置目录,修改或新建Rprofile.site文件(具体配置目录看安装路径,路径可能是/public/apps/R-4.1.0/etc/Rprofile.site)
options(BioC_mirror="http://10.91.246.12:8081/repository/bioconductor-owe")
options("repos"=c(CRAN="http://10.91.246.12:8081/repository/r-tsinghua"))
Conda私有源客户端配置(用户配置)
环境要求:
·网络通192.168.223.77:8081
·安装conda
默认源配置: ·通过命令行配置
#配置
conda config --remove-key channels
conda config --remove channels defaults
conda config --add channels http://192.168.223.77:8081/repository/conda-proxy/free
conda config --add channels http://192.168.223.77:8081/repository/conda-proxy/main
#bioconda配置
conda config --add channels http://192.168.223.77:8081/repository/conda-bio/
conda config --add channels http://192.168.223.77:8081/repository/conda-bio02/
conda config --add channels http://192.168.223.77:8081/repository/conda-bio03/
#conda-forge配置
conda config --add channels http://192.168.223.77:8081/repository/conda-forge/
#conda-msys2配置
conda config --add channels http://192.168.223.77:8081/repository/conda-msys2/
#conda-menpo配置
conda config --add channels http://192.168.223.77:8081/repository/conda-menpo/