PVE安装与配置
<h3>一、proxmox官网</h3>
<p><code>https://www.proxmox.com/en/</code>
下载ISO进行安装,安装时一路下一步即可.</p>
<h3>二、取消每次登陆时的订阅提示</h3>
<h4>1、把文件中if(data.status!=='Active') 替换为if(false)</h4>
<pre><code class="language-bash">sed -i_orig "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service</code></pre>
<p>或手工修改:
在/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 文件中找到if(data.status!=='Active') 替换为if(false)</p>
<p>这样将会在修改文件的同时生成一个扩展名为“_orig”的备份文件。
若重新登录还有提示,请清空浏览器缓存再试。</p>
<h3>三、安装完后,先取消订阅源</h3>
<pre><code class="language-bash">rm -f /etc/apt/sources.list.d/pve-enterprise.list
wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg</code></pre>
<h3>四、添加源</h3>
<h4>1、添加源到:/etc/apt/sources.list.d/pve-install-repo.list</h4>
<pre><code class="language-bash">cat >> /etc/apt/sources.list.d/pve-install-repo.list << EOF
deb http://download.proxmox.com/debian/pve stretch pve-no-subscription
deb http://download.proxmox.wiki/debian/pve stretch pve-no-subscription
deb http://download.proxmox.wiki/debian/pve buster pve-no-subscription
EOF</code></pre>
<h4>2、建议增加国内源到 /etc/apt/sources.list</h4>
<pre><code class="language-bash">cat >> /etc/apt/sources.list << EOF
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
EOF</code></pre>
<h4>3、更新系统并安装常用工具</h4>
<pre><code class="language-bash">apt-get update -y && apt-get dist-upgrade -y && apt-get install net-tools vim -y</code></pre>
<h3>五、设置时钟同步</h3>
<h4>1、24小时制设置</h4>
<pre><code class="language-bash">cat >> /root/.bashrc << EOF
alias date='date +"%a %b %d %H:%M:%S:%Z %Y"'
EOF
source .bashrc</code></pre>
<h4>2、设置时钟同步</h4>
<pre><code class="language-bash">apt-get install ntpdate -y
ntpdate 120.25.108.11
echo "0 * * * * root /usr/sbin/ntpdate 120.25.108.11 > /dev/null 2>&1" >> /etc/crontab
/etc/init.d/cron restart</code></pre>
<h3>六、配置CEPH</h3>