跳转至

🔥AI副业赚钱星球

点击下面图片查看

郭震AI

Ubuntu 系统服务器配置步骤

编辑日期: 2024-07-17 文章阅读:

以下是基于 Debian 或 Ubuntu 系统,从零搭建 MinicondaApache2Git 环境、搭建Github的详细步骤:

步骤 1:更新系统软件包

首先,更新系统软件包以确保您拥有最新的更新和安全补丁。

sudo apt update
sudo apt upgrade -y

步骤 2:安装依赖项

安装一些必要的依赖项,如 wgetcurlgit

sudo apt install -y wget curl git

步骤 3:安装 Miniconda

  1. 下载 Miniconda 安装脚本:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
  1. 运行安装脚本:
bash ~/miniconda.sh
  1. 按照提示完成安装过程(建议安装在默认路径)。

  2. 初始化 Conda:

~/miniconda3/bin/conda init
  1. 重新加载 Shell 以使更改生效:
exec bash

步骤 4:安装 Apache2

  1. 安装 Apache HTTP 服务器:
sudo apt install -y apache2
  1. 启动 Apache 服务并设置开机自启动:
sudo systemctl start apache2
sudo systemctl enable apache2

步骤 5:配置 Git

  1. 设置全局用户名和电子邮件地址:
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
  1. 验证配置:
git config --list

步骤 6:从 GitHub 克隆仓库

  1. 生成 SSH 密钥并添加到 GitHub:
ssh-keygen -t rsa -b 4096 -C "your-email@example.com"
cat ~/.ssh/id_rsa.pub

将生成的公钥添加到 GitHub 上的 SSH 密钥中。

  1. 克隆仓库:
git clone git@github.com:your-username/your-repository.git
京ICP备20031037号-1 | AI之家 | AI资讯 | Python200 | 数据分析