顯示具有 nmtui 標籤的文章。 顯示所有文章
顯示具有 nmtui 標籤的文章。 顯示所有文章

2021/08/01

在proxmox上的LXC一直有個問題 今天終於解決了

記錄一下

當部屬完LXC要更新時出現以下的情況


#dnf -y update

Extra Packages for Enterprise Linux 8 - Next - x86_64          0.0  B/s |   0  B     00:00    

Errors during downloading metadata for repository 'epel-next':

  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=epel-next-8&arch=x86_64&infra=stock&content=centos [Could not resolve host: mirrors.fedoraproject.org]

Error: Failed to download metadata for repo 'epel-next': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=epel-next-8&arch=x86_64&infra=stock&content=centos [Could not resolve host: mirrors.fedoraproject.org]


檢查一下 /etc/resolv.conf


cat /etc/resolv.conf 

# Generated by NetworkManager

search abc.com


發現沒有設定nameserver


可是這個值在佈署LXC時確實有輸入


後來發現可能是 NetworkManager 的問題

導致proxmox 要修改 /etc/resolv.conf 的時候出問題

本來是想直接用 NetworkManager 來處理

直接 nmtui 

結果預設沒有安裝

只好再自己裝

# dnf install -y NetworkManager-tui

在 nmtui 裡設定好 nameserver 後重開

在 /etc/resolv.conf 裡還是沒看到 nameserver


手動把nameserver 加入/etc/resolv.conf 也沒用

重開後就會消失了


於是決定把 NetworkManager 停掉

# systemctl stop NetworkManager.service

# systemctl disable NetworkManager.service


再安裝使用 network-scripts

# dnf install -y network-scripts

# systemctl enable network


改完後重開

再看一下 /etc/resolv.conf

# cat /etc/resolv.conf 

# --- BEGIN PVE ---

search abc.com

nameserver 8.8.8.8

# --- END PVE ---

醬就正常了


https://forum.proxmox.com/threads/proxmox-6-0-9-dns-host-settings-reset-every-time.59434/

https://www.thegeekdiary.com/how-to-disable-networkmanager-in-centos-rhel-8/


2016/02/15

今天本來是要升級OCS
但升到2.2後畫面竟然只有几個數字
而且升級的過程一直不順
想說重裝好了
因為原來是裝在centos 5上
而centos 5 的EOL是2017年3 月
所以試看看裝在centos 7 會不會比較沒問題
查了一下
現在在centos 7 上裝很簡單了
稍微記錄一下
最小安裝後改一下hosts.allow hosts.deny 及selinux
關掉filewalld
systemctl stop firewalld
systemctl disable firewalld

再裝一下net-tools及 epel-release
epel-release是用來加入額外repo
安裝mariadb
yum install mariadb-server -y
systemctl start mariadb
systemctl enable mariadb

修改mariadb的root密碼及一些安全設定
mysql_secure_installation

再來安裝ocs
yum install -y ocsinventory-server ocsinventory-reports

因為加入了epel-release 所以系統會把所有相依性的套件一次裝好

啟動httpd服務
systemctl start httpd
sytemctl enable httpd

接下來就可以進入web介面 依畫面指示進行接下來的安裝動作了
http://ocs-server-ip/ocsreports/

預設登入帳號密碼是 admin/admin 記得要改

修改server ip 使用文字化圖形介面指令
nmtui

目前的版本是2.1.2
再等一陣子看看 應該會直接升到 2.2 到時直接使用yum update就好了