前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Day3-李泽平-Linux环境下的软件安装

Day3-李泽平-Linux环境下的软件安装

原创
作者头像
用户11040033
修改2024-03-25 00:19:11
2050
修改2024-03-25 00:19:11

Linux环境下的软件安装

一、conda认识和下载

1、conda认识

conda=Linux的应用商店

minicoda=conda精华版=Linux的应用商店

2、将miniconda下载到服务器

(1)浏览器搜索“miniconda 清华”

(2)进入清华大学开源软件镜像站

(3)将miniconda下载到服务器

目的:安装64位最新版本(Miniconda3-py39_24.1.2-0-Linux-x86_64.sh)

①通过右键复制最新版本的下载链接(https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py39_24.1.2-0-Linux-x86_64.sh)

②登录服务器(方法见Day2),进入biosoft目录(输入 cd biosft

代码语言:linux
复制
Last login: Sat Mar 23 23:49:05 2024 from 218.249.94.220
bio08@ecm-cefa:~$ cd biosoft

③使用wget命令(输入wget 刚才复制的下载链接

代码语言:linux
复制
bio08@ecm-cefa:~/biosoft$ wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py39_24.1.2-0-Linux-x86_64.sh

3、安装miniconda

运行:bash Miniconda3-py39_24.1.2-0-Linux-x86_64.sh

代码语言:linux
复制
bio08@ecm-cefa:~/biosoft$ bash Miniconda3-py39_24.1.2-0-Linux-x86_64.sh

出现如下界面

代码语言:linux
复制
bio08@ecm-cefa:~/biosoft$ bash Miniconda3-py39_24.1.2-0-Linux-x86_64.sh

Welcome to Miniconda3 py39_24.1.2-0

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> q  #输入q,跳过版权信息
END USER LICENSE AGREEMENT

This Anaconda End User License Agreement ("EULA") is between Anaconda, Inc., ("Anaconda"), and you ("You" or
"Customer"), the individual or entity acquiring and/or providing access to the Anaconda On-Premise Products. The EULA
governs your on-premise access to and use of Anaconda's downloadable Python and R distribution of conda, conda-build,
Python, and over 200 open-source scientific packages and dependencies ("Anaconda Distribution"); Anaconda's data science
and machine learning platform (the "Platform"); and Anaconda's related Software, Documentation, Content, and other
related desktop services, including APIs, through which any of the foregoing are provided to You (collectively, the
"On-Premise Products"). Capitalized terms used in these EULA and not otherwise defined herein are defined at
https://legal.anaconda.com/policies/en/?name=anaconda-legal-definitions.

AS SET FORTH IN SECTION 1 BELOW, THERE ARE VARIOUS TYPES OF USERS FOR THE ON-PREMISE PRODUCTS, THUS, EXCEPT WHERE
INDICATED OTHERWISE "YOU" SHALL REFER TO CUSTOMER AND ALL TYPES OF USERS. YOU ACKNOWLEDGE THAT THIS EULA IS BINDING, AND
YOU AFFIRM AND SIGNIFY YOUR CONSENT TO THIS EULA, BY : (I) CLICKING A BUTTON OR CHECKBOX, (II) SIGNING A SIGNATURE BLOCK
SIGNIFYING YOUR ACCEPTANCE OF THIS EULA; AND/OR (III) REGISTERING TO, USING, OR ACCESSING THE ON-PREMISE PRODUCTS,
WHICHEVER IS EARLIER (THE "EFFECTIVE DATE").

Except as may be expressly permitted by this EULA, You may not sell or exchange anything You copy or derive from our
On-Premise Products. Subject to your compliance with this EULA, Anaconda grants You a personal, non-exclusive,
non-transferable, limited right to use our On-Premise Products strictly as detailed herein.

1. PLANS & ACCOUNTS

1.1 OUR PLANS. Unless otherwise provided in an applicable Order or Documentation, access to the On-Premise Products is
offered on a Subscription basis, and the features and limits of your access are determined by the subscribed plan or
tier ("Plan") You select, register for, purchase, renew, or upgrade or downgrade into. To review the features and price
associated with the Plans, please visit https://www.anaconda.com/pricing. Additional Offering Specific Terms may apply
to You, the Plan, or the On-Premise Product, and such specific terms are incorporated herein by reference and form an
integral part hereof.

a. FREE PLANS. Anaconda allows You to use the Free Offerings (as defined hereinafter), Trial Offerings (as defined
hereinafter), Pre-Release Offerings (as defined hereinafter), and Scholarships (as defined hereinafter) (each, a "Free
Plan"), without charge, as set forth in this Section 1.1(a). Your use of the Free Plan is restricted to Internal
Business Purposes. If You receive a Free Plan to the On-Premise Products, Anaconda grants You a non-transferable,
non-exclusive, revocable, limited license to use and access the On-Premise Products in strict accordance with this EULA.
We reserve the right, in our absolute discretion, to withdraw or to modify your Free Plan access to the On-Premise

Do you accept the license terms? [yes|no]
>>> yes #输入yes,按回车
Miniconda3 will now be installed into this location:
/home/bio08/miniconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/bio08/miniconda3] >>>  #按enter键确认安装地址
PREFIX=/home/bio08/miniconda3
Unpacking payload ...
                                                                                                                                        
Installing base environment...


Downloading and Extracting Packages:


Downloading and Extracting Packages:

Preparing transaction: done
Executing transaction: done
installation finished.
Do you wish to update your shell profile to automatically initialize conda?
This will activate conda on startup and change the command prompt when activated.
If you'd prefer that conda's base environment not be activated on startup,
   run the following command when conda is activated:

conda config --set auto_activate_base false

You can undo this by running `conda init --reverse $SHELL`? [yes|no]
[no] >>> yes #输入yes并回车
no change     /home/bio08/miniconda3/condabin/conda
no change     /home/bio08/miniconda3/bin/conda
no change     /home/bio08/miniconda3/bin/conda-env
no change     /home/bio08/miniconda3/bin/activate
no change     /home/bio08/miniconda3/bin/deactivate
no change     /home/bio08/miniconda3/etc/profile.d/conda.sh
no change     /home/bio08/miniconda3/etc/fish/conf.d/conda.fish
no change     /home/bio08/miniconda3/shell/condabin/Conda.psm1
no change     /home/bio08/miniconda3/shell/condabin/conda-hook.ps1
no change     /home/bio08/miniconda3/lib/python3.9/site-packages/xontrib/conda.xsh
no change     /home/bio08/miniconda3/etc/profile.d/conda.csh
modified      /home/bio08/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

Thank you for installing Miniconda3! #安装成功
bio08@ecm-cefa:~/biosoft$ 

4、激活

输入source ~/.bashrc,注意空格

接着在命令行输入conda,出现满屏的信息说明成功了。

代码语言:linux
复制
bio08@ecm-cefa:~/biosoft$ source ~/.bashrc # 输入source ~/.bashrc
(base) bio08@ecm-cefa:~/biosoft$ conda #输入conda
usage: conda [-h] [-v] [--no-plugins] [-V] COMMAND ...

conda is a tool for managing and deploying applications, environments and packages.

optional arguments:
  -h, --help          Show this help message and exit.
  -v, --verbose       Can be used multiple times. Once for detailed output, twice for INFO logging, thrice for DEBUG logging, four
                      times for TRACE logging.
  --no-plugins        Disable all plugins that are not built into conda.
  -V, --version       Show the conda version number and exit.

commands:
  The following built-in and plugins subcommands are available.

  COMMAND
    activate          Activate a conda environment.
    clean             Remove unused packages and caches.
    compare           Compare packages between conda environments.
    config            Modify configuration values in .condarc.
    content-trust     Signing and verification tools for Conda
    create            Create a new conda environment from a list of specified packages.
    deactivate        Deactivate the current active conda environment.
    doctor            Display a health report for your environment.
    info              Display information about current conda install.
    init              Initialize conda for shell interaction.
    install           Install a list of packages into a specified conda environment.
    list              List installed packages in a conda environment.
    notices           Retrieve latest channel notifications.
    package           Create low-level conda packages. (EXPERIMENTAL)
    remove (uninstall)
                      Remove a list of packages from a specified conda environment.
    rename            Rename an existing environment.
    repoquery         Advanced search for repodata.
    run               Run an executable in a conda environment.
    search            Search for packages and display associated information using the MatchSpec format.
    update (upgrade)  Update conda packages to the latest compatible version.
(base) bio08@ecm-cefa:~/biosoft$ 

5、添加镜像

镜像网站相当于主网站的副本,conda在国外,在国内下载软件速度慢,从镜像网站下载,可以加快下载速度

#使用北外的镜像,在命令行输入一下代码。

conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/

conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/

conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/free/

conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/

conda config --set show_channel_urls yes

代码语言:linux
复制
(base) bio08@ecm-cefa:~/biosoft$ conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/
(base) bio08@ecm-cefa:~/biosoft$ conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/
(base) bio08@ecm-cefa:~/biosoft$ conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/free/
(base) bio08@ecm-cefa:~/biosoft$ conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/
(base) bio08@ecm-cefa:~/biosoft$ conda config --set show_channel_urls yes
(base) bio08@ecm-cefa:~/biosoft$ 

***

二、使用conda

1、查看当前服务器上安装的所有软件列表

输入conda list

代码语言:linux
复制
(base) bio08@ecm-cefa:~/biosoft$ conda list
# packages in environment at /home/bio08/miniconda3:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main    defaults
_openmp_mutex             5.1                       1_gnu    defaults
archspec                  0.2.1              pyhd3eb1b0_0    defaults
boltons                   23.0.0           py39h06a4308_0    defaults
brotli-python             1.0.9            py39h6a678d5_7    defaults
bzip2                     1.0.8                h7b6447c_0    defaults
c-ares                    1.19.1               h5eee18b_0    defaults
ca-certificates           2023.12.12           h06a4308_0    defaults
certifi                   2024.2.2         py39h06a4308_0    defaults
cffi                      1.16.0           py39h5eee18b_0    defaults
charset-normalizer        2.0.4              pyhd3eb1b0_0    defaults
conda                     24.1.2           py39h06a4308_0    defaults
conda-content-trust       0.2.0            py39h06a4308_0    defaults
conda-libmamba-solver     24.1.0             pyhd3eb1b0_0    defaults
conda-package-handling    2.2.0            py39h06a4308_0    defaults
conda-package-streaming   0.9.0            py39h06a4308_0    defaults
cryptography              42.0.2           py39hdda0065_0    defaults
distro                    1.8.0            py39h06a4308_0    defaults
fmt                       9.1.0                hdb19cb5_0    defaults
icu                       73.1                 h6a678d5_0    defaults
idna                      3.4              py39h06a4308_0    defaults
jsonpatch                 1.32               pyhd3eb1b0_0    defaults
jsonpointer               2.1                pyhd3eb1b0_0    defaults
krb5                      1.20.1               h143b758_1    defaults
ld_impl_linux-64          2.38                 h1181459_1    defaults
libarchive                3.6.2                h6ac8c49_2    defaults
libcurl                   8.5.0                h251f7ec_0    defaults
libedit                   3.1.20230828         h5eee18b_0    defaults
libev                     4.33                 h7f8727e_1    defaults
libffi                    3.4.4                h6a678d5_0    defaults
libgcc-ng                 11.2.0               h1234567_1    defaults
libgomp                   11.2.0               h1234567_1    defaults
libmamba                  1.5.6                haf1ee3a_0    defaults
libmambapy                1.5.6            py39h2dafd23_0    defaults
libnghttp2                1.57.0               h2d74bed_0    defaults
libsolv                   0.7.24               he621ea3_0    defaults
libssh2                   1.10.0               hdbd6064_2    defaults
libstdcxx-ng              11.2.0               h1234567_1    defaults
libxml2                   2.10.4               hf1b16e4_1    defaults
lz4-c                     1.9.4                h6a678d5_0    defaults
menuinst                  2.0.2            py39h06a4308_0    defaults
ncurses                   6.4                  h6a678d5_0    defaults
openssl                   3.0.13               h7f8727e_0    defaults
packaging                 23.1             py39h06a4308_0    defaults
pcre2                     10.42                hebb0a14_0    defaults
pip                       23.3.1           py39h06a4308_0    defaults
platformdirs              3.10.0           py39h06a4308_0    defaults
pluggy                    1.0.0            py39h06a4308_1    defaults
pybind11-abi              4                    hd3eb1b0_1    defaults
pycosat                   0.6.6            py39h5eee18b_0    defaults
pycparser                 2.21               pyhd3eb1b0_0    defaults
pysocks                   1.7.1            py39h06a4308_0    defaults
python                    3.9.18               h955ad1f_0    defaults
readline                  8.2                  h5eee18b_0    defaults
reproc                    14.2.4               h295c915_1    defaults
reproc-cpp                14.2.4               h295c915_1    defaults
requests                  2.31.0           py39h06a4308_1    defaults
ruamel.yaml               0.17.21          py39h5eee18b_0    defaults
ruamel.yaml.clib          0.2.6            py39h5eee18b_1    defaults
setuptools                68.2.2           py39h06a4308_0    defaults
sqlite                    3.41.2               h5eee18b_0    defaults
tk                        8.6.12               h1ccaba5_0    defaults
tqdm                      4.65.0           py39hb070fc8_0    defaults
tzdata                    2023d                h04d1e81_0    defaults
urllib3                   2.1.0            py39h06a4308_1    defaults
wheel                     0.41.2           py39h06a4308_0    defaults
xz                        5.4.5                h5eee18b_0    defaults
yaml-cpp                  0.8.0                h6a678d5_0    defaults
zlib                      1.2.13               h5eee18b_0    defaults
zstandard                 0.19.0           py39h5eee18b_0    defaults
zstd                      1.5.5                hc292b87_0    defaults
(base) bio08@ecm-cefa:~/biosoft$ 

2、安装软件fastqc

输入conda install fastqc -y,其中-y是yes,安装过程中conda问你的问题全部回答yes

代码语言:linux
复制
(base) bio08@ecm-cefa:~/biosoft$ conda install fastqc -y #输入conda install fastqc -y
Channels:
 - https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
 - https://mirrors.bfsu.edu.cn/anaconda/pkgs/free
 - https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
 - https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/bio08/miniconda3

  added / updated specs:
    - fastqc


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    archspec-0.2.3             |     pyhd3eb1b0_0          47 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    ca-certificates-2024.3.11  |       h06a4308_0         127 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    conda-24.3.0               |   py39h06a4308_0         946 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    dbus-1.13.18               |       hb2f20db_0         504 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    expat-2.5.0                |       h6a678d5_0         172 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    fastqc-0.12.1              |       hdfd78af_0        11.1 MB  https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda
    font-ttf-dejavu-sans-mono-2.37|       hd3eb1b0_0         335 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    fontconfig-2.14.1          |       h4c34cd2_2         281 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    freetype-2.12.1            |       h4a9f257_0         626 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    gdbm-1.18                  |       hd4cb3f1_4         194 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    glib-2.78.4                |       h6a678d5_0         508 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    glib-tools-2.78.4          |       h6a678d5_0         115 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    libglib-2.78.4             |       hdc74915_0         1.5 MB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    libiconv-1.16              |       h7f8727e_2         736 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    libpng-1.6.39              |       h5eee18b_0         304 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    libuuid-1.41.5             |       h5eee18b_0          27 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    libxcb-1.15                |       h7f8727e_0         505 KB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    openjdk-11.0.13            |       h87a67e3_0       341.0 MB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    perl-5.34.0                |       h5eee18b_2        12.4 MB  https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
    ------------------------------------------------------------
                                           Total:       371.3 MB

The following NEW packages will be INSTALLED:

  dbus               anaconda/pkgs/main/linux-64::dbus-1.13.18-hb2f20db_0 
  expat              anaconda/pkgs/main/linux-64::expat-2.5.0-h6a678d5_0 
  fastqc             anaconda/cloud/bioconda/noarch::fastqc-0.12.1-hdfd78af_0 
  font-ttf-dejavu-s~ anaconda/pkgs/main/noarch::font-ttf-dejavu-sans-mono-2.37-hd3eb1b0_0 
  fontconfig         anaconda/pkgs/main/linux-64::fontconfig-2.14.1-h4c34cd2_2 
  freetype           anaconda/pkgs/main/linux-64::freetype-2.12.1-h4a9f257_0 
  gdbm               anaconda/pkgs/main/linux-64::gdbm-1.18-hd4cb3f1_4 
  glib               anaconda/pkgs/main/linux-64::glib-2.78.4-h6a678d5_0 
  glib-tools         anaconda/pkgs/main/linux-64::glib-tools-2.78.4-h6a678d5_0 
  libglib            anaconda/pkgs/main/linux-64::libglib-2.78.4-hdc74915_0 
  libiconv           anaconda/pkgs/main/linux-64::libiconv-1.16-h7f8727e_2 
  libpng             anaconda/pkgs/main/linux-64::libpng-1.6.39-h5eee18b_0 
  libuuid            anaconda/pkgs/main/linux-64::libuuid-1.41.5-h5eee18b_0 
  libxcb             anaconda/pkgs/main/linux-64::libxcb-1.15-h7f8727e_0 
  openjdk            anaconda/pkgs/main/linux-64::openjdk-11.0.13-h87a67e3_0 
  perl               anaconda/pkgs/main/linux-64::perl-5.34.0-h5eee18b_2 

The following packages will be UPDATED:

  archspec           pkgs/main::archspec-0.2.1-pyhd3eb1b0_0 --> anaconda/pkgs/main::archspec-0.2.3-pyhd3eb1b0_0 
  ca-certificates    pkgs/main::ca-certificates-2023.12.12~ --> anaconda/pkgs/main::ca-certificates-2024.3.11-h06a4308_0 
  conda              pkgs/main::conda-24.1.2-py39h06a4308_0 --> anaconda/pkgs/main::conda-24.3.0-py39h06a4308_0 



Downloading and Extracting Packages:
                                                                                                                                        
Preparing transaction: done                                                                                                             
Verifying transaction: done                                                                                                             
Executing transaction: done                                                                                                             
(base) bio08@ecm-cefa:~/biosoft$  

3、确认fastqc是否安装成功

输入fastqc --help,如果出现一大片文字,这是软件的帮助文档。因为只有安装成功的软件才能看到帮助文档,所以出现了这篇帮助文档,就可以确定已经安装成功。

代码语言:linux
复制
(base) bio08@ecm-cefa:~/biosoft$ fastqc --help 

***

三、小结(思维导图)

***

四、参考资料

微信公众号生信星球

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Linux环境下的软件安装
    • 一、conda认识和下载
      • 1、conda认识
      • 2、将miniconda下载到服务器
      • 3、安装miniconda
      • 4、激活
      • 5、添加镜像
    • 二、使用conda
      • 1、查看当前服务器上安装的所有软件列表
      • 2、安装软件fastqc
      • 3、确认fastqc是否安装成功
    • 三、小结(思维导图)
      • 四、参考资料
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档