BACKRUSH  À¯´Ð½º¸í·É  ´ÙÀ½  ÀÚ·á½Ç  Ascii Table   ¿ø°ÝÁ¢¼Ó  ´Þ·Â,½Ã°£   ÇÁ·Î¼¼½º   ½©
ÁöÇÏö³ë¼±   RFC¹®¼­   SUN FAQ   SUN FAQ1   C¸Þ´º¾ó   PHP¸Þ´º¾ó   ³Ê±¸¸®   ¾Æ½ºÅ°¿ùµå ¾ÆÀÌÇǼ­Ä¡

±Û¾´ÀÌ: ±¸¸£¹Ì ¼­¹ö¼¼Æà ½© ½ºÅ©¸³Æ® Á¶È¸¼ö: 9440

f77-automaster.tar.gz (5 K)


ÆíÁýÇؼ­ »ç¿ëÇϽøé À¯¿ëÇÒ °Í°°³×¿ä^^




Ãâó : http://superuser.co.kr












#!/bin/bash
#########################################################
##### À¥È£½ºÆûç¿ëÀÚ ¼ÂÆýºÅ©¸³Æ®: AutoMaster V 1.0 #####
#########################################################
#
# ## ÁÖÀÇ »çÇ× : ÀÌ ÇÁ·Î±×·¥Àº ¾÷üµé¸¶´ÙÀÇ ¼­¹öƯ¼º¹× ¼³Ä¡ÇÁ·Î±×·¥ÀÇ
# À§Ä¡°¡ ´Ù¸£¹Ç·Î »ç¿ë¾÷üµéÀÇ ¼öÁ¤ÀÌ ºÒ°¡ÇÇÇÒ ¼ö ÀÖ½À´Ï´Ù.
#
# 1. ÇÁ·Î±×·¥ÀÇ ¿ëµµ
# - À¥È£½ºÆü­¹ö¿¡¼­ °í°´¼­ºñ½º¸¦ À§ÇÑ ¼­¹ö¼ÂÆý©½ºÅ©¸³Æ®
#
# 2. Á¦ÀÛÀÚ
# - Äɺñ¾Æ³Ý ¼öÆÛÀ¯ÀúÄÚ¸®¾Æ °³¹ß½Ç
# - Email : webmaster@superuser.co.kr
# - TEL : (051) 583-8128,9
#
# 3. ÀúÀÛ±Ç
# ÀÌ ÇÁ·Î±×·¥ÀÇ ÀúÀÛ±ÇÀº ¼öÆÛÀ¯ÀúÄÚ¸®¾Æ¿¡
# ÀÖÀ¸¸ç, ÇÁ·Î±×·¥ÀÇ »ç¿ëÀº °¡´ÉÇϳª »ó¾÷ÀûÀÎ ¸ñÀûÀ¸·Î
# »ç¿ëµÇ°í ¹èÆ÷µÇ´Â °ÍÀº ¾ö°ÝÈ÷ Á¦Çѵ˴ϴÙ.
# ´ç¿¬È÷ ÇÁ·Î±×·¥ÀÇ ÀϺθ¦ º¯°æÇÏ¿© Àç¹èÆ÷ÇÏ´Â ÇàÀ§¶ÇÇÑ
# ¾ö°ÝÈ÷ Á¦ÇѵǾî ÀÖ½À´Ï´Ù.
#
# Date : 2000³â 8¿ù 31ÀÏ
#
#
# 4. °ø½Ä¹èÆ÷»çÀÌÆ® : www.nofee.co.kr
#
# 5. ¼öÆÛÀ¯ÀúÄÚ¸®¾Æ ¼­¹ö¿¬±¸½Ç ȨÆäÀÌÁö : www.superuser.co.kr
#
####### 6. ¼³Ä¡µÇ¾î ÀÖ¾î¾ßÇÒ ÇÁ·Î±×·¥¹× ¼³Ä¡À§Ä¡ #####
#
# . À¥¼­¹ö(¾ÆÆÄÄ¡)
# . DNS (BIND8)
# . Sendmail
# . À¥·Î±×ºÐ¼® ÇÁ·Î±×·¥(AW)#
#
#
#
###### 7. ÇÊ¿äÇÑ ÆÄÀϵé #############
#
# °¡ÀÔÀÚ¹é¾÷ : NICEBACKUP
# °¡ÀÔÀÚ °Ô½ÃÆǼ³Á¤ : niceboard-create.sql
# °¡ÀÔÀÚ °Ô½ÃÆǼ³Á¤ : niceboard-create2.sql
# °¡ÀÔÀÚ ¹æ¸í·Ï¼³Á¤ : nicebook-create.sql
# °¡ÀÔÀÚ °Ô½ÃÆÇ : niceboard
# °¡ÀÔÀÚ ¹æ¸í·Ï : nicebook
# Ãʱ⠾ȳ»ÆäÀÌÁö : index.html
#
#
###### 8. Â÷ÈĹöÀü ¾÷±×·¹À̵å (V2.0) : À¥¹öÀü(for Web)
# . ȨÆäÀÌÁö ÃʱâÆÄÀÏ (index.html) »ç¿ëÀÚº° º¹»ç±â´É
# . À¥¿¡¼­ °í°´°ü¸®½Ã½ºÅÛ(KCMS)°úÀÇ ¿¬µ¿
# . »ó´ã½Ç ÀÚµ¿¼³Á¤
# . ȸ¿ø°ü¸® ÇÁ·Î±×·¥ ÀÚµ¿¼³Á¤
# . ¸ÞÀϸµ¸®½ºÆ® ÀÚµ¿¼³Á¤
# . À¥¸ÞÀÏ ÀÚµ¿¼³Á¤
#########################################################
# from V0.1 to V0.3 upgrade
# - DNS zoneÆÄÀÏ ÀÚµ¿»ý¼º±â´É
# - accesswatch ȯ°æÆÄÀÏ ÀÚµ¿»ý¼º±â´É
# from V0.30 to V0.31 upgrade (2000.10.22)
# - User Counter datafile ÀÚµ¿»ý¼º±â´É
# from V0.31 to V0.32 upgrade (2000.10.31)
# - /usr/local/aw/cfg/¿¡ »ý¼ºµÇ´Â »ç¿ëÀÚȯ°æ¼³Á¤ÆÄÀÏ ¹ö°Å¼öÁ¤
# from V0.32 to V0.4 upgrade (2000.11.1)
# - /etc/mail/virtusertable¿¡ °¡»ó¸ÞÀϵî·Ï
# - /etc/mail/relay-domains¿¡ relayÇã¿ë¼³Á¤
# from V0.4 to V0.7 upgrade (2000.11.1)
# - °Ô½ÃÆÇÀÚµ¿»ý¼º±â´É ÀÔ·Â(niceboard)
# from V0.7 to V0.9 upgrade (2000.11.1)
# - ¹æ¸í·Ï ÀÚµ¿»ý¼º±â´É ÀÔ·Â(nicebook)
# from V0.9 to V1.0 upgrade (2000.11.2)
# - À¥·Î±×Á¢¼ÓÁ¦Çѱâ´É (°ü¸®ÀÚ±â´É)
# - °¡ÀÔÀÚ ¹é¾÷ÇÁ·Î±×·¥±â´É
#######################################################
# º¯¼ö¼±¾ð
export hostip_address="211.174.58.43"
export name_server="ns.superuser.co.kr"

