# centos7에서 vnc 구성하기

<table border="1" id="bkmrk-perplexity%EC%97%90%EC%84%9C-%EC%83%9D%EC%84%B1%ED%95%9Cai%EC%9D%B4%EB%AF%B8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>[![image.png](http://igoni.kr/uploads/images/gallery/2026-02/scaled-1680-/af7image.png)](http://igoni.kr/uploads/images/gallery/2026-02/af7image.png)

</td></tr><tr><td class="align-right">perplexity에서 생성한AI이미지</td></tr></tbody></table>

1. VNC패키지 설치 ```shell
    $ yum install -y tiger* 
    ```
2. 설정파일 복사 ```shell
    $ cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@\:2.service
    ```
3. 설정파일 편집 ```shell
    $ vi /etc/systemd/system/vncserver@\:2.service
    ...
    ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
    ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i -geometry 1024x768"     
    PIDFile=/root/.vnc/%H%i.pid
    ```
4. 설정파일 읽어오기 ```shell
    $ systemctl daemon-reload
    ```
5. vnc 패스워드 파일 성성 (두번입력) ```shell
    $ vncpasswd
    Password:
    Password: 
    ```
6. VNC 서비스 활성화 및 실행 ```shell
    $ systemctl enable vncserver@:2.service --now
    ```
7. VNC 서비스 중지 ```shell
    $ systemctl stop vncserver@:2.service
    ```
8. vnc서비스 자동으로 비활성화 ```shell
    $ systemctl disable vncserver@:2.service
    ```