彭鱼宴
Published on 2025-03-22 / 33 Visits
0
0

Ubuntu

root

设置root用户

sudo passwd root 

允许ssh登录

打开终端并编辑 SSH 配置文件:
sudo nano /etc/ssh/sshd_config
找到以下行并进行修改:
#PermitRootLogin prohibit-password 或 PermitRootLogin no
修改为:
PermitRootLogin yes
同时,确保以下部分未被注释(取消注释)或修改:
#PasswordAuthentication yes
修改为:
PasswordAuthentication yes
保存文件并退出(按 Ctrl + X,然后按 Y 确认保存,最后按 Enter)。
重启 SSH 服务以使更改生效:
sudo systemctl restart ssh

硬盘大小

vgdisplay # 使用该命令,查看卷组(Volume Group)信息
  --- Volume group ---
  VG Name               ubuntu-vg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <928.46 GiB
  PE Size               4.00 MiB
  Total PE              237685
  Alloc PE / Size       25600 / 100.00 GiB
  Free  PE / Size       212085 / <828.46 GiB # 该行为未分配大小
  VG UUID               mNW3bQ-IaXY-P3wI-TpEm-Mffn-nFAB-q30eGX

sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv # 

clash

https://github.com/nelvko/clash-for-linux-install?tab=readme-ov-file

git clone --branch master --depth 1 https://github.com/nelvko/clash-for-linux-install.git \
  && cd clash-for-linux-install \
  && sudo bash -c '. install.sh; exec bash'

docker

准备

#安装前先卸载操作系统默认安装的docker,
sudo apt-get remove docker docker-engine docker.io containerd runc
#安装必要支持
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release

#添加 Docker 官方 GPG key (可能国内现在访问会存在问题)
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# 阿里源(推荐使用阿里的gpg KEY)
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg


#添加 apt 源:
#Docker官方源
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#阿里apt源
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null


#更新源
sudo apt update
sudo apt-get update

安装

#安装最新版本的Docker
sudo apt install docker-ce docker-ce-cli containerd.io -y
#等待安装完成

# 安装 docker cpmpose
curl -L "https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

#查看Docker版本
sudo docker version

#查看Docker运行状态
sudo systemctl status docker

命令补全工具

sudo apt-get install bash-completion

sudo curl -L https://raw.githubusercontent.com/docker/docker-ce/master/components/cli/contrib/completion/bash/docker -o /etc/bash_completion.d/docker.sh

source /etc/bash_completion.d/docker.sh

安装1panel

curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh

1panel 三方应用商店

https://github.com/okxlin/appstore
1Panel计划任务类型Shell 脚本的计划任务框里,添加并执行以下命令,或者终端运行以下命令,

git clone -b localApps https://github.com/okxlin/appstore /opt/1panel/resource/apps/local/appstore-localApps

cp -rf /opt/1panel/resource/apps/local/appstore-localApps/apps/* /opt/1panel/resource/apps/local/

rm -rf /opt/1panel/resource/apps/local/appstore-localApps

Ragflow

https://ragflow.io/docs/dev/

git clone https://github.com/infiniflow/ragflow.git

cd ragflow/docker
docker compose -f docker-compose.yml up -d
%% 如果ragflow下载失败,使用以下镜像手动下载 %%
docker pull docker.1ms.run/infiniflow/ragflow:v0.16.0

ollma

curl -fsSL https://ollama.com/install.sh | sh

安装ds

ollama run deepseek-r1:8b
ollama run deepseek-r1:1.5b

Comment