#ÀÓ½ÃÆÄÀÏ »èÁ¦
rm -f /tmp/httpd.conf_tempfile
rm -f /tmp/named.conf_tempfile
rm -f /tmp/zone_tempfile
rm -f /tmp/logfile_tempfile
rm -f /tmp/aw.cfg_tempfile

#ÀÓ½ÃÆÄÀÏ »ý¼º
touch /tmp/httpd.conf_tempfile
touch /tmp/named.conf_tempfile
touch /tmp/zone_tempfile
touch /tmp/logfile_tempfile
touch /tmp/aw.cfg_tempfile

#»ç¿ëÀÚ»ý¼º¹× Æнº¿öµå ¼³Á¤
/usr/sbin/useradd -m -s /bin/bash -d /home/$1 -g webhost $1
echo " Please input mysql Administrator's passwd"
passwd $1

#¿ë·®¼³Á¤
edquota -u $1

#ȨÆäÀÌÁöµð·ºÅ丮»ý¼º¹× ¼³Á¤
chmod 701 /home/$1
# Ȩµð·ºÅ丮(/home/user)¸¦ 701·Î ¼³Á¤ÇÏ´Â °ÍÀÌ ÁÁ´Ù.
# ´Ù¸¥ ÀϹݻç¿ëÀÚµéÀº cd ¸í·É¾î·Î µé¾î¿Ã ¼ö ¾øÀ¸¸ç
# Apache(httpd)·Î ȨÆäÀÌÁö´Â º¸¿©ÁÙ¼ö ÀÖ´Ù.
# µð·ºÅ丮¿¡¼­ rwx ÀÇ x´Â cd °¡´ÉÀ» ÀǹÌÇϸç,
# rÀº µé¾î¿Í¼­ ls°¡´ÉÀ» ÀǹÌÇÑ´Ù.

