搜尋此網誌

2016年10月26日 星期三

libvirt qcow2 格式轉換

- qcow2 to vmdk
qemu-img convert -f qcow2 file.qcow2 -O vmdk file.vmdk


- qed to vmdk
qemu-img convert -f qed file.qed -O vmdk file.vmdk


-qcow2 to qed
qemu-img convert -f qcow2 file.qcow2 -O qed file.qed




2016年10月24日 星期一

UBuntu 安裝 SNMPD

apt-get install snmpd

cp /etc/snmp/snmpd.conf  /etc/snmp/snmpd.conf.bak

nano /etc/snmp/snmpd.conf

找到以下這行,前面加上#
#view    systemview    included   .1.3.6.1.2.1.25.1.1
新增以下這行
view    systemview    included   .1

新增三行
rocommunity  public
syslocation  "Taipei, Taiwan"
syscontact  indychou@gmail.com

Ubuntu的系統還要再安裝mib download
apt-get -y install snmp-mibs-downloader

重啟snmpd服務
/etc/init.d/snmpd restart

確認:
netstat -auntp | grep snmp

snmpwalk -c public -v 2c 192.168.1.1 (IP 自己改)






Ubuntu 設定固定 IP

修改 /etc/network/interfaces
將 DHCP 設定註解掉,然後加入下面的 IP 設定。

例如:
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.10
netmask 255.255.0.0
gateway 192.168.1.254

修改 /etc/resolv.conf
nameserver 168.95.1.1
nameserver 168.95.192.1

sudo ifdown eth0
sudo ifup eth0

2016年10月17日 星期一

安裝完Ubuntu 桌面後要做的15件事

參考文:https://read01.com/RPndg.html

1. 啟用Ubuntu額外軟體庫並更新系統
啟用Canonical的官方合作夥伴提供的Ubuntu額外軟體庫,並且上系統安全補丁和軟體更新。
從左邊menu中打開System Settings -> Software and Updates工具,並檢查所有Ubuntu軟體和其他軟體庫(Canonical 的合作夥伴所提供),點擊關閉按鈕並等待重新加載緩存源樹。

Windows Server 2016 安裝 Docker

Windows Server 上的 Windows 容器
參考文:https://msdn.microsoft.com/zh-tw/virtualization/windowscontainers/quick_start/quick_start_windows_server


2016年10月13日 星期四

修改tomcat 管理者帳號及密碼

修改 tomcat/conf/tomcat-user.xml,
加入使用者帳號其名稱才能使用

修改如下
<tomcat-users>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="tomcat" password="s3cret" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-script,admin-gui"/> //使用者名稱為tomcat,密碼為s3cret,繼承所有開放的權限
</tomcat-users>

manager-gui - allows access to the HTML GUI and the status pages
manager-script - allows access to the text interface and the status pages
manager-jmx - allows access to the JMX proxy and the status pages
manager-status - allows access to the status pages only

設定好了之後重新啟動,開瀏覽器 http://localhost:8080
輸入用戶名和密碼就進入圖形管理介面

搜尋此網誌