CentOS 7.x 500 OOPS vsftpd anonymous refusing


CentOS 7 minimal 에 vsftpd 를 설치하고 anonymous 접속 설정을 하고 테스트를 해보니 아래 처럼 에러 메시지가 나면서 접속이 안되는군요~

C:\>ftp 192.168.1.26
192.168.1.26에 연결되었습니다.
220 (vsFTPd 3.0.2)
200 Always in UTF8 mode.
사용자(192.168.1.26:(none)): anonymous
331 Please specify the password.
암호:
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
500 OOPS: 원격 호스트에 의해 연결이 닫혔습니다.

분명히 사용하는 서버에서 vsftpd.conf 파일의 환경설정 값을 제대로 넣었는데도 그러네요~

anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_umask=0022

차이점은 root 이외 유저가 있느냐 없느냐의 차이였습니다.

useradd 명령어로 유저 하나 생성하고 접속하니 잘 됩니다.



블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

VMware ESXi CentOS 7.x LVM 루트폴더 확장


디스크 용량을 기존 16G 로는 부족하여 용량을 확장하는 방법입니다.

다행히 요즘은 LVM 볼륨으로 되어 있어서 확장이 가능합니다.

먼저 VMware ESXi 호스트에서 디스크 용량을 늘려서 VM 시스템을 시작합니다.


fdisk /dev/sda 명령어로 늘어난 만큼 남아있는 파티션을 Linux LVM 파티션 형태로 추가합니다.

pvcreate /dev/sda3 로 Physical volume 을 생성하여야 합니다.

[root@localhost ~]# pvcreate /dev/sda3
  Device /dev/sda3 not found (or ignored by filtering).
[root@localhost ~]# reboot
login as: root
root@192.168.1.26's password:
Last login: Tue Sep 19 12:32:31 2017 from 192.168.1.2
[root@localhost ~]# pvcreate /dev/sda3
  Physical volume "/dev/sda3" successfully created.
[root@localhost ~]# pvscan
  PV /dev/sda2   VG cl              lvm2 [15.00 GiB / 0    free]
  PV /dev/sda3                      lvm2 [44.00 GiB]
  Total: 2 [59.00 GiB] / in use: 1 [15.00 GiB] / in no VG: 1 [44.00 GiB]

파티션 잡을때 Warning 메시지가 있었듯이 재부팅을 한번 해주어야 합니다.

pvdisplay 명령어로 볼륨명 VG Name 을 확인합니다.