mkdir /home/$1/www
chmod 705 /home/$1/www
chown $1:webhost /home/$1/www


mkdir /home/$1/www/weblog
chmod 705 /home/$1/www/weblog
chown $1:webhost /home/$1/www/weblog

#°í°´ÀÇ Á¢¼ÓÅë°è¸¦°í°´ÀÇ °ü¸®ÀÚ¸¸ÀÌ º¼¼ö ÀÖµµ·Ï Á¢±ÙÁ¦ÇÑÀ» ¼³Á¤ÇÑ´Ù.
touch /home/$1/www/weblog/.htaccess
echo "AuthName \"$2 Administrator\"" >> /home/$1/www/weblog/.htaccess
echo "AuthType Basic" >> /home/$1/www/weblog/.htaccess
echo "AuthUserFile /home/$1/www/weblog/.htpasswd" >> /home/$1/www/weblog/.htaccess
echo "AuthGroupFile /dev/null" >> /home/$1/www/weblog/.htaccess
echo "<Limit GET POST>" >> /home/$1/www/weblog/.htaccess
echo "require valid-user" >> /home/$1/www/weblog/.htaccess
echo "</Limit>" >> /home/$1/www/weblog/.htaccess
echo " Please input Administrator's passwd"
htpasswd -c /home/$1/www/weblog/.htpasswd $1

cp /sbin/index.html /home/$1/www/index.html
chmod 755 /home/$1/www/index.html
chown $1:webhost /home/$1/www/index.html

mkdir /home/$1/www/cgi-bin
chmod 755 /home/$1/www/cgi-bin
chown $1:webhost /home/$1/www/cgi-bin

mkdir /home/$1/www_log
chmod 705 /home/$1/www_log
chown $1:webhost /home/$1/www_log

#°¡»óÈ£½ºÆ®¼³Á¤
#vi /usr/local/apache/conf/httpd.conf
echo "<VirtualHost $hostip_address>" >> /tmp/httpd.conf_tempfile
echo " ServerAdmin $1@$2" >> /tmp/httpd.conf_tempfile
echo " DocumentRoot /home/$1/www" >> /tmp/httpd.conf_tempfile
echo " ServerName www.$2" >> /tmp/httpd.conf_tempfile
echo " ErrorLog /home/$1/www_log/error_log" >> /tmp/httpd.conf_tempfile
echo " CustomLog /home/$1/www_log/access_log common" >> /tmp/httpd.conf_tempfile
echo "</VirtualHost>" >> /tmp/httpd.conf_tempfile
cat /tmp/httpd.conf_tempfile >> /usr/local/apache/conf/httpd.conf


#µµ¸ÞÀμ³Á¤
#vi /etc/named.conf
echo "zone \"$2\" {" >> /tmp/named.conf_tempfile
echo " type master;" >> /tmp/named.conf_tempfile
echo " file \"$2.zone\";" >> /tmp/named.conf_tempfile
echo "};" >> /tmp/named.conf_tempfile
cat /tmp/named.conf_tempfile >> /etc/named.conf

