B / Y / U / S
HOME À¥ È£½ºÆà µµ¸ÞÀÎ ¸Å´º¾ó °í°´Áö¿ø ¼³Á¤Á¤º¸ °èÁ¤½Åû 2024-12-27 Friday 
À¥ È£½ºÆÃ
# °øÁö »çÇ×
# ÀÚÁÖ ¹¯´Â Áú¹®
# Áú¹®°ú ´äº¯
# °¡ÀÔ ¹®ÀÇ
Ä¿¹Â´ÏƼ
# ÀÚÀ¯°Ô½ÃÆÇ
# ¸®´ª½ºÆÁ
# ¾ÆÀÌÅ¥ Å×½ºÆ®
# ³»È¨ ¼Ò°³
# °Ö·¯¸®
# ÀÚ·á½Ç

  ¸®´ª½ºÆÁ  Go Unix Power Tools Online Book Go Bash Guide
Read No. 113 article 2002-02-24 08:41:57
NickName   Ç®ºñ´© [ȨÆäÀÌÁö]
Subject   ¹öÃÄ È£½ºÆ® µµ¿òÀÌ ½©~
¿øº» : http://lse.pe.kr/board/read.php?table=tip&no=102


vhuser.sh

#!/bin/bash

######DEFINE#####
#IP=`ifconfig | grep inet | sed -e 's/:/ /g' | awk '{print $3}'`
IP="211.47.121.86"
DOMAIN="coolamp.net"
HTTP="/usr/local/apache/conf/httpd.conf"
DNS="/var/named/coolamp.net.db"
UDIR="/home/$1"
WWW="www"
CGI="cgi-bin"
NAMED=`/etc/rc.d/init.d/named restart`
HTTPD=`/usr/local/apache/bin/apachectl restart`



######MAKE USER#####
useradd $1
passwd $1

#####DNS HOST ADD#######
echo "$1  IN      A   $IP" >> $DNS

######APAHE V.H ADD#######
echo "" >> $HTTP
echo "### $1.$DOMAIN ¼³Á¤" >> $HTTP
echo "<VirtualHost $1.$DOMAIN>" >> $HTTP
echo "          ServerName $1.$DOMAIN" >> $HTTP
echo "          ServerAdmin $1@$DOMAIN" >> $HTTP
echo ""
echo "          DocumentRoot /home/$1/$WWW" >> $HTTP
echo ""
echo "                  Alias /cgi-bin/ \"/home/$1/$CGI/\"" >> $HTTP
echo "                  <Directory \"/home/$1/$CGI/\">" >> $HTTP
echo "                  Options ExecCGI" >> $HTTP
echo "                  AddHandler cgi-script .cgi" >> $HTTP
echo "          </Directory>" >> $HTTP
echo ""
echo "          ErrorLog logs/$1.$DOMAIN-error_log" >> $HTTP
echo "          CustomLog logs/$1.$DOMAIN-access_log common" >> $HTTP
echo "</VirtualHost>" >> $HTTP

########DEAMON RESTART########
$NAMED
$HTTPD

ÀÏ´Ü Àڽſ¡ ¼­¹ö¿¡¼­ »ç¿ë ÇÏ·Á¸é º¯¼ö ÁöÁ¤ ºÎºÐ¿¡¼­ Àڽſ¡ ¼³Á¤¿¡ ¸Â°Ô Àû
¿ë ½ÃÅ°¸é µË
´Ï´Ù.
´Ù¸¥ºÎºÐÀº ¼Õ´ëÁö ¾Ê¾Æµµ Àß µ¹¾Æ °©´Ï´Ù.
À§¿¡ °ÍÀº 2Â÷ µµ¸ÞÀÎ ¹öÃÄ È£½ºÆ®¸¦ 쉡±â µµ¿Í ÁÖ´Â ½©ÀÔ´Ï´Ù.
´ç¿¬È÷ ./vhuser.sh ForSpeed

ID¸¦ ÀÎÀÚ·Î ³Ö¾î ÁÖ¾î¾ß ÇÕ´Ï´Ù.
Áý¿¡¼­ Á¦°¡ »ç¿ëÇÏ°í ÀÖ´Â ½©À̹ǷΠÀß µ¹¾Æ °¥°ÍÀÔ´Ï´Ù.
±â´ÉÀ» º¸°­Çؼ­ 1Â÷ È£½ºÆ®±îÁö Áý¾î ³ÖÀ»¼ö ÀÖ´Â ½©À» ´ÙÀ½ ¹öÀü¿¡ ³» ³õµµ
·Ï ÇÏÁÒ...
¶È°°Àº ÀÛ¾÷À» ¹Ýº¹ÇÏ´Â Á÷¾÷ÀÇ ¹Ýº¹ÀÌ ¸¹Àº SE¹Ç·Î ÇÊ¿ä¿¡ ÀÇÇÑ °£´ÜÇÑ ½©À» 
Â¥´Â°Íµµ ¶§·Î
´Â µµ¿òÀÌ ¸¹ÀÌ µË´Ï´Ù^^

ÇãÁ¢ÇÑ ¹Î¼öÀÇ ½©TIPÀÌ¿´½À´Ï´Ù.
Regist Addr [ 192.168.0.2 ] ¸ñ·Ïº¸±â À­±Û ¾Æ·§±Û
Á¤±ÔÇ¥Çö½Ä [ »ó¼¼ °Ë»ö ]
Page Loading [ 0.02 Sec ] SQL Time [ 0 Sec ]

Copyleft 1999-2024 by JSBoard Open Project
Theme Designed by IDOO And follow GPL2

°³ÀÎÁ¤º¸ Ãë±Þ¹æħ ÀÌ¿ë ¾à°ü »çÀÌÆ® ¸Ê ¾îµå¹Î °ü¸®