Posted
Filed under 프로그래밍
XenServer 초간단 설치
 
1.XenServer 다운
http://xenserver.org/overview-xenserver-open-source-virtualization/download.html
 
2.XenServer 설치
시디굽고 리눅스 설치하듯이 설치
 
3.XenCenter 다운
http://xenserver.org/overview-xenserver-open-source-virtualization/download.html
 
4.XenCenter 설치
윈도우 프로그램 설치하듯이 그냥 설치
 
5.XenServer ISO 저장소 생성
 
# vgs <- 현재 볼륨 상황
 
# lvcreate -L 30G -n isoImages VG_XenStorage-8eaf2053-79bc-3284-1b70-13a714db05eb <- 용량 적당히 변경,VG_부터는 자기 볼륨으로 변경
 
# mkfs.ext3 /dev/VG_XenStorage-8eaf2053-79bc-3284-1b70-13a714db05eb/isoImages <- 마찬가지로 VG_부터는 자기 볼륨으로 변경
 
# mkdir /mnt/isoImages
 
# vgchange -a y
 
# xe sr-create name-label=ISOimages type=iso device-config:location=/mnt/isoImages/ device-config:legacy_mode=true content-type=iso
 
# xe sr-list <- 파티션 확인
 
# mount /dev/VG_XenStorage-8eaf2053-79bc-3284-1b70-13a714db05eb/isoImages /mnt/isoImages/ <- 마찬가지로 VG_부터는 자기 볼륨으로 변경
 
5.이미지 다운로드
 
# cd /mnt/isoImages
 
# wget http://ftp.neowiz.com/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso
 
# wget http://ftp.neowiz.com/ubuntu-releases/13.10/ubuntu-13.10-server-amd64.iso

6.해당 이미지로 VM생성해서 설치

7.끝
2014/02/28 16:29 2014/02/28 16:29
Posted
Filed under 프로그래밍
First we need to check free local disk space on XenServer:
 
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             4.0G  1.9G  1.9G  51% /
none                  373M  4.0K  373M   1% /dev/shm
/opt/xensource/packages/iso/XenCenter.iso
                       52M   52M     0 100% /var/xen/xc-install
#
 
You can clearly see there is not much disk space left on /dev/sda1.
 
Now you need to create a new Logical Volume (LV) that will have enough space for our ISO images.
 
First check the available physical disk space:
 
# pvs
  PV         VG                                                 Fmt  Attr PSize   PFree 
  /dev/sda3  VG_XenStorage-8eaf2053-79bc-3284-1b70-13a714db05eb lvm2 a-   457.75G 199.96G
#
 
Then check the Volume Group(s) (VG):
 
# vgs
  VG                                                 #PV #LV #SN Attr   VSize   VFree 
  VG_XenStorage-8eaf2053-79bc-3284-1b70-13a714db05eb   1   7   0 wz--n- 457.75G 199.96G
#
 
Then create the new LV in the available VG (I have only one):
 
# lvcreate -L 10G -n isoImages VG_XenStorage-8eaf2053-79bc-3284-1b70-13a714db05eb
 
Now you have to make a filesystem on this new LV. I've made mine ext3.
 
# mkfs.ext3 /dev/VG_XenStorage-8eaf2053-79bc-3284-1b70-13a714db05eb/isoImages
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1310720 inodes, 2621440 blocks
131072 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
80 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
 
Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
 
This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
#
 
Now you need to create a mount point:
 
# mkdir /mnt/isoImages
 
You need to make the LV in the VG known to the kernel:
 
# vgchange -a y
 
Create the repository:
 
# xe sr-create name-label=ISOimages type=iso device-config:location=/mnt/isoImages/ device-config:legacy_mode=true content-type=iso
 
You should see your new repository listed in XenServer:
 
# xe sr-list
 
uuid ( RO)                : 3f492136-d7ba-360e-8a83-c324be44a676
          name-label ( RW): ISOimages
    name-description ( RW):
                host ( RO): XenBelut
                type ( RO): iso
        content-type ( RO): iso
 
#
 
Now you can mount the new FS:
 
# mount /dev/VG_XenStorage-8eaf2053-79bc-3284-1b70-13a714db05eb/isoImages /mnt/isoImages/
 
You can modify the /etc/fstab file to mount the repository at boot.


http://komplog.blogspot.kr/2012/11/xenserver-61-create-local-iso-repository.html

2014/02/25 18:45 2014/02/25 18:45
Posted
Filed under 프로그래밍
nginx 에서 도메인명이 길거나 여러개의 도메인을 추가할때 

could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32

이런 오류가 날때가 있는데

http {
       server_names_hash_bucket_size 64;

이거 추가해주고 재실행하면 해결된다.

2014/02/14 18:53 2014/02/14 18:53
Posted
Filed under 프로그래밍
server{
    listen 80;
    server_name example.com;
 
    access_log /home/path_to_site/access.log;
    error_log /home/path_to_site/error.log;
 
    location / {
        proxy_pass http://0.0.0.0:8002;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

2014/02/12 16:21 2014/02/12 16:21
Posted
Filed under 프로그래밍/PHP
UTF-8로 된 CSV를 엑셀에서 불러오면 한글이 깨진다.

왜일까? 이유는...복잡하다.

그냥 파일의 맨 처음에 아래 한줄 넣어주면 잘 된다.

fputs($fp,"\xEF\xBB\xBF");


2014/01/23 18:28 2014/01/23 18:28
Posted
Filed under 회사이야기
재미지게 만들려고 했는데~ ㅋㅋㅋ


사용자 삽입 이미지
2014/01/09 11:49 2014/01/09 11:49
Posted
Filed under 프로그래밍
google,apple에 이어 통신3사(SKT,LGT,KT) 앱스토어에도 등록하기로 했다.
inapp 영수증을 서버에서 검증하지 못한다면 100% 뚤리게 되어있다.

그래서 각 사의 server-to-server 영수증 검증 관련 내용을 올린다.

SKT : 기본제공함.
LGT : 요청하면 메일로 보내줌 (1월달부터 공식 제공 예정이라고함).
KT : 요청하면 메일로 보내줌

기본적으로 제공해야하는것을 왜 요청해야 보내주는지 알수가 없다....


2013/12/17 15:06 2013/12/17 15:06