#cp /var/named/default.zone /var/named/$2.zone
#vi /var/named/$2.zone
#/var/named/domain.zoneÆÄÀÏ »ý¼º
#echo "@ IN SOA www.$2. $1.$2. (" >> /tmp/zone_tempfile
#SOA ¹Ù·ÎÀ§ÀÇ µµ¸ÞÀÎÀ» ns.superuser.co.kr·Î ¼öÁ¤ÇÔ.
echo "@ IN SOA ns.superuser.co.kr. $1.$2. (" >> /tmp/zone_tempfile
echo " 20000402 ; Serial" >> /tmp/zone_tempfile
echo " 21600 ; Refresh(6h)" >> /tmp/zone_tempfile
echo " 900 ; Retry(15min)" >> /tmp/zone_tempfile
echo " 604800 ; Expire(7d)" >> /tmp/zone_tempfile
echo " 43200) ; Minimum(12h);" >> /tmp/zone_tempfile
echo " IN NS $name_server." >> /tmp/zone_tempfile
echo ";" >> /tmp/zone_tempfile
echo " IN A $hostip_address" >> /tmp/zone_tempfile
echo " IN MX 0 $2." >> /tmp/zone_tempfile
echo "www IN A $hostip_address" >> /tmp/zone_tempfile
echo " IN MX 0 $2." >> /tmp/zone_tempfile
cp /tmp/zone_tempfile /var/named/$2.zone

#¸ÞÀϼ³Á¤(SMTP)
#vi /etc/sendmail.cw
echo $2 >> /etc/sendmail.cw
echo $2 >> /etc/mail/relay-domains
echo "webmaster@$2 $1" >> /etc/mail/virtusertable

#·Î±×ºÐ¼®¼³Á¤
#vi /usr/local/aw/accesswatch-start
#accesswatch-startÆÄÀÏ¿¡ »ç¿ëÀÚÀÇ ·Î±×ºÐ¼® ½ÃÀÛ½ºÅ©¸³Æ® ÀÔ·Â
echo "$2·Î±×ºÐ¼®ÁßÀÔ´Ï´Ù." >> /tmp/logfile_tempfile
echo "/usr/local/aw/aw-parser.pl -c /usr/local/aw/cfg/$2.cfg" >> /tmp/logfile_tempfile
echo "/usr/local/aw/aw-report.pl -c /usr/local/aw/cfg/$2.cfg" >> /tmp/logfile_tempfile
cat /tmp/logfile_tempfile >> /usr/local/aw/accesswatch-start

