公告版位

1. Upload images (raw or qcow2) into OpenStack Controller by using key-pair.
example:
# scp -i <key-pair path> CentOS7.qcow2 root@<Controller IP>:~/

OR

# scp -i <key-pair path> CentOS7.raw root@<Controller IP>:~/

 

2. Login OpenStack Controller by using key-pair.
example:# ssh -i <key-pair path> root@<Controller IP>

3. Upload images into OpenStack Glance,

For QCOW2 image:
# glance image-create --name=<Image Display Name> \
    --disk-format=qcow2 --is-public true \
    --container-format=bare \
    --min-disk <DISK_GB> \
    --min-ram <DISK_RAM> \
    --file ~/CentOS7.qcow2 \
    --progress

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. Convert an image from QCOW2 to RAW
# qemu-img convert -f qcow2 -O raw \
    ~/CentOS-7-x86_64.qcow2 \
    ~/CentOS-7-x86_64.raw

2. Convert an image from RAW to QCOW2
# qemu-img convert -f raw -O qcow2 \
    ~/CentOS-7-x86_64.raw \
    ~/CentOS-7-x86_64.qcow2

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. Create a user (msmuser) for LSI MSM login
# adduser --shell /usr/sbin/nologin --gid 0 --no-create-home msmuser

2. Due to Mirantis OpenStack default root can't login for using password, and only use key pair. For system security, we configure a account/password to SSH login only.
# vim /etc/ssh/sshd_config
--------------------------------
......
......
......
......
......
......
Match User msmuser
PasswordAuthentication yes
--------------------------------

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. LSI MSM package.

2. Unzip .zip file, and then tar .tar.gz file.
# unzip XX.XX.XX.XX_Linux_MSM.zip
# tar zxvf MSM_linux_x64_installer-XX.XX.XX-XX.tar.gz

3. Install alien to covert .rpm, the reference is below,
How to install alien to convert .rpm on OpenStack (Ubuntu 12.04)

4. Going to MSM folder.# cd disk

5. Convert all .rpm files
# alien --scripts *.rpm

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. Backup config
# mv /etc/apt/sources.list /etc/apt/bak.sources.list

2. You can generate sources.list config (Reference: http://repogen.simplylinux.ch/index.php)
# vim /etc/apt/sources.list
---------------------------------------------
###### Ubuntu Main Repos
deb http://tw.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
---------------------------------------------

3. Configure DNS
# vim /etc/resolv.conf
---------------------------------------------
nameserver 8.8.8.8
---------------------------------------------

4. Install alien package
# apt-get update
# apt-get install alien

dreamtails 發表在 痞客邦 留言(0) 人氣()

設定系統時間:

1. 讀取系統目前時間:

# date

or

自訂格式化顯示
# date "+%Y/%m/%d %H:%M:%S"

dreamtails 發表在 痞客邦 留言(0) 人氣()

# find / -type f -size +10G -exec du -h {} \; 2>/dev/null | sort -n | tail -n 10 

/ 為由根目錄找起

-type f 為檔案

-size +10G 為大於10GB

du 為看檔案大小的指令

sort 為排序

tail -n 10 為找倒數10列顯示於螢幕上

dreamtails 發表在 痞客邦 留言(0) 人氣()

安裝必要的packages
# yum install ntp ntpdate ntp-doc

dreamtails 發表在 痞客邦 留言(0) 人氣()

Mac OS X版本: 10.14.6

1. 點選「系統偏好設定」(System Preferences)

2. 點選「共享」(Sharing)

3. 打勾「遠端管理」(Remote Management)後,會跳出一些權限設定,由於我在內部網路,所以我是全勾

4. 勾起了「遠端管理」(Remote Management)後,在視窗右邊點選「電腦設定」(Computer Settings...)

5. 再勾選「VNC檢示程式可以使用密碼來控制螢幕」(VNC viewers may control screen with password:),接下來在右方填入要使用VNC登入的「密碼」(Password),然後再點選「好」(OK)

6. 點選「選項」(Options...)去確認權限,若都OK,那就表示設定完成

dreamtails 發表在 痞客邦 留言(0) 人氣()

Environment:

## Disk devices information.
[root@CentOS ~]# fdisk -l | grep "Disk /dev/sd"
----------------------------------------------------------
Disk /dev/sdb: 3999.7 GB, 3999688294400 bytes
Disk /dev/sdc: 3000.0 GB, 3000034656256 bytes
Disk /dev/sda: 1999.8 GB, 1999844147200 bytes
----------------------------------------------------------

## Only the /dev/sdb is PV.
[root@CentOS ~]# pvscan
----------------------------------------------------------
  PV /dev/sdb   VG vg001   lvm2 [3.64 TiB / 693.88 GiB free]
  Total: 1 [3.64 TiB] / in use: 1 [3.64 TiB] / in no VG: 0 [0   ]
----------------------------------------------------------

## OS has a VG (vg001) currently.
[root@CentOS ~]# vgscan
----------------------------------------------------------
  Reading all physical volumes.  This may take a while...
  Found volume group "vg001" using metadata type lvm2
----------------------------------------------------------

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. Download and install Cygwin x86_64 (https://www.cygwin.com/).
    Cygwin packages include:
        - gcc-core (Devel category)
        - make (Devel category)
        - openssl-devel

2. Download and extract IPMItool source tarabll (http://sourceforge.net/projects/ipmitool/).

3. Execute "Cygwin64 Terminal", go into IPMItool source directory (ex: ipmitool-x.y.zz).

4. Compile IPMItool
    # ./configure --enable-intf-lanplus
    # make

dreamtails 發表在 痞客邦 留言(1) 人氣()

1. 找出/tmp/dir目錄下的無效鏈結
# find /tmp/dir -type l ! -exec test -r {} \; -print

2. 找出目錄下的無效鏈結並刪除它
# find /tmp/dir -type l ! -exec test -r {} \; -print | xargs -n 1 unlink

dreamtails 發表在 痞客邦 留言(0) 人氣()

# yum install vsftpd ftp

dreamtails 發表在 痞客邦 留言(0) 人氣()

Install Virtual Machine Manager and KVM for ubuntu 14.04.02 below,

$ sudo apt-get install qemu-system qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

$ sudo apt-get install virt-manager

$ sudo reboot

dreamtails 發表在 痞客邦 留言(0) 人氣()

index表示法:

        表示法一  my_list[=:<]

        表示法二  my_list = [ 0, 1, 2, 3, 4, 5, 6 ]

        表示法三  my_list = [ -6, -5, -4, -3, -2, -1 ]

dreamtails 發表在 痞客邦 留言(0) 人氣()