Deployment Overview of Anaconda on Server¶
Prerequisites and Basic Requirements¶
The server must be running a supported Linux distribution. The deployment process differs slightly based on the package manager available on the system:
- Debian-based distributions (e.g., Ubuntu, Debian): Requires
aptpackage manager. - RHEL-based distributions (e.g., CentOS, RHEL, Rocky Linux): Requires
yumordnfpackage manager. - Privileges: The installation process requires
rootprivileges to install system dependencies and place the Anaconda distribution in the/rootdirectory. - Network Access: The server must have outbound internet access to download the installer from
repo.anaconda.comand to update packages.
File and Directory Structure¶
The Anaconda distribution is installed in the root user's home directory. The primary components are located as follows:
- Installation Directory:
/root/anaconda3 - Binary Executables:
/root/anaconda3/bin - Environment Configuration: Managed via
conda initwhich modifies shell configuration files (e.g.,.bashrcor.zshrc) in the user's home directory. - Installer Script: Temporarily stored at
/root/Anaconda3-{{ anaconda_version }}-Linux-x86_64.shduring the installation process and removed immediately after completion.
Application Installation Process¶
The installation is performed using the official Anaconda shell installer script. The process involves installing system dependencies, downloading the installer, executing it in batch mode, and initializing the environment.
Debian-based Systems¶
- Update and upgrade APT packages.
- Install the following required dependencies:
libgl1-mesa-glxlibegl1-mesalibxrandr2libxss1libxcursor1libxcomposite1libasound2libxi6libxtst6libxdamage1curl- Download the installer to
/root/Anaconda3-{{ anaconda_version }}-Linux-x86_64.sh. - Verify the integrity of the installer using
sha256sum. - Execute the installer with the
-b(batch) and-f(force) flags: - Initialize the distribution and update all packages:
- Remove the installation script from
/root.
RHEL-based Systems¶
- Install the following required dependencies:
libXcompositelibXcursorlibXilibXtstlibXrandralsa-libmesa-libEGLlibXdamagemesa-libGLlibXScrnSaver- Download the installer to
/root/Anaconda3-{{ anaconda_version }}-Linux-x86_64.sh. - Verify the integrity of the installer using
sha256sum. - Execute the installer with the
-b(batch) and-f(force) flags: - Initialize the distribution and update all packages:
- Remove the installation script from
/root.
Starting, Stopping, and Updating¶
Anaconda is not a system service managed by systemd or init. It is a user-space environment that is activated within a shell session.
- Activation: To use Anaconda, the user must activate the base environment. This is typically done by sourcing the activation script: After running
conda init, the environment is automatically activated upon opening a new shell session. - Updating: To update the Anaconda distribution and all installed packages, run:
- Stopping: There is no stop command. The environment is deactivated by running: or by closing the terminal session.