#/usr/local/aw/cfgµð·ºÅ丮¿¡ »ç¿ëÀÚÀÇ ·Î±×ºÐ¼®È¯°æ¼³Á¤ÆÄÀÏ ÀÛ¼º
#cp /usr/local/aw/cfg/default.cfg /usr/local/aw/cfg/$2.cfg
#vi /usr/local/aw/cfg/$2.cfg
echo "###############################################################################" >> /tmp/aw.cfg_tempfile
echo "##### Accesswatch Config File Setup #####" >> /tmp/aw.cfg_tempfile
echo "###############################################################################" >> /tmp/aw.cfg_tempfile
echo "\$accessLog = \"/home/$1/www_log/access_log\";" >> /tmp/aw.cfg_tempfile
echo "\$DNSlookups = 0;" >> /tmp/aw.cfg_tempfile
echo "\$defaultPage = \"index.html\";" >> /tmp/aw.cfg_tempfile
echo "\$includeURL = \".*\";" >> /tmp/aw.cfg_tempfile
echo "\$compressdata = 1;" >> /tmp/aw.cfg_tempfile
echo "\$compresscommand = \"gzip -9fc\";" >> /tmp/aw.cfg_tempfile
echo "\$catcompresscommand = \"gunzip -c\";" >> /tmp/aw.cfg_tempfile
echo "\$compresssuffix = \"gz\";" >> /tmp/aw.cfg_tempfile
echo "\$excludeURL = \".gif\|.jpg\|.jpeg\|.xbm\";" >> /tmp/aw.cfg_tempfile
echo "\$reportBase = \"/home/$1/www/weblog\";" >> /tmp/aw.cfg_tempfile
echo "\$siteName = \"www.$2\";" >> /tmp/aw.cfg_tempfile
echo "\$siteBaseURL = \"http://www.$2\";" >> /tmp/aw.cfg_tempfile
echo "\$orgname = \"www.$2\";" >> /tmp/aw.cfg_tempfile
echo "\$orgdomain = \"$2\";" >> /tmp/aw.cfg_tempfile
echo "\$excludeHosts = \"\";" >> /tmp/aw.cfg_tempfile
echo "###############################################################################" >> /tmp/aw.cfg_tempfile
echo "##### Program Options #####" >> /tmp/aw.cfg_tempfile
echo "###############################################################################" >> /tmp/aw.cfg_tempfile
echo "\$maxPagesToList = -1;" >> /tmp/aw.cfg_tempfile
echo "\$maxDomainsToList = -1;" >> /tmp/aw.cfg_tempfile
echo "\$maxHostsToList = 15;" >> /tmp/aw.cfg_tempfile
echo "\$maxRefsToList = 10;" >> /tmp/aw.cfg_tempfile
echo "\$maxAgentsToList = 15;" >> /tmp/aw.cfg_tempfile
echo "\$customFooter = <<EOM;" >> /tmp/aw.cfg_tempfile
echo "<!-- START custom footer -->" >> /tmp/aw.cfg_tempfile
echo "$2" >> /tmp/aw.cfg_tempfile
echo "<!-- END custom footer -->" >> /tmp/aw.cfg_tempfile
echo "EOM" >> /tmp/aw.cfg_tempfile
echo "1;" >> /tmp/aw.cfg_tempfile
echo "###############################################################################" >> /tmp/aw.cfg_tempfile
echo "########### End - AccessWatch Custom Configuration ############################" >> /tmp/aw.cfg_tempfile
echo "###############################################################################" >> /tmp/aw.cfg_tempfile
cp /tmp/aw.cfg_tempfile /usr/local/aw/cfg/$2.cfg

#User Counter datafile Setting (Version 0.31 upgrade)
touch /usr/local/apache/Counter/data/$1.dat
chmod 644 /usr/local/apache/Counter/data/$1.dat
chown nobody:webhost /usr/local/apache/Counter/data/$1.dat
cat /usr/local/apache/Counter/data/counter_default_digit.dat >> $1.dat

#°í°´ÀÇ °Ô½ÃÆÇÀ» »ý¼ºÇÑ´Ù.
#°Ô½ÃÆÇ ÀÛ¾÷1 °Ô½ÃÆÇÆÄÀÏÀ» º¹»çÇÏ°í ±ÇÇÑ¹× ÆÄÀϼöÁ¤À» ÇÑ´Ù.
cd /home/nice/www/
cp -r /home/nice/www/niceboard /home/$1/www/niceboard/
cd /home/$1/www/
chown -R $1:webhost /home/$1/www/niceboard
cd /home/$1/www/niceboard/
mv /home/$1/www/niceboard/nice.gif /home/$1/www/niceboard/$1.gif
mv /home/$1/www/niceboard/nice_icon /home/$1/www/niceboard/$1_icon
mv /home/$1/www/niceboard/nice.cfg /home/$1/www/niceboard/$1.cfg
vi /home/$1/www/niceboard/auth.inc
vi /home/$1/www/niceboard/dbconn.inc
vi /home/$1/www/niceboard/$1.cfg

