Deployment Overview of Anaconda on Server¶
Prerequisites and Basic Requirements¶
The following requirements must be met before deploying Anaconda on the server:
-
Operating System: Debian-based (e.g., Ubuntu) or RHEL-based (e.g., CentOS, Rocky Linux) distributions.
-
Privileges: Root access or
sudoprivileges are required to install system dependencies and the Anaconda distribution. -
Architecture: 64-bit Linux (x86_64).
-
Network Access: The server must have outbound internet access to download the installer from
repo.anaconda.comand to update packages. -
System Dependencies:
-
Debian/Ubuntu:
libgl1-mesa-glx,libegl1-mesa,libxrandr2,libxss1,libxcursor1,libxcomposite1,libasound2,libxi6,libxtst6,libxdamage1,curl. -
RHEL/CentOS:
libXcomposite,libXcursor,libXi,libXtst,libXrandr,alsa-lib,mesa-libEGL,libXdamage,mesa-libGL,libXScrnSaver.
File and Directory Structure¶
Upon successful installation, the following directory structure is established:
-
Installation Root:
/root/anaconda3 -
Binary Executables:
/root/anaconda3/bin -
Environment Configuration:
/root/.bashrc(modified byconda init) -
Installer Script Location:
/root/Anaconda3-2024.06-1-Linux-x86_64.sh(removed post-installation)
Application Installation Process¶
The deployment involves downloading the official installer, verifying its integrity, and executing it in batch mode.
-
Update System Packages:
-
On Debian systems, update the APT cache and upgrade existing packages.
-
On RHEL systems, ensure the package manager is ready for dependency installation.
-
Install Dependencies:
-
Install the required graphical and audio libraries listed in the Prerequisites section.
-
Download the Installer:
-
The installer is downloaded to
/root/Anaconda3-2024.06-1-Linux-x86_64.shfrom the official repository. -
The file permissions are set to
u=rwx,g=r,o=rwithrootownership. -
Verify Integrity:
-
The SHA256 checksum of the downloaded installer is calculated to ensure file integrity.
-
Execute Installation:
-
The installer is run in batch mode (
-b) with force reinstallation enabled (-f). -
Command:
bash /root/Anaconda3-2024.06-1-Linux-x86_64.sh -b -f -
Initialize and Update:
-
The base environment is activated.
-
conda initis executed to configure the shell. -
All packages within the base environment are updated using
conda update --update-all -y. -
Cleanup:
-
The installation script is removed from the
/rootdirectory.
Access Rights and Security¶
-
User Context: The installation is performed as the
rootuser. -
File Permissions: The installer script is set to be executable by the owner and readable by group and others before execution.
-
Post-Installation: The installer script is deleted immediately after the process completes to reduce the attack surface.
-
Shell Configuration: The
conda initcommand modifies the shell configuration file (typically/root/.bashrc) to automatically activate the base environment upon login.
Location of Configuration Files and Data¶
-
Main Configuration: Located within
/root/anaconda3/etc/conda/. -
User Configuration: Stored in
/root/.condarc. -
Environment Data: Managed within the
/root/anaconda3directory tree. -
Shell Initialization: Modifications are applied to
/root/.bashrc.
Starting, Stopping, and Updating¶
Anaconda is not a system service managed by systemd or init. It is a user-space environment.
-
Activation:
-
To activate the base environment in a new shell session, run:
-
Alternatively, explicitly activate the base environment:
-
Updating Packages:
-
To update all packages in the current environment:
-
Updating the Distribution:
-
To update the conda package manager itself:
-
Deactivation:
-
To deactivate the current environment: