美文网首页
pve安装后设置-自用

pve安装后设置-自用

作者: 国能日新_李冬冬 | 来源:发表于2020-03-19 14:57 被阅读0次

强烈建议先删除企业源:

rm /etc/apt/sources.list.d/pve-enterprise.list

export LC_ALL=en_US.UTF-8

apt update && apt -y install git && git clone https://github.com/ivanhao/pvetools.git

cd pvetools

./pvetools.sh

####################安装apt-fast

git clone https://github.com/ilikenwf/apt-fast.git

cd apt-fast

cp apt-fast /usr/local/sbin/

chmod +x /usr/local/sbin/apt-fast

cp apt-fast.conf /etc

apt-get install aria2

###Bash

cp completions/bash/apt-fast /etc/bash_completion.d/

chown root:root /etc/bash_completion.d/apt-fast

. /etc/bash_completion

###Zsh

cp completions/zsh/_apt-fast /usr/share/zsh/functions/Completion/Debian/

chown root:root /usr/share/zsh/functions/Completion/Debian/_apt-fast

source /usr/share/zsh/functions/Completion/Debian/_apt-fast

###Fish

cp completions/fish/apt-fast.fish /etc/fish/conf.d/completions/

chown root:root /etc/fish/conf.d/completions/apt-fast.fish

source /etc/fish/conf.d/completions/apt-fast.fish

#######################

#######################常用软件列表

apt-fast install ifupdown2 lshw ethtool axel iperf3 htop iotop curl

######################## R8168

#安装内核,安装r8168-dkms

######################## 神之操作

apt-fast install dkms

apt --fix-broken install

########################首先是常规的pve操作内容,请用root用户,包括编译部分也要用root用户编译,老外的建议,不清楚为什么。开启IOMMU分组###功能编辑  /etc/default/grub,将以下部分修改如下:

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on pcie_acs_override=downstream"

GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on pcie_acs_override=downstream"

amd的cpu请将intel_iommu=on 改为 amd_iommu=on

###然后是修改/etc/modules文件, 添加如下内容:

vfio

vfio_iommu_type1

vfio_pci

vfio_virqfd

###然后执行

update-initramfs -u -k all

###再执行

dmesg | grep -e DMAR -e IOMMU -e AMD-Vi

######################## 锁软件锁内核

apt-mark hold linux-tools-5.0-dbgsym

apt-mark hold linux-tools-5.0

apt-mark hold pve-headers-5.0.18-1-pve

apt-mark hold pve-kernel-5.0.18-1-pve

######################## 禁用 R8169

sh -c 'echo blacklist r8169 >> /etc/modprobe.d/blacklist.conf'

####################### 全双工

ethtool -s eth0 speed 1000 duplex full

#######################安装syncting

# 添加公钥:

curl -s https://syncthing.net/release-key.txt |  apt-key add -

# 添加deb源:

echo "deb https://apt.syncthing.net/ syncthing stable" |  tee /etc/apt/sources.list.d/syncthing.list

# Update and install syncthing:

apt-get update

apt-get install syncthing

apt-get install apt-transport-https

在Ubuntu 18.04上配置Syncthing

现在我们已经安装了syncthing,让我们继续进行配置部分,由于Ubuntu 18.04是systemd兼容的(参考:Systemd入门教程),我们可以创建systemd单元文件来管理syncthing服务,systemd的服务文件由Syncthing提供,可以在etc/linux-systemd中找到:

  vim /etc/systemd/system/syncthing@.service

添加以下内容:

[Unit]

Description=Syncthing - Open Source Continuous File Synchronization for %I

Documentation=man:syncthing(1)

After=network.target

[Service]

User=%i

ExecStart=/usr/bin/syncthing -no-browser -gui-address="192.168.1.20:8384" -no-restart -logflags=0

Restart=on-failure

SuccessExitStatus=3 4

RestartForceExitStatus=3 4

[Install]

WantedBy=multi-user.target

将192.168.1.20替换为你的系统IP地址,然后更新systemd服务列表:

  systemctl daemon-reload

然后启动syncthing服务:

  systemctl start syncthing@user

例如:

  systemctl start syncthing@root

  systemctl start syncthing@jmutai

########################最后通过apt-mark命令屏蔽掉这几个涉及的安装包解决apt总是失败的问题:

apt-mark hold zfs-zed

apt-mark hold zfs-dkms

apt-mark hold zfs-initramfs

相关文章

  • pve安装后设置-自用

    强烈建议先删除企业源: rm /etc/apt/sources.list.d/pve-enterprise.lis...

  • pve安装koolshare旁路由

    一、 安装pve 下载pve镜像,刻录到u盘,像安装操作系统一样安装pve, 过程略 二、安装openwrt 1、...

  • Linux内核版本升级或降级

    测试系统PVE 7.0 PVE内核升级或降级 当前版本信息 查找内核 安装内核 查看当前系统内核启动顺序 修改内核...

  • pve默认hosts文件内容

    我不小心。。在pve安装了cloud-init。。。直接把我的配置hosts和hostname改了,导致pve w...

  • pve 安装koolshare

    简介 好久没有更新博客了,因为公司有某些特殊需求,所以打算在pve上安装一个koolshare去做旁路由来上网 创...

  • PVE 安装volumio

    1、上传IMG文件 2、创建Linux虚拟机,2G RAM,8G IDE 3、dd if=/var/lib/vz/...

  • Debian - W: Some index files fai

    今天在折腾PVE安装桌面lxde后出现这样的问题 错误的非常明显“cloud not resolve”,很明显是D...

  • VA 设置

    自用的VA设置

  • PVE下安装UNRAID

    转载请注明出处 1. 制作IMAGE磁盘镜像 懒人专用可以直接看第六节 下载unraid 6.10.2开心版-恩山...

  • Fiddle Android APP调试工具 配置文档

    安装fiddle 打开安装后的fiddle tools -> options ->设置允许HTTPS链接,设置允许...

网友评论

      本文标题:pve安装后设置-自用

      本文链接:https://www.haomeiwen.com/subject/yjklyhtx.html