[40] 종합문제(2)

|


- 2015.01.02




[문제]


어제 종합문제에 이은 문제.


dns, web : 192.168.1.10

sub.it.com

xe 페이지 뜨도록 설정


db : 192.168.1.20

        db : subuser, subdb




[db 서버]


# mysql -u root -p mysql

mysql> create database subdb;

mysql> grant all privileges on subdb.* to 'subuser'@'192.168.1.10' identified by 'samadal' with grant option;




[dns, web 서버]


php 설치


# rpm -ivh php*

오류: Failed dependencies:

        libXpm.so.4 is needed by php-gd-5.3.3-38.el6.i686

        libodbc.so.2 is needed by php-odbc-5.3.3-38.el6.i686

        libpq.so.5 is needed by php-pgsql-5.3.3-38.el6.i686


# rpm -ivh libXpm-3.5.10-2.el6.i686.rpm

# rpm -ivh php* --nodeps


dns 설정

# vi /var/named/it.z

     15 sub     IN      A       192.168.1.10


# vi /var/named/it.r

     15 10      IN      PTR     sub.it.com.


# /etc/rc.d/init.d/named restart


# mkdir -p /export/home

# useradd -d /export/home/sub sub

# passwd sub


xe 압축해제 후 권한 설정


# chmod o+x /export/home/sub/

# chmod 707 /export/home/sub/public_html/


xe 설정 중 db server ip 는 192.168.1.20 으로 지정




And