{"id":138,"date":"2019-07-11T19:33:52","date_gmt":"2019-07-11T10:33:52","guid":{"rendered":"http:\/\/www.space4u.co.kr\/wp\/?p=138"},"modified":"2019-07-11T19:37:55","modified_gmt":"2019-07-11T10:37:55","slug":"%ed%98%b8%ec%8a%a4%ed%8c%85%ec%9a%a9-%ec%89%98-%ec%8a%a4%ed%81%ac%eb%a6%bd%ed%8a%b8","status":"publish","type":"post","link":"http:\/\/www.space4u.co.kr\/wp\/?p=138","title":{"rendered":"[\ud638\uc2a4\ud305 \uad6c\ucd95] \uc258 \uc2a4\ud06c\ub9bd\ud2b8"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">#!\/bin\/bash<br>echo \"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; [1] \uc0ac\uc6a9\uc790 \uacc4\uc815 \ucd94\uac00 \ud569\ub2c8\ub2e4.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; [2] \ub124\uc784\uc11c\ubc84 \ucd94\uac00\ud569\ub2c8\ub2e4.&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; [3] VirtualHost \ucd94\uac00\ud558\uae30. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; [4] Mysql \uacc4\uc815\ucd94\uac00\ud558\uae30.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; [5] sendmail \uacc4\uc815 \ucd94\uac00\ud558\uae30.&nbsp;&nbsp;<br>\"<br><br>echo -n \"select Number:\"<br>read Num<br><br>case \"$Num\" in<br><br>#\uc0ac\uc6a9\uc790 \ucd94\uac00 \ud558\uae30&nbsp;<br>1)<br>echo =======================================================<br>echo<br>echo&nbsp; \"&lt; Hosting Server \uc0ac\uc6a9\uc790 \ucd94\uac00 \uc2a4\ud06c\ub9bd\ud2b8&gt;\"<br>echo<br>echo&nbsp; \uacc4\uc815ID, \uacc4\uc815Password \ub97c \uc785\ub825 &nbsp; &nbsp; &nbsp;&nbsp;<br>echo<br>echo =======================================================<br>echo&nbsp;<br>echo -n \"\uc0ac\uc6a9\uc790 \uacc4\uc815 \uc785\ub825:\"<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read id<br><br>echo -n \"\uc0ac\uc6a9\uc790 \ud328\uc2a4\uc6cc\ub4dc \uc785\ub825:\"<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read pass<br><br>echo -n \"<br>&nbsp; &nbsp; &nbsp; &nbsp; \uc0ac\uc6a9\uc790 \uacc4\uc815: $id<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; \uc0ac\uc6a9\uc790\ud328\uc2a4\uc6cc\ub4dc: $pass<br>-------------------------------------------------------------<br>&nbsp; &nbsp; &nbsp; &nbsp; \ub9de\uc73c\uba74 &lt;Enter&gt;\ub97c \ub204\ub974\uace0 \ud2c0\ub9ac\uba74 No\ub97c \uc785\ub825\ud558\uc138\uc694: \"<br>&nbsp; &nbsp; &nbsp; &nbsp; read chk<br><br>if [ \"$chk\" != \"\" ]<br><br>then<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; exit<br>fi<br><br>echo\"\"<br>echo \"\ud638\uc2a4\ud305 \uc0ac\uc6a9\uc790\ub97c \ucd94\uac00\ud569\ub2c8\ub2e4.\"<br><br>#\uacc4\uc815 ID \ucd94\uac00&nbsp;<br>adduser $id<br>#\ud328\uc2a4 \uc6cc\ub4dc \ucd94\uac00<br><br>echo \"$pass\" | passwd --stdin \"$id\"<br>echo \"<br><br>\"<br>echo \"\uc0ac\uc6a9\uc790 \uc544\uc774\ub514\uc640 \ud328\uc2a4\uc6cc\ub4dc \uc785\ub2c8\ub2e4\"<br>echo \"\"<br>echo \"\"<br>echo \"\uc0ac\uc6a9\uc790 ID: $id\"<br>echo \"\ud328\uc2a4\uc6cc\ub4dc : $pass\"<br>echo \"\uc0ac\uc6a9\uc790 \ucd94\uac00\ub97c \uc644\ub8cc\ud588\uc2b5\ub2c8\ub2e4\"<br>exit;;<br><br>#\ub124\uc784 \uc11c\ubc84 \ucd94\uac00 \uc2a4\ud06c\ub9bd\ud2b8<br>2)<br>echo =======================================================<br>echo<br>echo&nbsp; \"&lt; \ub124\uc784\uc11c\ubc84 \ucd94\uac00 \ub4f1\ub85d\ucd94\uac00 &gt;\"<br>echo<br>echo =======================================================<br>echo&nbsp;<br>echo -n \"url \uc8fc\uc18c\ub97c \uc785\ub825\ud558\uc138\uc694 :\"<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read url<br><br>echo -n \"\uc11c\ubc84 IP \uc785\ub825\ud558\uc138\uc694:\"<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read ip<br>echo -n \"<br>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; \uc0ac\uc6a9\uc790 \ub3c4\uba54\uc778 : $url<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \uc11c\ubc84 IP &nbsp; &nbsp; : $ip<br>-------------------------------------------------------------<br>&nbsp; &nbsp; &nbsp; &nbsp; \ub9de\uc73c\uba74 &lt;Enter&gt;\ub97c \ub204\ub974\uace0 \ud2c0\ub9ac\uba74 No\ub97c \uc785\ub825\ud558\uc138\uc694: \"<br>&nbsp; &nbsp; &nbsp; &nbsp; read chk<br><br>if [ \"$chk\" != \"\" ]<br><br>then<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; exit<br>fi<br><br>echo \"zone \\\"$url\\\" IN {<br>&nbsp; &nbsp; &nbsp; &nbsp; type master;<br>&nbsp; &nbsp; &nbsp; &nbsp; file \\\"$url.zone\\\";<br>&nbsp; &nbsp; &nbsp; &nbsp; allow-update { none; };<br>};\" &gt;&gt; \/etc\/named.conf<br><br>#\ud3ec\uc6cc\ub4dc\uc874 \ud30c\uc77c \uc0dd\uc131\ud569\ub2c8\ub2e4&nbsp;<br>touch \/var\/named\/$url.zone<br><br>echo \"\\$TTL &nbsp;&nbsp; 86400<br>@ &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp;&nbsp; SOA &nbsp; &nbsp; ns.$url. root.ns.$url.&nbsp; (<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1997022700 ; Serial<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 28800 &nbsp; &nbsp;&nbsp; ; Refresh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 14400 &nbsp; &nbsp;&nbsp; ; Retry<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3600000 &nbsp;&nbsp; ; Expire<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 86400 ) &nbsp;&nbsp; ; Minimum<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp;&nbsp; NS &nbsp; &nbsp;&nbsp; ns.$url.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp;&nbsp; MX 10 &nbsp; mail.$url.<br>;<br>@ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp;&nbsp; A &nbsp; &nbsp; &nbsp; $ip<br>www &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp;&nbsp; A &nbsp; &nbsp; &nbsp; $ip<br>* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp;&nbsp; A &nbsp; &nbsp; &nbsp; $ip<br>\" &gt; \/var\/named\/$url.zone<br><br>#named restart<br>\/etc\/init.d\/named restart<br><br>echo \"\uc124\uc815\uc774&nbsp; \uc644\ub8cc\ud588\uc2b5\ub2c8\ub2e4\"<br><br>exit;;<br><br># \uac00\uc0c1\ud638\uc2a4\ud2b8 \ucd94\uac00\ud558\uae30<br><br>3)<br><br>echo =======================================================<br>echo<br>echo&nbsp; \"&lt; \uac00\uc0c1 \ud638\uc2a4\ud2b8 \ucd94\uac00\ud558\uae30 &gt;\"<br>echo<br>echo&nbsp; \uacc4\uc815 \ub3c4\uba54\uc778, \uacc4\uc815ID, IP\ub294 *:80 \uc744 \uc785\ub825 &nbsp;&nbsp;<br>echo<br>echo =======================================================<br>echo&nbsp;<br>echo -n \"url \uc8fc\uc18c\ub97c \uc785\ub825\ud558\uc138\uc694 :\"<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read url<br>echo -n \"\uacc4\uc815 ID\ub97c \uc785\ub825 \ud558\uc138\uc694:\"<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read id<br>echo -n \"\uc11c\ubc84 IP \uc785\ub825\ud558\uc138\uc694:\"<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read ip<br>echo -n \"<br>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; \uc0ac\uc6a9\uc790 \ub3c4\uba54\uc778 : $url<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \uac8c\uc815 ID &nbsp; : $id<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \uc11c\ubc84 IP &nbsp; : $ip<br><br>-------------------------------------------------------------<br>&nbsp; &nbsp; &nbsp; &nbsp; \ub9de\uc73c\uba74 &lt;Enter&gt;\ub97c \ub204\ub974\uace0 \ud2c0\ub9ac\uba74 No\ub97c \uc785\ub825\ud558\uc138\uc694: \"<br>&nbsp; &nbsp; &nbsp; &nbsp; read chk<br><br>if [ \"$chk\" != \"\" ]<br><br>then<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; exit<br>fi<br><br>echo \"&lt;VirtualHost $ip&gt;<br>DocumentRoot \/home\/$id\/public_html<br>ServerName $url<br>ServerAlias&nbsp;<a href=\"http:\/\/www.%24url\/\">www.$url<\/a><br># &nbsp;&nbsp; ErrorLog logs\/dummy-host.example.com-error_log<br># &nbsp;&nbsp; CustomLog logs\/dummy-host.example.com-access_log common<br>&lt;\/VirtualHost&gt;\" &gt;&gt; \/etc\/httpd\/conf\/httpd.conf<br><br>echo \"\uc124\uc815\uc774&nbsp; \uc644\ub8cc\ud588\uc2b5\ub2c8\ub2e4\"<br><br>#\uc544\ud30c\uce58 restart<br>service httpd restart<br><br>exit;;<br><br># Myslq \uacc4\uc815 \ucd94\uac00\ud558\uae30&nbsp;<br>4)<br>echo =======================================================<br>echo<br>echo&nbsp; \"&lt; Myslq \uacc4\uc815 \ucd94\uac00\ud558\uae30&nbsp; &gt;\"<br>echo<br>echo&nbsp; \uacc4\uc815ID, MySql Password\ub97c \uc785\ub825<br>echo<br>echo =======================================================<br>echo&nbsp;<br>echo -n \"Mysql \uacc4\uc815 \ucd94\uac00\ud558\uae30:\"&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read id<br><br>echo -n \"Mysql \ud328\uc2a4\uc6cc\ub4dc :\"<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read pass<br>echo -n \"<br>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; \uc0ac\uc6a9\uc790 \ub3c4\uba54\uc778 : $id<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \uc11c\ubc84 IP &nbsp; : $pass<br><br>-------------------------------------------------------------<br>&nbsp; &nbsp; &nbsp; &nbsp; \ub9de\uc73c\uba74 &lt;Enter&gt;\ub97c \ub204\ub974\uace0 \ud2c0\ub9ac\uba74 No\ub97c \uc785\ub825\ud558\uc138\uc694: \"<br>&nbsp; &nbsp; &nbsp; &nbsp; read chk<br><br>if [ \"$chk\" != \"\" ]<br><br>then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; exit<br>fi<br><br>echo \"create database $id;<br>GRANT ALL PRIVILEGES ON $id.* TO&nbsp;<a href=\"mailto:$id@localhost\">$id@localhost<\/a>&nbsp;IDENTIFIED by '$pass';\" &gt; .\/tmp<br><br>echo \"<br>&nbsp; &nbsp; &nbsp;&nbsp; Mysql \ub8e8\ud2b8 \ud328\uc2a4\uc6cc\ub4dc\ub97c \uc785\ub825\ud558\uc138\uc694 &nbsp;&nbsp;&nbsp;<br>\"<br><br>mysql -u root -p mysql &lt; .\/tmp<br>rm -f .\/tmp<br><br>echo \"\uc124\uc815\uc774&nbsp; \uc644\ub8cc\ud588\uc2b5\ub2c8\ub2e4\"<br>exit;;<br><br>5)<br>echo =======================================================<br>echo<br>echo &nbsp; &nbsp; &nbsp; \uba54\uc77c \ucd94\uac00\ud558\uae30 &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<br>echo<br>echo &nbsp; &nbsp; &nbsp; \uacc4\uc815 \ub3c4\uba54\uc778, \uba54\uc77cID, \uba54\uc77cPassword \ub97c \uc785\ub825<br>echo<br>echo =======================================================<br>echo -n \"url \uc8fc\uc18c\ub97c \uc785\ub825\ud558\uc138\uc694 :\"<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read url<br>echo -n \"\uacc4\uc815 ID:\"<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read id<br>echo -n \"\uacc4\uc815 \ud328\uc2a4\uc6cc\ub4dc:\"&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; read pass<br>echo -n \"<br>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; \uc0ac\uc6a9\uc790 \ub3c4\uba54\uc778 : $url<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \uacc4\uc815 ID &nbsp; : $id<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \uc11c\ubc84 PASS : $pass<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>-------------------------------------------------------------<br>&nbsp; &nbsp; &nbsp; &nbsp; \ub9de\uc73c\uba74 &lt;Enter&gt;\ub97c \ub204\ub974\uace0 \ud2c0\ub9ac\uba74 No\ub97c \uc785\ub825\ud558\uc138\uc694: \"<br>&nbsp; &nbsp; &nbsp; &nbsp; read chk<br>if [ \"$chk\" != \"\" ]<br>then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; exit<br>fi<br>echo \"$url\" &gt;&gt; \/etc\/mail\/local-host-names<br><br>adduser -M $id -s \/bin\/false<br><br>echo \"<a href=\"mailto:$id@$url\">$id@$url<\/a>&nbsp; $id\"&nbsp; &gt;&gt; \/etc\/mail\/virtusertable<br>echo \"$pass\" | passwd --stdin \"$id\"<br><br>#sendmail \uc124\uc815 \uc801\uc6a9\uc744 \uc704\ud55c \uba54\uc77c DB\uc791\uc5c5&nbsp;<br>makemap hash \/etc\/mail\/virtusertable &lt; \/etc\/mail\/virtusertable<br>makemap hash \/etc\/mail\/local-host-names &lt; \/etc\/mail\/local-host-names<br><br>#sendmail restart<br>\/etc\/init.d\/sendmail restart<br><br>echo \"\uc124\uc815\uc774&nbsp; \uc644\ub8cc\ud588\uc2b5\ub2c8\ub2e4\"<br>exit;;*)<br>&nbsp; .....<br>esac<br><\/pre>\n\n\n\n<p><br><br><br>==================================================================<br>\ub610 \ub2e4\ub978 \ubc29\ubc95<br>==================================================================<br><br><br><br><\/p>\n\n\n\n<p>\uc544\ub798 \uc138\uac00\uc9c0\uac00 \uc788\ub294\ub370, \uc258\uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc870\uae08\ub9cc \uc544\uc2dc\ub294 \ubd84\uc774\ub77c\uba74&nbsp;<br>\uc18c\uc2a4\ub9cc \ubcf4\uc154\ub450 \ucda9\ubd84 \ud560 \uac83\uc785\ub2c8\ub2e4.&nbsp;<br>\uc798 \ubaa8\ub974\uc2e0\ub2e4\uba74 \uc124\uba85\uacfc \ud568\uaed8 \uc2a4\ud06c\ub9b0\uc0f7\ub3c4 \uac19\uc774 \ubcf4\uc2dc\uba74 \uc88b\uc2b5\ub2c8\ub2e4.&nbsp;<br>\uc8fc\uc758 \ud558\uc2e4 \uc810\uc740 \ub808\ub4dc\ud5f7 \uae30\ubc18\uc5d0\uc11c \uc791\uc5c5\ud558\uc600\uace0, \uc544\ud30c\uce58\ub294 \/usr\/local\/apache\uc5d0&nbsp;<br>\uc124\uce58 \ub418\uc5c8\uc5c8\uace0, \/usr\/local\/mysql \uc5d0 mysql\uc774 \uc124\uce58 \ub418\uc5c8\uc73c\uba70,&nbsp;<br>dns\ub294 \/etc\/named.conf \ud30c\uc77c\uacfc \/var\/named \uc544\ub798\ub514\ub809\ud1a0\ub9ac\ub97c \uc218\uc815\ud558\uace0&nbsp;<br>\uc788\uc2b5\ub2c8\ub2e4.&nbsp;<br>\uc774\ub7ec\ud55c \ubd80\ubd84\ub4e4\uc740 \uc790\uc2e0\uc758 \uc2dc\uc2a4\ud15c\uc5d0 \ub9de\ucdb0\uc11c \uc124\uc815\ud558\uc2e0\ud6c4\uc5d0 \uc0ac\uc6a9\ud558\uc2dc\uba74&nbsp;<br>\ub429\ub2c8\ub2e4.&nbsp;<br>\ub9c8\uc9c0\ub9c9\uc73c\ub85c \uc544\ub798 \uc258 \uc2a4\ud06c\ub9bd\ud2b8\ub4e4\uc740 \uc544\uc8fc \uac04\ub2e8\ud55c \ubb38\ubc95\uc73c\ub85c echo\ubb38\uc774\ub098&nbsp;<br>\uac04\ub2e8\ud55c \uba54\ub274 \uad6c\uc131\uc73c\ub85c \ub9cc\ub4e4\uc5b4\uc838 \uc788\uc73c\ubbc0\ub85c, \uc5ec\ub7ec\ubd84\uc774 \uc9c1\uc811 \uc218\uc815 \ubcf4\uc644\ud558\uc5ec\uc11c&nbsp;<br>\uc0ac\uc6a9\ud558\uc2e4\ub54c \ub354 \ube5b\uc744 \ubcfc\uaebc\ub77c\uace0 \uc0dd\uac01\ud569\ub2c8\ub2e4^^<\/p>\n\n\n\n<p>\uc18c\uc2a4&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#!\/bin\/sh&nbsp;<br>#<br># P-Server Manager -- pbi12<br># usage : P-Menu Setting-ID<br>#<br><br>echo&nbsp;<br>echo&nbsp;<a href=\"http:\/\/linuxnew.com\/\">http:\/\/linuxnew.com<\/a>&nbsp;Made by Pbi12...<br>echo<br>echo \"[ P-Server Manager ]\"&nbsp;<br>echo<br><br>select var in \"useradd\" \"userdel\" \"public_html\" \"chmod\" \"db-creat\" \"db-drop\" \"db-privilege\" \"db-delete\" \"db-backup\" \"db-reload\" \"du\" \"exit\"<br><br>do&nbsp;<br>if [ \"$var\" = \"useradd\" ]; then&nbsp;<br>echo \"Add $1 Account~\"&nbsp;<br>\/usr\/sbin\/useradd $1 -g other<br>passwd $1<br><br>elif [ \"$var\" = \"userdel\" ]; then&nbsp;<br>echo \"$1 User Delete!\"&nbsp;<br>\/usr\/sbin\/userdel -r $1<br><br>elif [ \"$var\" = \"public_html\" ]; then&nbsp;<br>echo \"Make Web Derectory\"&nbsp;<br>mkdir \/home\/$1\/public_html<br><br>elif [ \"$var\" = \"chmod\" ]; then&nbsp;<br>echo \"Setting public_html\"&nbsp;<br>chmod 711 \/home\/$1\/<br>chmod 711 \/home\/$1\/public_html<br><br>elif [ \"$var\" = \"db-creat\" ]; then&nbsp;<br>echo \"DB-Creat\"<br>\/usr\/local\/mysql\/bin\/mysqladmin -uroot -p create $1<br><br>elif [ \"$var\" = \"db-drop\" ]; then&nbsp;<br>echo \"DB-Drop\"<br>\/usr\/local\/mysql\/bin\/mysqladmin -uroot -p drop $1<br><br>elif [ \"$var\" = \"db-privilege\" ]; then&nbsp;<br>echo \"grant all privileges on N.N to&nbsp;<a href=\"mailto:$1@localhost\">$1@localhost<\/a>&nbsp;identified by '\uc554\ud638' with grant option; INSERT INTO db VALUES('localhost', '$1', '$1','Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y'); \"<br>\/usr\/local\/mysql\/bin\/mysql -u root -p mysql<br><br>elif [ \"$var\" = \"db-delete\" ]; then&nbsp;<br>echo \"DELETE FROM user where user='$1'; DELETE FROM db where user='$1';\"<br>\/usr\/local\/mysql\/bin\/mysql -u root -p mysql<br><br>elif [ \"$var\" = \"db-backup\" ]; then&nbsp;<br>echo \"DB-Backup\"<br>\/usr\/local\/mysql\/bin\/mysqldump -u$1 -p $1 &gt; $1.sql<br><br>elif [ \"$var\" = \"db-reload\" ]; then&nbsp;<br>echo \"DB-Reload\"<br>\/usr\/local\/mysql\/bin\/mysqladmin -uroot -p reload<br><br>elif [ \"$var\" = \"du\" ]; then&nbsp;<br>echo \"Du State\"<br>du -sh \/home\/*<br><br>elif [ \"$var\" = \"exit\" ]; then&nbsp;<br>echo \"Thank you^^\"&nbsp;<br>exit 0<br><br>else&nbsp;<br>echo \"$var Re Selecte\"&nbsp;<br>fi&nbsp;<br>done<\/pre>\n\n\n\n<p>\uc774 \ud504\ub85c\uadf8\ub7a8\uc740 \uc778\uc218\ub85c \uc544\uc774\ub514\ub97c \ubc1b\uc2b5\ub2c8\ub2e4.&nbsp;<br>\uadf8\ub7f0\ud6c4\uc5d0 \uadf8 \uc544\uc774\ub514\uc5d0 \ub9de\ucdb0\uc11c \uc791\uc5c5\uc744 \ud569\ub2c8\ub2e4.&nbsp;<br>\uba54\ub274\ub294 12\uac1c\uac00 \uc788\ub294\ub370, \uc81c\uac00 \uacc4\uc815\uc744 \uc8fc\uac70\ub098 DB\ub97c \uc0c8\ub85c \uc0dd\uc131\ud558\uac70\ub098 \uc790\uc8fc \uc0ac\uc6a9\ud558\ub294 \uac83\ub4e4\uc744&nbsp;<br>\uc774\ub807\uac8c \uba54\ub274\ub85c \ub9cc\ub4e4\uc5b4 \ub193\uace0\uc11c \uacc4\uc815\uc744 \uc904\ub54c\uc5d0 \uc0ac\uc6a9\ud569\ub2c8\ub2e4.&nbsp;<br>\ub300\ucda9 \uc0b4\ud3b4 \ubcf4\uba74&nbsp;<\/p>\n\n\n\n<p>[ P-Server Manager ]&nbsp;<br>1) useradd 4) chmod 7) db-privilege 10) db-reload&nbsp;<br>2) userdel 5) db-creat 8) db-delete 11) du&nbsp;<br>3) public_html 6) db-drop 9) db-backup 12) exit<br><br>[ P-Server Manager ]&nbsp;<br>1) useradd 4) chmod 7) db-privilege 10) db-reload&nbsp;<br>2) userdel 5) db-creat 8) db-delete 11) du&nbsp;<br>3) public_html 6) db-drop 9) db-backup 12) exit<\/p>\n\n\n\n<p>\uacc4\uc815\uc744 \uc0dd\uc131\ud558\uace0 \uc0ad\uc81c\ud558\uace0 public_html \uc744 \uc8fc\uace0 \ud37c\ubbf8\uc158 \uc870\uc808\ud558\uace0, db\uc0dd\uc131\ud558\uace0, db\uacc4\uc815\ub3c4 \uc0dd\uc131\uc744 \ud569\ub2c8\ub2e4.&nbsp;<br>db\uad8c\ud55c\uc744 \uc904\ub54c\uc5d0\ub294 \ubcf5\uc0ac\ud574\uc11c \ubd99\uc5ec\ub123\uae30 \ud560 \uc218 \uc788\ub3c4\ub85d echo\ub9cc \ub418\uc5b4\uc9d1\ub2c8\ub2e4.&nbsp;<br>mysql \ub9ac\ub85c\ub4dc \ud558\uace0, du \ub85c \/home \uc544\ub798 \uc5d0 \uc788\ub294 \uacc4\uc815 \uc0ac\uc6a9\uc790\ub4e4\uc758&nbsp;<br>\ud604\uc7ac \uc0ac\uc6a9 \uc6a9\ub7c9\ub3c4 \ud655\uc778\uc744 \ud569\ub2c8\ub2e4.&nbsp;<br>12\ubc88\uc744 \ub20c\ub7ec\uc11c exit \uc885\ub8cc~&nbsp;<br>\uc81c\uac00 \uac1c\uc778\uc801\uc73c\ub85c \uc11c\ubc84 \uad00\ub9ac \ud560\ub54c\uc5d0 \uc0ac\uc6a9\ud558\ub294 \uac74\ub370, \ucc38\uace0\ud558\uc138\uc694^^<\/p>\n\n\n\n<p>\uc18c\uc2a4&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#\/bin\/sh\n#\n# $1 is acount name, $2 is domain name.!\n# Domain Setting...\n# Virtual Host Add acount Shell Program!\n#\n[ $# -ne 2 ] &amp;&amp;\n{\necho\necho ===================================================\necho\necho P-Domain&nbsp;<a href=\"http:\/\/linuxnew.com\/\">http:\/\/linuxnew.com<\/a>&nbsp;Made by Pbi12...\necho\necho usage : $0 Setting-ID Setting-Domain\necho\necho ex. P-Domain pbi12 linuxnew.com\necho\necho ===================================================\necho\nexit 1\n}\n\nif [ $2 != NULL ]; then\nadduser $1 -g other\npasswd $1\nchmod 711 \/home\/$1\n\necho \"\n&lt;VirtualHost 211.113.242.26&gt;\nServerName $2\nDocumentRoot \/home\/$1\/public_html\/\nServerAlias&nbsp;<a href=\"http:\/\/www.%242\/\">www.$2<\/a>\n&lt;\/VirtualHost&gt; \" &gt;&gt; \/usr\/local\/apache\/conf\/httpd.conf\n\necho \"\nzone \\\"$2\\\" IN {\ntype master;\nfile \\\"db.$2\\\";\n};\" &gt;&gt; \/etc\/named.conf\n\necho \"\n@ IN SOA ns.linuxnew.com. root.linuxnew.com. (\n2001122600 ; Serial\n28800 ; Refresh\n14400 ; Retry\n3600000 ; Expire\n86400 ) ; Minimum\n\nIN NS ns.linuxnew.com.\n\nlocalhost IN A 127.0.0.1\n@ IN A 211.113.242.26\nns IN A 211.113.242.26\nwww IN A 211.113.242.26\n\" &gt; \/var\/named\/db.$2\n\n\/usr\/local\/apache\/bin\/apachectl restart\n\/etc\/init.d\/named restart\n\necho<br>echo \"########################################################\"<br>echo<br>echo \"[P-VirtualHost] '$1'\uc758 \uac00\uc0c1 \ub3c4\uba54\uc778\uc744 \uc14b\ud305\ud558\uc600\uc2b5\ub2c8\ub2e4.\"<br>echo \"Apache \uc640 Dns\ub97c \uc7ac\uac00\ub3d9 \uc2dc\ucf30\uc2b5\ub2c8\ub2e4.\"<br>echo \"'$2'\ub3c4\uba54\uc778\uc73c\ub85c \uc811\uc18d\ud558\uc138\uc694!\"<br>echo \"<a href=\"http:\/\/linuxnew.com\/\">http:\/\/linuxnew.com<\/a>&nbsp;-- Made by pbi12\"<br>echo<br>echo \"########################################################\"<br>echo<br>fi<\/pre>\n\n\n\n<p>\uc774\uac74 P-VirtualHost \ud558\uace0 \uac70\uc758 \ud761\uc0ac \ud55c\uac74\ub370, \uc774\uac74 \ub3c4\uba54\uc778\uc744 \uc0c8\ub85c \uc0ac\uc11c \ub4f1\ub85d\ud558\uace0,&nbsp;<br>DNS\ub97c \uc14b\ud305\ud560\ub54c\uc5d0 \uc774\uac78\ub85c \ud558\ub294\ub370, \uc0ac\uc6a9\ubc95\uc740&nbsp;<br>\ud504\ub85c\uadf8\ub7a8\uc774\ub984 \uc801\uace0 \uc0dd\uc131\ud560 \uc544\uc774\ub514 \uc801\uace0 \uc14b\ud305\ud560 \ub3c4\uba54\uc778\uc744 \uc801\uc5b4\uc8fc\uba74,&nbsp;<br>\uc544\uc774\ub514\ub294 -g other \uadf8\ub8f9\uc73c\ub85c \uc0dd\uc131\uc744 \ud558\uace0, \ud37c\ubbf8\uc158 \uc870\uc808\uc744 \ud574\uc900\ub2e4\uc74c\uc5d0&nbsp;<br>\uadf8 \ub2e4\uc74c\uc5d0\ub294 dns \uc14b\ud305\uc744 \ud574\uc8fc\uace0,&nbsp;<br>dns\uc758 db\ud30c\uc77c\uc744 \uc0dd\uc131\ud574\uc8fc\uace0, \uadf8\ub9ac\uace0 \ub098\uc11c \uc544\ud30c\uce58\uc5d0\uc11c \uac00\uc0c1 \ud638\uc2a4\ud2b8 \uc14b\ud305\uc744 \ud574\uc90d\ub2c8\ub2e4.&nbsp;<br>\ub9c8\uc9c0\ub9c9\uc73c\ub85c named\uc640 apache\ub97c \uc7ac\uac00\ub3d9 \uc2dc\ucf1c\uc90d\ub2c8\ub2e4.&nbsp;<br>\ub3c4\uba54\uc778\uc744 \uc0c8\ub85c \ub9cc\ub4e0 \uacc4\uc815\uc5d0 \uc5f0\uacb0\uc744 \ud574\uc8fc\ub294 \uac83\uc73c\ub85c \ubc14\ub85c \ub3c4\uba54\uc778\uc744 \uce58\uba74 \uc5f0\uacb0\uc774 \ub429\ub2c8\ub2e4~&nbsp;<br>\uc5ec\ub7ec\ub3c4\uba54\uc778\uc744 \uc5f0\uacb0\ud574\uc8fc\uace0 \uc788\ub294 \uc800\ub294 \uc774\uac83\uc744 \uc0ac\uc6a9\ud574\uc11c \ud55c\ubc88\uc5d0 \uc14b\ud305\uc744 \ud574\uc8fc\uace0 \uc788\uc2b5\ub2c8\ub2e4.^^;<\/p>\n\n\n\n<p>\uc18c\uc2a4&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#\/bin\/sh<br>#<br># $1 is acount name ...<br># Virtual Host Add acount Shell Program!<br>#<br>[ $# -ne 1 ] &amp;&amp;<br>{<br>echo<br>echo ===================================================<br>echo<br>echo P-Virtual&nbsp;<a href=\"http:\/\/linuxnew.com\/\">http:\/\/linuxnew.com<\/a>&nbsp;Made by Pbi12...<br>echo<br>echo usage : $0 Setting-ID<br>echo<br>echo ===================================================<br>echo<br>exit 1<br>}<br><br>if [ $1 != NULL ]; then<br><br>adduser $1 -g other<br>passwd $1<br>chmod 711 \/home\/$1<br><br>echo \"<br>&lt;VirtualHost 211.113.242.26&gt;<br>ServerName $1.linuxnew.com<br>DocumentRoot \/home\/$1\/public_html\/<br>&lt;\/VirtualHost&gt; \" &gt;&gt; \/usr\/local\/apache\/conf\/httpd.conf<br><br>echo \"$1 IN A 211.113.242.26\" &gt;&gt; \/var\/named\/db.linuxnew.com<br><br>\/usr\/local\/apache\/bin\/apachectl restart<br>\/etc\/init.d\/named restart<br><br>echo<br>echo \"########################################################\"<br>echo<br>echo \"[P-VirtualHost] '$1'\uc758 \uac00\uc0c1 \ub3c4\uba54\uc778\uc744 \uc14b\ud305\ud558\uc600\uc2b5\ub2c8\ub2e4.\"<br>echo \"Apache \uc640 Dns\ub97c \uc7ac\uac00\ub3d9 \uc2dc\ucf30\uc2b5\ub2c8\ub2e4.\"<br>echo \"<a href=\"http:\/\/linuxnew.com\/\">http:\/\/linuxnew.com<\/a>&nbsp;-- Made by pbi12\"<br>echo<br>echo \"########################################################\"<br>echo<br>fi<\/pre>\n\n\n\n<p><br>\uc258\ud504\ub85c\uadf8\ub7a8\uc778\ub370, \uc81c\uac00 \uc81c \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc0c8\ub85c\uc6b4 \uacc4\uc815\uc744 \ub9cc\ub4e4\ub54c\uc5d0 \uc0ac\uc6a9\ud558\ub294 \uac83\uc73c\ub85c&nbsp;<br>\uacc4\uc815\uc740 -g \uc635\uc158\uc73c\ub85c other \uadf8\ub8f9\uc73c\ub85c \uc0dd\uc131\ud569\ub2c8\ub2e4.&nbsp;<br>\uadf8\ub9ac\uace0 dns\uc640 apache\ub97c \uc14b\ud305\ud574\uc11c 2\ucc28 \ub3c4\uba54\uc778\uc744 \ub9cc\ub4e4\ub54c\uc5d0 \uc0ac\uc6a9\ud558\ub294 \uac83\uc73c\ub85c \ud55c\ubc88\uc5d0 \uacc4\uc815 \uc0dd\uc131\ud558\uace0,&nbsp;<br>\ud37c\ubbf8\uc158 \uc870\uc808\ud574\uc8fc\uace0, httpd.conf\uc5d0 \uac00\uc0c1\ud638\uc2a4\ud2b8 \ucd94\uac00\ud574\uc8fc\uace0, dns \uc14b\ud305\ud574\uc8fc\uace0, \ub9c8\uc9c0\ub9c9\uc5d0 \uc7ac\uac00\ub3d9 \uc2dc\ucf1c \uc90d\ub2c8\ub2e4.&nbsp;<br>\uc544\ub798\uc5d0 \ub9c1\ud06c \uc2dc\ucf1c\ub1a8\uc73c\ub2c8\uae50 \ucc38\uace0\ud558\uc138\uc694~<\/p>\n\n\n\n<p>\ucd9c\ucc98 : linux.co.kr<br>\uc791\uc131\uc790 :&nbsp;<a href=\"mailto:pbi12@yahoo.co.kr\">pbi12@yahoo.co.kr<\/a><\/p>\n\n\n\n<p><br>\uc0ac\uc6a9\uc790 \uacc4\uc815 \ucd94\uac00 \uc258 \uc2a4\ud06c\ub9bd\ud2b8<\/p>\n\n\n\n<p>\uc0ac\uc6a9\ubc95<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> \/root\/script\/newuser \uc0ac\uc6a9\uc790ID<\/pre>\n\n\n\n<p>\uc18c\uc2a4<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#!\/bin\/bash<br><br>clear<br><br>echo ==================================================================<br>echo \" UserAdd Process Start \"<br>echo ==================================================================<br><br>echo -n \"User Name : \"<br>read username<br><br>useradd $username<br><br>echo ------------------------<br>echo PassWord Setting<br>echo ------------------------<br>passwd $username<br><br>echo ==================================================================<br>echo \" www root directory making \"<br>echo ==================================================================<br><br>echo<br>echo -n \"www root Directory path : \"<br>echo \/home\/$username\/public_html<br>mkdir -p \/home\/$username\/public_html<br>echo ==================================================================<br>echo \" root directory setting &amp; test index.php making \"<br>echo ==================================================================<br>chmod 775 \/home\/$username<br>chmod 775 \/home\/$username\/public_html<br>chown $username.$username \/home\/$username\/public_html<br><br>echo \" \" &gt;&gt;\/home\/$username\/public_html\/index.php<br>echo \"&lt;? phpinfo(); ?&gt;\" &gt;&gt; \/home\/$username\/public_html\/index.php<br><br>chown $username.$username \/home\/$username\/public_html\/index.php<br>chmod 775 \/home\/$username\/public_html\/index.php<br><br>echo checking -----------------------------------------------------------<br>ls -al \/home\/$username<br>echo checking -----------------------------------------------------------<br>ls -al \/home\/$username\/public_html<br><br>echo ==================================================================<br>echo \" MySQL useradd\"<br>echo ==================================================================<br>echo \"Username : $username\"<br>echo \"dbname : $username\"<br>echo -n \"User p\/w : \"<br>read userpw<br>echo \" \" &gt;&gt; mysql_useradd.sql<br>echo \"use mysql\" &gt;&gt; mysql_useradd.sql<br>echo \"create database $username;\" &gt;&gt; mysql_useradd.sql<br>echo \"insert into user (host, user, password) values ('localhost', '$username', password('$userpw'));\" &gt;&gt; mysql_useradd.sql<br>echo \"insert into db values ('localhost', '$username', '$username', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');\" &gt;&gt; mysql_useradd.sql<br>echo \"FLUSH PRIVILEGES;\" &gt;&gt; mysql_useradd.sql<br>\/usr\/local\/mysql\/bin\/mysql -uroot -p97081056 &lt; .\/mysql_useradd.sql<br>cat .\/mysql_useradd.sql<br>rm -rf .\/mysql_useradd.sql<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/bashecho &#8221;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; [1] \uc0ac\uc6a9\uc790 \uacc4\uc815 \ucd94\uac00 \ud569\ub2c8\ub2e4.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.space4u.co.kr\/wp\/?p=138\">\ub354 \uc77d\uae30<span class=\"screen-reader-text\">[\ud638\uc2a4\ud305 \uad6c\ucd95] \uc258 \uc2a4\ud06c\ub9bd\ud2b8<\/span> <i class=\"fas fa-angle-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[58,112],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts\/138"}],"collection":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=138"}],"version-history":[{"count":3,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts\/138\/revisions"}],"predecessor-version":[{"id":250,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts\/138\/revisions\/250"}],"wp:attachment":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=138"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}