[root@localhost ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               cl
  PV Size               15.00 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              3839
  Free PE               0
  Allocated PE          3839
  PV UUID               hq499Q-zVoS-mZKD-zCWX-D4xf-ns5x-2L3Pui

  "/dev/sda3" is a new physical volume of "44.00 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sda3
  VG Name
  PV Size               44.00 GiB
  Allocatable           NO
  PE Size               0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               KJ8ada-YjiU-gx9e-oSpd-K4AV-9KWK-F9tnGn

위에서 확인한 VG Name 을 vgextend 명령어로 확장합니다.

[root@localhost ~]# vgextend cl /dev/sda3
  Volume group "cl" successfully extended
[root@localhost ~]# vgdisplay
  --- Volume group ---
  VG Name               cl
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               58.99 GiB
  PE Size               4.00 MiB
  Total PE              15102
  Alloc PE / Size       3839 / 15.00 GiB
  Free  PE / Size       11263 / 44.00 GiB
  VG UUID               ny3hEe-LQMt-0UYe-nVMT-hHlG-kRhN-y3LqmT

그리고 vgdisplay 명령어로 확장 가능한 Free PE / Size 값을 확인합니다.

[root@localhost ~]# lvextend /dev/cl/root -l +11263
  Size of logical volume cl/root changed from 13.39 GiB (3429 extents) to 57.39 GiB (14692 extents).
  Logical volume cl/root successfully resized.

lvextend 명령어로 볼륨 사이즈를 확장합니다.

그리고 이제 resize 를 합니다.

[root@localhost ~]# resize2fs /dev/cl/root
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/cl/root
Couldn't find valid filesystem superblock.
[root@localhost ~]# xfs_growfs /dev/cl/root
meta-data=/dev/mapper/cl-root    isize=512    agcount=4, agsize=877824 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=3511296, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 3511296 to 15044608
[root@localhost ~]# df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/cl-root   58G 1003M   57G   2% /
devtmpfs             910M     0  910M   0% /dev
tmpfs                920M     0  920M   0% /dev/shm
tmpfs                920M  8.5M  912M   1% /run
tmpfs                920M     0  920M   0% /sys/fs/cgroup
/dev/sda1           1014M  139M  876M  14% /boot
tmpfs                184M     0  184M   0% /run/user/0

루트폴더가 아니라면 resize2fs 명령어가 가능하겠지만 운영중인 파티션이라서 xfs_growfs 명령어를 실행합니다.

그리고 df 명령어로 늘어난 사이즈를 확인하면 됩니다.


동영상으로 보기 https://youtu.be/YBMMssFK5q0


블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

CentOS 7.x iscsi 스토리지 생성 및 연결


iscsiadm: No portals fount 이 후로 더 이상 진행이 안되어서 targetcli 로도 해보고 몇 번을 재시도 했는지 모르겠네요~ ㅎ

iSCSI 스토리지 서버를 만들고 iscsi 초기자로 원격 디스크를 마운트하는 방법입니다.


iSCSI 스토리지 서버 설정

scsi-target-utils 를 설치합니다.

yum install epel-release

yum install scsi-target-utils

mkdir /iscsi
dd if=/dev/zero of=/iscsi/disk01.img bs=1M count=10000

10G 이미지 파일을 생성합니다.

vi /etc/tgt/targets.conf

<target iqn.2017-09.com.example:target1>
    backing-store /iscsi/disk01.img
    initiator-address ALL
    #incominguser iscsi pass1234
</target>

또는 간단하게 ( 의미없는 iqn.2017-09.com.example 생략가능 )

<target target1>
    backing-store /iscsi/disk01.img
    initiator-address ALL
    #incominguser iscsi pass1234
</target>

disk01.img 를 iqn.2017-09.com.example:target1 에 할당합니다.

systemctl enable tgtd
systemctl start tgtd

tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL

tgtadm --mode target --op show 명령어로 잘 되었는지 확인합니다.

아래 클라이언트에서 iscsiadm: No portals found 메시지가 나오면

tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL 명령어를 실행하면 됩니다.


방화벽에서 3260 포트를 열어줍니다.

firewall-cmd --permanent --zone=public --add-service=iscsi-target

firewall-cmd --reload

아래 작업에서 문구가 나오면

iscsiadm: cannot make connection to 192.168.1.26: Connection refused

selinux 설정을 변경해 주어야 합니다.

vi /etc/selinux/config

#SELINUX=enforcing
SELINUX=disabled

저장 후 reboot 합니다.


여기까지가 iSCSI 스토리지 서버 생성입니다.



iSCSI 스토리지 연결

지금부터는 위에서 생성한 iscsi 를 연결해서 마운트 하는 작업입니다.

yum install iscsi-initiator-utils

그리고 위에서 incominguser 를 설정했다면 아래 처럼 유저 환경설정을 해줍니다.

vi /etc/iscsi/iscsid.conf

node.session.auth.authmethod = CHAP
node.session.auth.username = iscsi
node.session.auth.password = pass1234

이제 연결 작업입니다.

iscsiadm -m discovery -t st -p 192.168.1.26
iscsiadm -m node --targetname iqn.2017-09.com.example:target1 --portal 192.168.1.26:3260 --login

연결 해제는 아래처럼 하면 됩니다.

iscsiadm -m node --targetname iqn.2017-09.com.example:target1 --portal 192.168.1.26:3260 --logout
iscsiadm -m discovery --portal 192.168.1.26:3260 --op=delete

아직 연결 해제는 하지 마세요~

연결이 잘 되었는지는 fdisk -l 로 확인하면 됩니다.

원래 없던 /dev/sdb 가 보인다면 제대로 연결이 된 것입니다.


fdisk /dev/sdb

mkfs.ext4 /dev/sdb1

mkdir /mnt/sdb1

mount /dev/sdb1 /mnt/sdb1

이제 fdisk 로 파티션을 잡은 뒤에 포맷 후 마운트를 하면 됩니다.


블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

CentOS 7.x PXE 서버 설정

LINUX 2017. 9. 13. 16:20

CentOS 7.x PXE 서버 설정


리눅스 PXE Boot 서버 설정입니다.

설치 CD없이 PXE 로 설치하는 방법입니다. DNSMASQ 대신에 DHCP + TFTP-SERVER 로 대체하여도 됩니다.


1. 패키지 설치

yum install dnsmasq vsftpd syslinux

tftp-server 는 dnsmasq 로 할 때는 설치하지 않아도 됩니다.

대신에 /var/lib/tftpboot 폴더는 만들어 주거나 다른 폴더로 대체하여야 합니다.


2. dnsmasq 설정

vi /etc/dnsmasq.d/dhcp.conf

dhcp-range=192.168.1.3,proxy
enable-tftp
tftp-root=/var/lib/tftpboot
pxe-service=x86PC, "PXE-Linux on 192.168.1.3", "pxelinux.0", 192.168.1.3

굵은 글씨 부분을 자신의 환경에 맞게 수정하면 됩니다.

좀 더 복잡한 설정 :


3. CentOS 7.x ISO 다운로드 및 복사

wget http://ftp.daumkakao.com/centos/7.3.1611/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso
mkdir /mnt/centos7
mount -o loop CentOS-7-x86_64-Minimal-1611.iso /mnt/centos7
cp -av /mnt/centos7/* /var/ftp/pub/


4. PXE Boot 디렉토리 작업

mkdir /var/lib/tftpboot/pxelinux.cfg
mkdir /var/lib/tftpboot/centos7
cp -rv /usr/share/syslinux/* /var/lib/tftpboot/
cp -v /mnt/centos7/images/pxeboot/vmlinuz /var/lib/tftpboot/centos7/
cp -v /mnt/centos7/images/pxeboot/initrd.img /var/lib/tftpboot/centos7/


5. PXE Boot 메뉴 작업

vi /var/lib/tftpboot/pxelinux.cfg/default

default menu.c32
prompt 0
timeout 100
ontimeout 1
menu title ### PXE Boot Menu ###
label 1
menu label ^1) Install CentOS 7 x64 (ftp://192.168.1.26/pub)
kernel centos7/vmlinuz
append initrd=centos7/initrd.img method=ftp://192.168.1.3/pub devfs=nomount
label 2
menu label ^2) Install CentOS 7 x64 (http://mirror.centos.org)
kernel centos7/vmlinuz
append initrd=centos7/initrd.img method=http://mirror.centos.org/centos/7/os/x86_64/ devfs=nomount


6. 데몬 시작

systemctl enable dnsmasq
systemctl enable vsftpd
systemctl start dnsmasq
systemctl start vsftpd


7. 방화벽 설정

firewall-cmd --permanent --zone=public --add-service=ftp
firewall-cmd --permanent --zone=public --add-service=dns
firewall-cmd --permanent --zone=public --add-service=dhcp
firewall-cmd --permanent --zone=public --add-port=69/udp
firewall-cmd --permanent --zone=public --add-port=4011/udp
firewall-cmd --reload


이제 설정이 모두 완료되었습니다.

reboot 으로 재부팅 한번 하고 난뒤에 테스트 하면 됩니다.


PXE 설치 동영상 보기 https://youtu.be/QkMbobbBrEU



dnsmasq 대신에 dhcp + tftp-server 로 하는 방법입니다.

위의 1번 과정에서 yum install tftp-server dhcp vsftpd syslinux


2번 과정을 아래로 대체합니다.

vi /etc/xinet.d/tftp

service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /var/lib/tftpboot
        disable                 = no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

disable = yes 를 disable = no 로 변경 후 저장

systemctl enable tftp

systemctl start tftp


dhcp 설정

vi /etc/dhcp/dhcpd.conf

subnet 192.168.1.0 netmask 255.255.255.0 {
    range dynamic-bootp 192.168.1.100 192.168.1.200;
    option domain-name-servers 8.8.8.8, 8.8.4.4;
    option broadcast-address 192.168.1.255;
    option routers 192.168.1.1;
}
filename "pxelinux.0";


systemctl enable dhcpd

systemctl start dhcpd

그리고 방화벽 설정에서

--add-service=dns 와 --add-port=4011/udp 는 필요가 없습니다.


블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

리눅스 letsencrypt 만료 갱신



letsencrypt SSL 인증서는 아쉽게도 90일 지나면 만료가 됩니다.


만료전에 갱신을 하면 좋은데 CRON 으로 letsencrypt-auto renew 명령으로 갱신하려고 했더니 아래 처럼 에러가 나네요~


All renewal attempts failed. The following certs could not be renewed:

  /etc/letsencrypt/live/www.example.com/fullchain.pem (failure)


httpd, nginx 데몬이 실행중 일때는 /var/log/letsencrypt/letsencrypt.log 파일을 보면

"Problem binding to port 443: Could not bind to IPv4 or IPv6.. Skipping" 메시지가 나옵니다.

갱신전에 미리 웹서비스 데몬을 중지한 다음에 갱신하여야 합니다.


Congratulations, all renewals succeeded. The following certs have been renewed:
  /etc/letsencrypt/live/www.example.com/fullchain.pem (success)



갱신시간을 정확하게 90일이 지나는 시분에 맞춰서 크론에 등록해 주면 됩니다.


ls -l /etc/letsencrypt/live 하면 언제 생성이 되었는지 시간을 알 수 있습니다.


크론실행은 매일 실행되게 하고 시간만 맞게 해주면 됩니다.




CentOS 6.x 버전은 letsencrypt-auto renew


CentOS 7.x 버전은 letsencrypt renew 입니다.



'LINUX' 카테고리의 다른 글

CentOS 7.x iscsi 스토리지 생성 및 연결  (0) 2017.09.18
CentOS 7.x PXE 서버 설정  (0) 2017.09.13
CentOS 7.x anonymous upload 설정  (0) 2017.08.22
CentOS 7.x VNCSERVER 설치  (0) 2017.08.17
CentOS 7.x KVM 가상화서버 만들기  (0) 2017.08.17
블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

CentOS 7.x anonymous upload 설정



anonymous_enable 옵션은 anonymous 접속이 가능하도록 하는 옵션이지만 읽기 전용입니다.


업로드도 가능하게 하려면 아래의 옵션을 더 추가해주어야 합니다.


anonymous_enable=YES


# anonymous upload

anon_upload_enable=YES

anon_mkdir_write_enable=YES

anon_other_write_enable=YES

anon_umask=0022


anon_other_wirte_enable=YES 는 수정 및 삭제도 할 수 있게해주는 옵션입니다.

anon_umask=0022 은 파일은 644로, 디렉토리는 755로 생성되도록 하는 옵션입니다.


그리고 퍼미션을 변경하여야 합니다.


# chmod 777 /var/ftp/pub


아니면 폴더를 더 만들어서 해도 됩니다.


# mkdir -p /var/ftp/pub/incoming

# chmod 777 /var/ftp/pub/incoming


systemctl restart vsftpd 로 재시작해서 테스트 하시면 됩니다.


'LINUX' 카테고리의 다른 글

CentOS 7.x PXE 서버 설정  (0) 2017.09.13
리눅스 letsencrypt 만료 갱신  (0) 2017.08.29
CentOS 7.x VNCSERVER 설치  (0) 2017.08.17
CentOS 7.x KVM 가상화서버 만들기  (0) 2017.08.17
CentOS 7.x GNOME GUI 설치  (0) 2017.08.17
블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

CentOS 7.x VNCSERVER 설치

LINUX 2017. 8. 17. 17:32

CentOS 7.x VNCSERVER 설치



리눅스에서 tigervnc-server 를 설치하고 윈도우에서 원격 데스크톱 처럼 vnc viewer 로 컨트롤이 가능합니다.


yum install tigervnc-server


▶ VNC 설정


[root@localhost ~]# vncserver


You will require a password to access your desktops.


Password:

Verify:


New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1


Creating default startup script /root/.vnc/xstartup

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/localhost.localdomain:1.log


localhost.localdomain 대신에 서버의 아이피주소를 치면 됩니다.



▶ VNC 방화벽 허용


firewall-cmd --permanent --zone=public --add-port=5901/tcp

firewall-cmd --reload



▶ VNC 종료


[root@localhost ~]# vncserver -list


TigerVNC server sessions:


X DISPLAY #     PROCESS ID

:1              9113

[root@localhost ~]# vncserver -kill :1

Killing Xvnc process ID 9113


사용방법은 간단합니다.


'LINUX' 카테고리의 다른 글

리눅스 letsencrypt 만료 갱신  (0) 2017.08.29
CentOS 7.x anonymous upload 설정  (0) 2017.08.22
CentOS 7.x KVM 가상화서버 만들기  (0) 2017.08.17
CentOS 7.x GNOME GUI 설치  (0) 2017.08.17
CentOS 7.x xen yum install  (0) 2017.08.14
블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

CentOS 7.x KVM 가상화서버 만들기



리눅스에 kvm VM(VPS) 을 생성해 보도록 하겠습니다.


Bios 에서 CPU Virtualization 옵션이 켜져 있어야 하며,


VMware Workstation Player 환경이라면 Intel VT-x/EPT or AMD-V/RVI 옵션을 켜야합니다.


VirtualBox 환경에서는 안되더군요~


cdrom 옵션 대신에 location 옵션으로 CentOS 와 Ubuntu 배포 버전을 설치할 수 있습니다.



▶ 관련 패키지 설치


# yum -y install libvirt qemu-kvm virt-install


설치후에 qemu-kvm 이 정상적으로 로드가 되었는지 확인합니다.


[root@localhost ~]# lsmod | grep kvm

kvm_intel             170181  0

kvm                   554609  1 kvm_intel


위에 처럼 나오면 정상입니다.



▶ libvirt 데몬 시작


# systemctl enable libvirtd

# systemctl start libvirtd



▶ 가상 VM 설치


virt-install \

--name c6-a \

--os-type linux \

--os-variant rhel6 \

--hvm \
--connect=qemu:///system \
--vcpus 1 \

--ram 1024 \

--disk path=/var/lib/libvirt/images/c6-a.img,size=10 \

--graphics none \

--console pty \

--location http://ftp.daumkakao.com/centos/6.9/os/x86_64/ \

--extra-args 'console=ttyS0'


우분투는 --location 옵션에 http://ftp.daumkakao.com/ubuntu/dists/xenial/main/installer-amd64/ 을 입력하면 됩니다.


위 명령어를 실행하고 한참있으면 설치 옵션을 묻습니다.


Text 모드로 선택하고 설정 옵션을 모두 설정을 합니다.


VM 콘솔에서 메인 콘솔로 빠질려면 Ctrl + ] 키를 누르면 됩니다.


진입하려면 virsh console c6-a 명령으로 진입이 가능합니다.



VM 컨트롤 virsh 명령어는 https://ivps.tistory.com/403 여기를 참고하세요~


VM 복제는 https://ivps.tistory.com/404 여기를 참고하세요~

'LINUX' 카테고리의 다른 글

CentOS 7.x anonymous upload 설정  (0) 2017.08.22
CentOS 7.x VNCSERVER 설치  (0) 2017.08.17
CentOS 7.x GNOME GUI 설치  (0) 2017.08.17
CentOS 7.x xen yum install  (0) 2017.08.14
리눅스 yum --skip-broken to work around the problem  (0) 2017.08.02
블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

CentOS 7.x GNOME GUI 설치

LINUX 2017. 8. 17. 10:23

CentOS 7.x GNOME GUI 설치



CentOS 7.x minimal 로 설치를 하면 startx 가 실행이 되지 않습니다.


그놈 gui 를 설치해보겠습니다.


# yum groupinstall "GNOME Desktop" "Server with GUI" "Graphical Administration Tools"


아래에서 빨간색 굵은 글씨를 설치하면 됩니다.


[root@localhost ~]# yum grouplist

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: mirror.oasis.onnetcorp.com

 * extras: data.nicehosting.co.kr

 * updates: data.nicehosting.co.kr

Installed Environment Groups:

   Server with GUI

   GNOME Desktop

Available Environment Groups:

   Minimal Install

   Compute Node

   Infrastructure Server

   File and Print Server

   Basic Web Server

   Virtualization Host

   KDE Plasma Workspaces

   Development and Creative Workstation

Installed Groups:

   Graphical Administration Tools

Available Groups:

   Compatibility Libraries

   Console Internet Tools

   Development Tools

   Legacy UNIX Compatibility

   Scientific Support

   Security Tools

   Smart Card Support

   System Administration Tools

   System Management

Done


Graphical Administration Tools 는 설치해도 되고 안해도 됩니다.


설치가 다 되었으면 "startx" 를 실행하면 됩니다.


CentOS 7.x GNOME GUI 설치



재부팅시에도 gnome gui 가 실행되기를 원하면 아래 명령어를 실행하면 됩니다.


# ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target


reboot 을 하게 되면 GNOME GUI 가 디폴트로 실행이 됩니다.


'LINUX' 카테고리의 다른 글

CentOS 7.x VNCSERVER 설치  (0) 2017.08.17
CentOS 7.x KVM 가상화서버 만들기  (0) 2017.08.17
CentOS 7.x xen yum install  (0) 2017.08.14
리눅스 yum --skip-broken to work around the problem  (0) 2017.08.02
CentOS 7.x NFS 설정 방법  (0) 2017.07.30
블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

CentOS 7.x xen yum install

LINUX 2017. 8. 14. 17:49

CentOS 7.x xen yum install



리눅스에 젠서버를 설치하는 방법입니다.



# yum install centos-release-xen

# yum install xen

# yum update


centos-release-xen 을 먼저 설치하고 xen 을 설치합니다.


그리고 yum update 를 합니다.


# /usr/bin/grub-bootxen.sh


grub-bootxen.sh 를 실행합니다.


이제 재부팅을 하여야 합니다.


# reboot


재부팅 후에 xl info 명령어를 실행하여 보세요.


# xl info

host                   : localhost.localdomain

release                : 4.9.39-29.el7.x86_64

version                : #1 SMP Fri Jul 21 15:09:00 UTC 2017

machine                : x86_64

nr_cpus                : 3

max_cpu_id             : 127

nr_nodes               : 1

cores_per_socket       : 3

threads_per_core       : 1

cpu_mhz                : 2393

hw_caps                : 1f8bfaff:00000000:2c100800:00000900:ffbb2303:00000000:00000001:00000283

virt_caps              : 

total_memory           : 4095

free_memory            : 3022

sharing_freed_memory   : 0

sharing_used_memory    : 0

outstanding_claims     : 0

free_cpus              : 0

xen_major              : 4

xen_minor              : 6

xen_extra              : .3-15.el7

xen_version            : 4.6.3-15.el7

xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64

xen_scheduler          : credit

xen_pagesize           : 4096

platform_params        : virt_start=0xffff800000000000

xen_changeset          : Tue Jun 6 15:35:42 2017 +0100 git:b72626c-dirty

xen_commandline        : placeholder dom0_mem=1024M,max:1024M cpuinfo com1=115200,8n1 console=com1,tty loglvl=all guest_loglvl=all

cc_compiler            : gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)

cc_compile_by          : mockbuild

cc_compile_domain      : centos.org

cc_compile_date        : Tue Jun 20 12:23:47 UTC 2017

xend_config_format     : 4


이번에는 libvirtd 를 설치합니다.


# yum install libvirt libvirt-daemon-xen virt-install

# systemctl enable libvirtd

# systemctl start libvirtd


그리고 VM 을 생성합니다.


# virt-install \

--connect xen:/// \

--name CentOS7 \

--os-type linux \

--os-variant rhel7 \

--vcpus 1 \

--paravirt \

--ram 1024 \

--disk size=20 \

--graphics none \

--location http://ftp.daumkakao.com/centos/7.3.1611/os/x86_64/ \

--extra-args 'text console=com1 utf8 console=hvc0'


위의 명령어를 실행하면 아래 처럼 화면이 뜹니다.


CentOS 7.x xen yum install


2번 Use text mode 를 선택하였습니다.



CentOS 7.x xen yum install


9번을 제외한 나머지 숫자에 [x] 가 되어야 합니다.


해당하는 숫자를 입력해서 정보를 기입합니다.


이제 b 를 눌러서 설치를 진행합니다.


CentOS 7.x xen yum install


설치하는데 시간이 좀 걸리네요~


CentOS 7.x xen yum install


여기서 엔터를 치면 설치 에러가 뜨네요~



"internal error: libxenlight failed to create new domain" 이라는 에러가 발생하네요~


이유는 알아봐야겠습니다.


VMware Workstation Player 환경에서도 안되는군요~



KVM 으로 설치를 해봐야겠습니다.


KVM 가상VM 설치는 https://ivps.tistory.com/324 여기를 참고하세요~



블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,