{"id":209962,"date":"2014-01-22T15:35:03","date_gmt":"2014-01-22T11:35:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=209962"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=209962","title":{"rendered":"<span class=\"post_title\">\u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Apache \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 bash \u0441\u043a\u0440\u0438\u0442\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b \u0441 VPS \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u043e\u0441\u0442\u0440\u043e \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0443 \u0441\u0430\u0439\u0442\u043e\u0432 \u0441\u043e \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 \u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0432 \u0434\u043e\u0432\u0435\u0441\u043e\u043a \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0448\u043b\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f ISPmanager, \u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043d\u0435 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0434\u0432\u0435 \u0432\u0435\u0449\u0438:  <\/p>\n<ul>\n<li>\u041f\u0430\u043d\u0435\u043b\u044c \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430 \u0442\u0435\u0431\u044f, \u0430 \u043c\u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u043a\u0438\u043b \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0430\u0434\u043c\u0438\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/li>\n<li>\u041d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043d\u0435\u043b\u044c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e \u043f\u0430\u043f\u043a\u0438 \u0441 \u0441\u0430\u0439\u0442\u043e\u043c (\/var\/www\/user_name\/data\/www\/site.ru)<\/li>\n<\/ul>\n<p>  \u0412 \u0441\u0438\u043b\u0443 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0438\u043b \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043a\u0430\u043c\u0438. \u041f\u0440\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Apache \u0438 php, \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435. \u041d\u0430\u0441 \u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430, \u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0440\u043e\u0448\u0443 \u0432 \u043f\u043e\u0434\u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041b\u043e\u0433\u0438\u043a\u0443 \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430.  <\/p>\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0432 \u0435\u0433\u043e \u043f\u0430\u043f\u043a\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0430\u0439\u0442\u044b. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435\u0442, \u0442\u043e \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c, \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u0439\u0442.<\/li>\n<li>\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0431\u0430\u0437\u044b, \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044f \u0435\u043c\u0443 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 \u043d\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u0431\u0430\u0437\u0443.<\/li>\n<\/ul>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0434\u043b\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432.  <\/p>\n<ul>\n<li>\u041e\u0431\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u043f\u0430\u0440\u043e\u043b\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. <\/li>\n<li>\u041a\u043e\u043d\u0444\u0438\u0433\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0435\u0436\u0430\u0442\u044c \u0432 \/etc\/apache2\/vhosts.<\/li>\n<li>\u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043f\u043e\u0434 \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/li>\n<\/ul>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 (\/home\/addsite)  <\/p>\n<pre><code class=\"bash\">#!\/bin\/bash IP_ADDRESS=&quot;1.2.3.4&quot;  APACHE2_DIR=&quot;\/etc\/apache2&quot;  UID_ROOT=0  if [ &quot;$UID&quot; -ne &quot;$UID_ROOT&quot; ]; then   echo &quot;$0 - Requires root privileges&quot;   exit 1 fi  function is_user(){     local check_user=&quot;$1&quot;;     grep &quot;$check_user:&quot; \/etc\/passwd &gt;\/dev\/null     if [ $? -ne 0 ]; then  #echo &quot;NOT HAVE USER&quot;  return 0     else  #echo &quot;HAVE USER&quot;  return 1     fi }   function generate_pass(){     CHARS=&quot;0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()-_=+\\\\|\/&quot;     LENGTH=&quot;8&quot;     while [ &quot;${n:=1}&quot; -le &quot;$LENGTH&quot; ] ; do \tPASSWORD=&quot;$PASSWORD${CHARS:$(($RANDOM%${#CHARS})):1}&quot;         let n+=1     done     echo $PASSWORD }   function is_yes(){ #TODO - add check 3-rd parameter for set default ansver (if press enter)     while true     do  echo -n &quot;Yes or No[Y\/n]:&quot;  read  x  if [ -z &quot;$x&quot; ]  then      return 0; #defaul answer: Yes  fi  case &quot;$x&quot; in  y |Y |yes |\u0414 |\u0434 |\u0434\u0430 ) return 0;;  n |N |no |\u041d |\u043d |\u043d\u0435\u0442 ) return 1;; # * ) ; # asc again  esac     done }  function create_user(){     local login=&quot;$1&quot;     local password=&quot;$2&quot;     `useradd -m -s \/bin\/bash $login`     #set password     echo -e &quot;$password\\n$password\\n&quot; | passwd $login &gt;&gt; \/dev\/null }  USER_NAME=$1  echo -n &quot;Check user name $USER_NAME: &quot; if( is_user &quot;$USER_NAME&quot; )then     USER_PASSWORD=&quot;$(generate_pass)&quot;     echo &quot;-----------------------------------&quot;     echo &quot;User name    : $USER_NAME&quot;     echo &quot;User password: $USER_PASSWORD&quot;     echo &quot;-----------------------------------&quot;     echo -n &quot;Continue? &quot;     if(! is_yes) then         exit;     fi     echo &quot;--- create user ---&quot;     create_user &quot;$USER_NAME&quot; &quot;$USER_PASSWORD&quot; fi  if [ $# -eq 2 ]; then     if [ &quot;$2&quot; != &quot;delete&quot; ]; then         SITE_NAME=$2                  mkdir \/home\/$USER_NAME\/$SITE_NAME         mkdir \/home\/$USER_NAME\/$SITE_NAME\/www         mkdir \/home\/$USER_NAME\/$SITE_NAME\/logs         mkdir \/home\/$USER_NAME\/$SITE_NAME\/tmp         mkdir \/home\/$USER_NAME\/$SITE_NAME\/cgi-bin                  hostConf=&quot; &lt;VirtualHost ${IP_ADDRESS}:80&gt;         ServerName $SITE_NAME         ServerAlias www.$SITE_NAME         ServerAdmin webmaster@$SITE_NAME          AddDefaultCharset utf-8         AssignUserID ${USER_NAME} ${USER_NAME}          DocumentRoot \/home\/$USER_NAME\/$SITE_NAME\/www         CustomLog log combined         ErrorLog \/home\/$USER_NAME\/$SITE_NAME\/logs\/error.log         DirectoryIndex index.php index.html          ScriptAlias \/cgi-bin\/ \/home\/$USER_NAME\/$SITE_NAME\/cgi-bin         &lt;FilesMatch \\&quot;\\\\.ph(p[3-5]?|tml)$\\&quot;&gt;                 SetHandler application\/x-httpd-php         &lt;\/FilesMatch&gt;         &lt;FilesMatch \\&quot;\\\\.phps$\\&quot;&gt;                 SetHandler application\/x-httpd-php-source         &lt;\/FilesMatch&gt;         php_admin_value upload_tmp_dir &quot;\/home\/$USER_NAME\/$SITE_NAME\/tmp&quot;         php_admin_value session.save_path &quot;\/home\/$USER_NAME\/$SITE_NAME\/tmp&quot;         php_admin_value open_basedir &quot;\/home\/$USER_NAME\/$SITE_NAME\/www:.&quot; &lt;\/VirtualHost&gt; &lt;Directory \/home\/$USER_NAME\/$SITE_NAME\/www&gt;         Options +Includes +ExecCGI         php_admin_flag engine on &lt;\/Directory&gt;         &quot;          touch ${APACHE2_DIR}\/vhosts\/${SITE_NAME}.conf         echo &quot;$hostConf&quot; &gt;&gt; ${APACHE2_DIR}\/vhosts\/${SITE_NAME}.conf         touch \/\/home\/$USER_NAME\/$SITE_NAME\/www\/index.php         echo &quot;&lt;?php phpinfo() ?&gt;&quot; &gt;&gt; \/home\/$USER_NAME\/$SITE_NAME\/www\/index.php                  chown $USER_NAME:$USER_NAME \/home\/$USER_NAME\/$SITE_NAME\/*                  service apache2 restart     fi fi;  #display information echo &quot;*****************************************&quot; echo &quot;* Profit!&quot; echo &quot;*****************************************&quot;<\/code><\/pre>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c \u043d\u0438 \u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e, \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0437\u0430\u0434\u0430\u0435\u043c ip \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043f\u0430\u043f\u043a\u0443 \u0433\u0434\u0435 \u0443 \u043d\u0430\u0441 \u043b\u0435\u0436\u0430\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u043f\u0430\u0447\u0430. \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430  <\/p>\n<pre><code class=\"bash\">chmod -x \/home\/addsite<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0430\u043f\u0430\u0447 \u043c\u043e\u0433 \u043f\u043e\u0434\u0446\u0435\u043f\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c   <\/p>\n<pre><code class=\"bash\">Include vhosts\/<\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0441\u0442\u043e   <\/p>\n<pre><code class=\"bash\">\/home\/addsite user_name site.ru<\/code><\/pre>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0430\u043f\u0430\u0447. \u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<br \/>  \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u0435\u043d\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0433\u0430\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0438\u0437 phpMyAdmin, \u043d\u0430\u0434\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0430\u0437\u0443, \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u043b\u0435\u0433\u0438\u0438 \u0431\u0434, \u043d\u043e\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0432\u043e\u0442 \u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u043c \u0441\u0435\u0431\u0435 \u0436\u0438\u0437\u043d\u044c (\/home\/addbd).  <\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  MYSQL_PASS=&quot;derev123blog&quot;  UID_ROOT=0  if [ &quot;$UID&quot; -ne &quot;$UID_ROOT&quot; ]; then   echo &quot;$0 - Requires root privileges&quot;   exit 1 fi  function generate_pass(){     CHARS=&quot;0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()-_=+\\\\|\/&quot;     LENGTH=&quot;8&quot;     while [ &quot;${n:=1}&quot; -le &quot;$LENGTH&quot; ] ; do  PASSWORD=&quot;$PASSWORD${CHARS:$(($RANDOM%${#CHARS})):1}&quot;         let n+=1     done     echo $PASSWORD }  function is_running(){     local result=&quot;$(ps -A|grep $1|wc -l)&quot;     if [[ $result -eq 0 ]]; then  return 1     else  return 0     fi }  if [ $# -eq 1 ]; then     echo -n &quot;Check MySQL status: &quot;     if(is_running mysqld)then         echo &quot;OK [Running]&quot;;         DB_NAME=$1         DB_PASSWORD=&quot;$(generate_pass)&quot;         mysql -uroot -p${MYSQL_PASS} --execute=&quot;create database ${DB_NAME};&quot;         mysql -uroot -p${MYSQL_PASS} --execute=&quot;GRANT ALL PRIVILEGES ON ${DB_NAME}.* TO '${DB_NAME}'@'localhost' IDENTIFIED by '${DB_PASSWORD}'  WITH GRANT OPTION;&quot;     else         echo &quot;Error: need start mysql daemon!&quot;         exit     fi fi;  #display information echo &quot;*****************************************&quot; echo &quot;* Data base name: ${DB_NAME}&quot; echo &quot;* Data base user: ${DB_NAME}&quot; echo &quot;* User password: ${DB_PASSWORD}&quot; echo &quot;* Profit!&quot; echo &quot;*****************************************&quot;<\/code><\/pre>\n<p>  \u0412 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root \u0438\u0437 MySQL. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439   <\/p>\n<pre><code class=\"bash\">\/home\/addsite bd_name<\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438 \u0432\u044b\u0432\u0438\u0434\u0443\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<br \/>  \u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0430 \u0444\u0430\u0439\u043b\u0432 \u0432 \u0434\u0438\u0440\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \/bin \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0430\u043d\u0434  <\/p>\n<pre><code class=\"bash\">cp \/home\/addsite \/bin\/addsite cp \/home\/addbd \/bin\/addbd<\/code><\/pre>\n<p>  \u0412\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u0432\u0441\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0436\u0438\u0437\u043d\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u043c\u043d\u0435. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/209962\/\"> http:\/\/habrahabr.ru\/post\/209962\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b \u0441 VPS \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u043e\u0441\u0442\u0440\u043e \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0443 \u0441\u0430\u0439\u0442\u043e\u0432 \u0441\u043e \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 \u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0432 \u0434\u043e\u0432\u0435\u0441\u043e\u043a \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0448\u043b\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f ISPmanager, \u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043d\u0435 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0434\u0432\u0435 \u0432\u0435\u0449\u0438:  <\/p>\n<ul>\n<li>\u041f\u0430\u043d\u0435\u043b\u044c \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430 \u0442\u0435\u0431\u044f, \u0430 \u043c\u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u043a\u0438\u043b \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0430\u0434\u043c\u0438\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/li>\n<li>\u041d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043d\u0435\u043b\u044c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e \u043f\u0430\u043f\u043a\u0438 \u0441 \u0441\u0430\u0439\u0442\u043e\u043c (\/var\/www\/user_name\/data\/www\/site.ru)<\/li>\n<\/ul>\n<p>  \u0412 \u0441\u0438\u043b\u0443 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0438\u043b \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043a\u0430\u043c\u0438. \u041f\u0440\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Apache \u0438 php, \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435. \u041d\u0430\u0441 \u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430, \u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0440\u043e\u0448\u0443 \u0432 \u043f\u043e\u0434\u043a\u0430\u0442.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-209962","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/209962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=209962"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/209962\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}