#°Ô½ÃÆÇ ÀÛ¾÷2 mysqlµ¥ÀÌÅͺ£À̽º¿¡ »ç¿ëÀÚ¿¡°Ô ÇÊ¿äÇÑ DBÀÛ¾÷À» ½ÇÇàÇÑ´Ù.
cd /usr/local/mysql/bin/
vi /usr/local/mysql/bin/niceboard-create.sql
vi /usr/local/mysql/bin/niceboard-create2.sql
echo " Please input mysql Administrator's passwd"
/usr/local/mysql/bin/mysql -u root -p niceboard < niceboard-create.sql
echo " Please input mysql Administrator's passwd"
/usr/local/mysql/bin/mysql -u root -p mysql < niceboard-create2.sql

#°í°´ÀÇ ¹æ¸í·ÏÀ» »ý¼ºÇÑ´Ù.
#¹æ¸í·ÏÀÛ¾÷1 ¹æ¸í·ÏÆÄÀÏÀ» º¹»çÇÏ°í ±ÇÇÑ¹× ÆÄÀÏÀ» ¼öÁ¤ÇÑ´Ù.
cd /home/nice/www/
cp -r /home/nice/www/nicebook /home/$1/www/
cd /home/$1/www/
chown -R $1:webhost /home/$1/www/nicebook
cd /home/$1/www/nicebook/
mv /home/$1/www/nicebook/nice.cfg /home/$1/www/nicebook/$1.cfg
mv /home/$1/www/nicebook/nice.gif /home/$1/www/nicebook/$1.gif
mv /home/$1/www/nicebook/nice_icon /home/$1/www/nicebook/$1_icon
vi /home/$1/www/nicebook/auth.inc
vi /home/$1/www/nicebook/dbconn.inc
vi /home/$1/www/nicebook/$1.cfg

#°¡ÀÔÀÚ ¹é¾÷À» À§ÇÑ /sbin/NICEBACKUP¿¡ ÀÔ·Â
echo "tar cvfpz /home/sspark/BACKUP/$2.tar.gz /home/$1 >> /sbin/NICEBACKUP

#¹æ¸í·ÏÀÛ¾÷2 mysqlµ¥ÀÌÅͺ£À̽º¿¡ »ç¿ëÀÚ¿¡°Ô ÇÊ¿äÇÑ DBÀÛ¾÷À» ½ÇÇàÇÑ´Ù.
cd /usr/local/mysql/bin/
vi /usr/local/mysql/bin/nicebook-create.sql
echo " Please input mysql Administrator's passwd"
/usr/local/mysql/bin/mysql -u root -p GUESTBOOK < nicebook-create.sql

#°Ô½ÃÆÇ ¹æ¸í·Ï Àû¿ëÀÛ¾÷mysql reload
echo " Please input mysql Administrator's passwd"
/usr/local/mysql/bin/mysqladmin -u root -p reload

#º¯¼ö ¼±¾ð ÇØÁ¦(¸Þ¸ð¸®¿¡¼­ ÇÒ´çÇØÁ¦)
unset hostip_address
unset name_server

# °ü·Ã¼­¹ö restart
/etc/rc.d/init.d/named restart
/usr/local/apache/bin/apachectl restart

#¸ÞÀϼ³Á¤ Àû¿ëÀ»À§ÇÑ ¸ÞÀÏ°ü·ÃDBÀÛ¾÷
makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable



°ü·Ã±Û : ¾øÀ½ ±Û¾´½Ã°£ : 2002/11/11 7:08 from 210.102.250.167

  ½º´ÏÆÛ¸µ ¸ñ·Ïº¸±â »õ±Û ¾²±â Áö¿ì±â ÀÀ´ä±Û ¾²±â ±Û ¼öÁ¤ [router-switch] ÇÑ±Û ¸Þ´º¾ó  
BACKRUSH  À¯´Ð½º¸í·É  ´ÙÀ½  ÀÚ·á½Ç  Ascii Table   ¿ø°ÝÁ¢¼Ó  ´Þ·Â,½Ã°£   ÇÁ·Î¼¼½º   ½©
ÁöÇÏö³ë¼±   RFC¹®¼­   SUN FAQ   SUN FAQ1   C¸Þ´º¾ó   PHP¸Þ´º¾ó   ³Ê±¸¸®   ¾Æ½ºÅ°¿ùµå ¾ÆÀÌÇǼ­Ä¡