{"id":1290,"date":"2021-09-08T16:39:35","date_gmt":"2021-09-08T07:39:35","guid":{"rendered":"https:\/\/manvscloud.com\/?p=1290"},"modified":"2022-10-25T20:50:50","modified_gmt":"2022-10-25T11:50:50","slug":"ncp-aws-to-ncloud-server-migration-2%ed%8e%b8","status":"publish","type":"post","link":"https:\/\/manvscloud.com\/?p=1290","title":{"rendered":"[NCLOUD] AWS to NCloud Server Migration \u2013 #2\ud3b8"},"content":{"rendered":"\n<p>\uc548\ub155\ud558\uc138\uc694. ManVSCloud \uae40\uc218\ud604\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc624\ub298 &#8220;AWS TO NCLOUD SERVER MIGRATION \u2013 #2\ud3b8&#8221;\uc5d0\uc11c\ub294 \uac04\ub2e8\ud55c Install\uacfc \uc81c\uac00 \uae30\ubcf8\uc801\uc73c\ub85c \uc124\uc815\ud558\ub294 \uc124\uc815\uac12\ub4e4\uc744 \ubcf4\uc5ec\ub4dc\ub9ac\uba70 \uc815\ubcf4\ub97c \uacf5\uc720\ud558\uace0\uc790 \ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h3 class=\"has-white-color has-vivid-green-cyan-background-color has-text-color has-background wp-block-heading\"> Base Install<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# cat \/etc\/redhat-release\nCentOS Linux release 7.8.2003 (Core)<\/pre>\n\n\n\n<p>&#8220;[NCP] AWS TO NCLOUD SERVER MIGRATION \u2013 #1\ud3b8&#8221;\uc5d0\uc11c \uc0dd\uc131\ud55c \uc11c\ubc84\uc5d0 \uae30\ubcf8 \uc124\uce58\uc640 \uc124\uc815 \uc791\uc5c5\uc744 \uc9c4\ud589\ud558\uae30\ub85c \ud588\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">? Nginx \uc124\uce58<\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vi \/etc\/yum.repos.d\/Nginx.repo<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[nginx]\nname=nginx repo\nbaseurl=http:\/\/nginx.org\/packages\/centos\/7\/$basearch\/\ngpgcheck=0\nenabled=1<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# yum install nginx -y<\/pre>\n\n\n\n<p>CentOS 7\uc5d0\uc11c\ub294 \uc704\uc640 \uac19\uc774 repo\ub97c \ucd94\uac00 \ud6c4 \uc124\uce58\ub97c \uc9c4\ud589\ud558\uba74 \uc124\uce58\uac04\uc5d0 \ud070 \uc5b4\ub824\uc6c0\uc740 \uc5c6\uc744 \uac83\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc774\ud6c4 LB\ub97c \ubd99\uc774\uba74 Nginx Access Log\uc5d0\uc11c LB\uc758 \ub85c\uadf8\ub85c \ub098\uc624\uae30\ub54c\ubb38\uc5d0 Client IP\ub97c \ubcf4\uae30 \uc704\ud574\uc11c\ub294 nginx -V 2&gt;&amp;1 | grep &#8216;http_realip_module&#8217; \ub85c \ud655\uc778\ud558\uc5ec http_realip_module\uc774 \uc788\ub294\uc9c0 \ud655\uc778\uc774 \ub418\uc5b4\uc57c\ud569\ub2c8\ub2e4. <\/p>\n\n\n\n<p>RPM \uc124\uce58 \uc2dc \uc774 \ubaa8\ub4c8\uc774 \ub4e4\uc5b4\uac00\uc788\ub294\ub370 \ucef4\ud30c\uc77c\ub85c \uc124\uce58\ub97c \uc9c4\ud589\ud560 \uacbd\uc6b0 \uc774 \ubd80\ubd84\uc744 \uc798 \uccb4\ud06c\ud574\uc8fc\uc154\uc57c\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# nginx -V 2>&amp;1 | grep 'http_realip_module'\nconfigure arguments: --prefix=\/usr\/share\/nginx --sbin-path=\/usr\/sbin\/nginx --modules-path=\/usr\/lib64\/nginx\/modules --conf-path=\/etc\/nginx\/nginx.conf --error-log-path=\/var\/log\/nginx\/error.log --http-log-path=\/var\/log\/nginx\/access.log --http-client-body-temp-path=\/var\/lib\/nginx\/tmp\/client_body --http-proxy-temp-path=\/var\/lib\/nginx\/tmp\/proxy --http-fastcgi-temp-path=\/var\/lib\/nginx\/tmp\/fastcgi --http-uwsgi-temp-path=\/var\/lib\/nginx\/tmp\/uwsgi --http-scgi-temp-path=\/var\/lib\/nginx\/tmp\/scgi --pid-path=\/run\/nginx.pid --lock-path=\/run\/lock\/subsys\/nginx --user=nginx --group=nginx --with-compat --with-debug --with-file-aio --with-google_perftools_module --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=\/usr\/lib\/rpm\/redhat\/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=\/usr\/lib\/rpm\/redhat\/redhat-hardened-ld -Wl,-E'<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">? PHP \uc124\uce58<\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 src]# yum -y install http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm\n[root@manvscloud-web-pub-kr1 src]# yum -y install epel-release yum-utils\n[root@manvscloud-web-pub-kr1 src]# yum-config-manager --disable remi-php54\n[root@manvscloud-web-pub-kr1 src]# yum-config-manager --enable remi-php74\n[root@manvscloud-web-pub-kr1 src]# yum install -y php php-json php-cli php-gd php-pear php-common php-mysqlnd php-fpm php-mbstring php-opcache php-process php-xmlrpc php-pdo php-xml php-bcmath php-devel php-zip php-mcrypt\n[root@manvscloud-web-pub-kr1 src]# yum groupinstall \" Development Tools\" -y\n[root@manvscloud-web-pub-kr1 src]# yum install ImageMagick ImageMagick-devel -y\n[root@manvscloud-web-pub-kr1 src]# pecl install imagick\n[root@manvscloud-web-pub-kr1 src]# echo \"extension=imagick.so\" >> \/etc\/php.ini\n[root@manvscloud-web-pub-kr1 src]# systemctl enable php-fpm\n[root@manvscloud-web-pub-kr1 src]# systemctl start php-fpm<\/pre>\n\n\n\n<p>PHP\ub294 remi\ub97c \uc774\uc6a9\ud558\uc5ec \uc124\uce58\ub97c \uc9c4\ud589\ud588\uc2b5\ub2c8\ub2e4.<br>Migration\ud560 \ub54c \uc8fc\uc758\ud560 \uc810 \uc911 \ud558\ub098\ub294 PHP\uc758 \ubaa8\ub4c8\uc744 \ub9de\ucdb0\uc8fc\ub294 \uac83\uc785\ub2c8\ub2e4.<br>\uae30\uc874 \uc11c\ubc84\uc640 \uc774\uc804\ud558\ub294 \uc11c\ubc84\uc5d0\uc11c php -m \ub85c \ud655\uc778\ud574\uc90d\uc2dc\ub2e4.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">? MariaDB \uc124\uce58<\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vi \/etc\/yum.repos.d\/MariaDB.repo<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[mariadb]\nname = MariaDB\nbaseurl = http:\/\/yum.mariadb.org\/10.5\/centos7-amd64\ngpgkey=https:\/\/yum.mariadb.org\/RPM-GPG-KEY-MariaDB\ngpgcheck=1<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">yum install MariaDB-server MariaDB-client -y<\/pre>\n\n\n\n<p>MariaDB\ub3c4 repo\ub9cc \ucd94\uac00\ud574\uc8fc\uba74 \uc27d\uac8c \uc124\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br>MariaDB\uc758 \ubc84\uc804\uc740 baseurl \ubd80\ubd84\uc5d0\uc11c 10.5 \ubd80\ubd84\uc744 \uc6d0\ud558\uc2dc\ub294 \ubc84\uc804\uc73c\ub85c \ubcc0\uacbd\ud558\uba74 \uc6d0\ud558\uc2dc\ub294 \ubc84\uc804\uc73c\ub85c \uc124\uce58\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">? Memcached<\/h5>\n\n\n\n<p>Memcached\uc758 \uacbd\uc6b0 \uac1c\uc778 \uc0ac\uc774\ud2b8 \uc6b4\uc601\uc5d0 \ud070 \ud6a8\uacfc\ub97c \uac00\uc838\ub2e4\uc8fc\uc9c0 \ubabb\ud55c\ub2e4\ub294 \ud3c9\uc774 \uc788\uc5c8\uc73c\ub098 \uac1c\uc778 \ube14\ub85c\uadf8 \uc6a9\ub3c4\ubfd0\ub9cc \uc544\ub2c8\ub77c \ub2e4\uc591\ud55c \ud14c\uc2a4\ud2b8\ub97c \ud574\ubcfc \uc608\uc815\uc774\uae30\uc5d0 memcached\ub97c \ub3c4\uc785\ud558\uae30\ub85c \ud588\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# yum clean all\n[root@manvscloud-web-pub-kr1 ~]# yum update -y\n[root@manvscloud-web-pub-kr1 ~]# yum install memcached -y<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# cat \/etc\/sysconfig\/memcached \nPORT=\"11211\"\nUSER=\"memcached\"\nMAXCONN=\"1024\"\nCACHESIZE=\"64\"\nOPTIONS=\"\"<\/pre>\n\n\n\n<p>\/etc\/sysconfig\/memcached \uac12\uc744 \uc544\ub798\uc640 \uac19\uc774 \ubcc0\uacbd\ud574\uc8fc\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# cp -avp \/etc\/sysconfig\/memcached \/etc\/sysconfig\/memcached_org\n[root@manvscloud-web-pub-kr1 ~]# vi \/etc\/sysconfig\/memcached\nPORT=\"11111\"\nUSER=\"memcached\"\nMAXCONN=\"2048\"\nCACHESIZE=\"4096\"\nOPTIONS=\"\"\n\n[root@manvscloud-web-pub-kr1 ~]# systemctl enable memcached\n[root@manvscloud-web-pub-kr1 ~]# systemctl start memcached<\/pre>\n\n\n\n<p>php-memcached\ub3c4 \uc124\uce58\ud574\uc90d\uc2dc\ub2e4!<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# yum install php-memcached -y<\/pre>\n\n\n\n<p>php.ini\ub97c \ubcf4\uba74 session.save_handler\uac00 files\ub85c \ub418\uc5b4\uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc774\ub97c memcached\ub85c \ubcc0\uacbd\ud574\uc904 \uac83\uc785\ub2c8\ub2e4. <br>\uc544\ub798\ucc98\ub7fc \uc791\uc5c5\uc744 \uc9c4\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# cp -avp \/etc\/php.ini \/etc\/php.ini_org\n[root@manvscloud-web-pub-kr1 ~]# cat -n \/etc\/php.ini | grep -E \"session.save_handler|session.save_path\"\n  1214\tsession.save_handler = files\n  1222\t;     session.save_path = \"N;\/path\"\n  1238\t;     session.save_path = \"N;MODE;\/path\"\n  1247\t;session.save_path = \"\/tmp\"\n  1332\t;       (see session.save_path above), then garbage collection does *not*\n[root@manvscloud-web-pub-kr1 ~]# sed -i '1214s\/files\/memcached\/g' \/etc\/php.ini\n[root@manvscloud-web-pub-kr1 ~]# perl -p -i -e '$.==1222 and print \"session.save_path = \\\"127.0.0.1:11111\\\"\\n\"' \/etc\/php.ini\n[root@manvscloud-web-pub-kr1 ~]# cat -n \/etc\/php.ini | grep -E \"session.save_handler|session.save_path \"\n  1214\tsession.save_handler = memcached\n  1222\tsession.save_path = \"127.0.0.1:11111\"\n  1223\t;     session.save_path = \"N;\/path\"\n  1239\t;     session.save_path = \"N;MODE;\/path\"\n  1248\t;session.save_path = \"\/tmp\"\n  1333\t;       (see session.save_path above), then garbage collection does *not*<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# systemctl restart memcached\n[root@manvscloud-web-pub-kr1 ~]# systemctl restart php-fpm<\/pre>\n\n\n\n<p>\uadf8\ub0e5 \ube14\ub85c\uadf8\ub9cc \uc6b4\uc601\ud558\ub358 \uc11c\ubc84\ub2e4\ubcf4\ub2c8 \ud06c\uac8c \uc124\uce58\ud560 \uac83\ub4e4\uc774 \ubcc4\ub85c \uc5c6\uc2b5\ub2c8\ub2e4.<br>\uc774\uc81c \uae30\ubcf8 \uc138\ud305\ub9cc \uc9c4\ud589\ud574\ubcf4\ub3c4\ub85d \ud569\uc2dc\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h3 class=\"has-white-color has-vivid-red-background-color has-text-color has-background wp-block-heading\"> Default Settings<\/h3>\n\n\n\n<p>\uc6b0\uc120 sshd \uc124\uc815\uc744 \uba3c\uc800 \uc9c4\ud589\ud558\uae30\ub85c \ud588\uc2b5\ub2c8\ub2e4.<br>\uc124\uc815 \uc870\uac74\uc740 \uc544\ub798\uc640 \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<ul><li><strong>SSH \ud3ec\ud2b8\ub97c 22\uc5d0\uc11c 15222\ub85c \ubcc0\uacbd\ud560 \uac83<\/strong><\/li><li><strong>manvscloud \uc0ac\uc6a9\uc790 \uc0dd\uc131 \ubc0f sudo\ub85c root\uad8c\ud55c \uc0ac\uc6a9<\/strong><\/li><li><strong>root\ub85c \ubc14\ub85c \uc811\uc18d\ud560 \uc218 \uc5c6\ub3c4\ub85d \uc124\uc815<\/strong><\/li><li><strong>\uc811\uc18d \uc2dc Password\uac00 \uc544\ub2cc Public Key \ud30c\uc77c\uc744 \uc774\uc6a9\ud558\uc5ec \ub85c\uadf8\uc778<\/strong><\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# useradd manvscloud<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \uba3c\uc800 \uc11c\ubc84\uc5d0 key \ud30c\uc77c\uc744 \uc5c5\ub85c\ub4dc \ud55c \ub4a4 \uc791\uc5c5\uc744 \uc9c4\ud589\ud558\uc600\uc2b5\ub2c8\ub2e4.\n\n[root@manvscloud-web-pub-kr1 ~]# chmod 400 manvscloud.pem\n[root@manvscloud-web-pub-kr1 ~]# mkdir \/home\/manvscloud\/.ssh\n[root@manvscloud-web-pub-kr1 ~]# ssh-keygen -y -f manvscloud.pem > \/home\/manvscloud\/.ssh\/authorized_keys\n[root@manvscloud-web-pub-kr1 ~]# chown -R manvscloud:manvscloud \/home\/manvscloud\/.ssh\n[root@manvscloud-web-pub-kr1 ~]# chmod 700 \/home\/manvscloud\/.ssh\n[root@manvscloud-web-pub-kr1 ~]# chmod 600 \/home\/manvscloud\/.ssh\/authorized_keys\n\n[root@manvscloud-web-pub-kr1 ~]# id manvscloud\nuid=1001(manvscloud) gid=1001(manvscloud) groups=1001(manvscloud)\n[root@manvscloud-web-pub-kr1 ~]# gpasswd -a manvscloud wheel\nAdding user manvscloud to group wheel\n[root@manvscloud-web-pub-kr1 ~]# gpasswd -a manvscloud systemd-journal\nAdding user manvscloud to group systemd-journal\n\n[root@manvscloud-web-pub-kr1 ~]# grep -E \"wheel|systemd-journal\" \/etc\/group\nwheel:x:10:manvscloud\nsystemd-journal:x:190:manvscloud\n\n[root@manvscloud-web-pub-kr1 ~]# cat &lt;&lt; EOF > \/etc\/sudoers.d\/10-manvscloud-users\n> # User rules for manvscloud\n> manvscloud ALL=(ALL) NOPASSWD:ALL\n> EOF\n[root@manvscloud-web-pub-kr1 ~]# chmod 440 \/etc\/sudoers.d\/10-manvscloud-users\n[root@manvscloud-web-pub-kr1 ~]# passwd -l root\nLocking password for user root.\npasswd: Success\n\n\/\/\/etc\/ssh\/sshd_config \ud30c\uc77c \uc218\uc815\n\n[root@manvscloud-web-pub-kr1 ~]# cat -n \/etc\/ssh\/sshd_config  | grep -E \"Port|PermitRootLogin|PasswordAuthentication\"\n    17\t#Port 22\n    38\tPermitRootLogin yes\n    63\t#PasswordAuthentication yes\n    65\tPasswordAuthentication yes\n    88\t# PasswordAuthentication.  Depending on your PAM configuration,\n    90\t# the setting of \"PermitRootLogin without-password\".\n    92\t# PAM authentication, then enable this but set PasswordAuthentication\n   100\t#GatewayPorts no\n\n\n[root@manvscloud-web-pub-kr1 ~]# cp -avp \/etc\/ssh\/sshd_config \/etc\/ssh\/sshd_config_org\n[root@manvscloud-web-pub-kr1 ~]# sed -i '38s\/yes\/no\/g' \/etc\/ssh\/sshd_config\n[root@manvscloud-web-pub-kr1 ~]# sed -i '65s\/yes\/no\/g' \/etc\/ssh\/sshd_config\n[root@manvscloud-web-pub-kr1 ~]# perl -p -i -e '$.==17 and print \" Port 15222\\n\"' \/etc\/ssh\/sshd_config\n\n[root@manvscloud-web-pub-kr1 ~]# systemctl restart sshd\n<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\ub2e4\uc74c\uc740 php\uc124\uc815\uc744 \ud574\uc904 \uac83\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc6b0\uc120 php.ini \ud30c\uc77c\uacfc www.conf \ud30c\uc77c\uc744 \uc218\uc815\ud560\uac74\ub370 pm \uac12\uc744 \uc870\uc815\ud558\ub294 \ucd5c\uc801\ud654 \uc791\uc5c5\uc740 \uae30\ubcf8 \uc124\uc815\uc5d0\uc11c \uc81c\uc678\ud558\uc600\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>php.ini\ud30c\uc77c\uc5d0\uc11c\ub294 \uc544\ub798\uc640 \uac19\uc774 \uac12\uc744 \ubcc0\uacbd\ud574\uc8fc\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   date.timezone = \"Asia\/Seoul\"\n   expose_php = Off\n   short_open_tag = On\n   allow_url_fopen = Off\n   max_execution_time = 60\n   memory_limit = 128M<\/pre>\n\n\n\n<p>\uc774\ubc88 \uc774\uc804\uc5d0\uc11c \ud3ec\uc778\ud2b8\ub85c \uc815\ud55c php-fpm\uc758 \ud30c\uc77c \uc18c\ucf13 \ud1b5\uc2e0\uc744 \uc124\uc815\ud558\ub294 \ubd80\ubd84\uc785\ub2c8\ub2e4.<br>www.conf\uc5d0\uc11c \uae30\uc874 listen\uc774 127.0.0.1:9000\ub85c TCP\/IP \uc18c\ucf13 \ud1b5\uc2e0\uc774 \uae30\ubcf8\uac12\uc778\ub370 \uc774\ub97c \/run\/php-fpm\/www.sock \uc73c\ub85c \ubcc0\uacbd\ud558\uc5ec Unix  Socket \ud1b5\uc2e0\uc774 \ub418\ub3c4\ub85d \ud558\uc600\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# cat -n \/etc\/php-fpm.d\/www.conf | grep listen | grep -v \";\"\n    38\tlisten = 127.0.0.1:9000\n    64\tlisten.allowed_clients = 127.0.0.1\n[root@manvscloud-web-pub-kr1 ~]# sed -i '38s$127.0.0.1:9000$\/run\/php-fpm\/www.sock$g' \/etc\/php-fpm.d\/www.conf\n[root@manvscloud-web-pub-kr1 ~]# cat -n \/etc\/php-fpm.d\/www.conf | grep listen | grep -v \";\"\n    38\tlisten = \/run\/php-fpm\/www.sock\n    64\tlisten.allowed_clients = 127.0.0.1<\/pre>\n\n\n\n<p>\uc774 Unix Socket \ubc29\uc2dd\uc740 TCP\uc758 \uc18c\ucf13\uacfc \ub3d9\uc77c\ud558\uac8c API\ub85c \ub370\uc774\ud130\ub97c \uc8fc\uace0\ubc1b\uc744 \uc218 \uc788\ub294\ub370 \uc774\ub294 \ub85c\uceec \ud30c\uc77c \uae30\ubc18 \uc18c\ucf13\uc774\ub77c\uc11c Nginx\uc640 \ud568\uaed8 \uc4f0\uae30 \uc704\ud574 php-fpm\ub97c \uac19\uc740 \ub85c\uceec\ub0b4\uc5d0 \uc874\uc7ac\ud558\ub3c4\ub85d \ud558\uc600\uc2b5\ub2c8\ub2e4. \uc774 \ubc29\uc2dd\uc740 localhost \ub0b4\uc5d0 \ud504\ub85c\uc138\uc2a4 \uac04 \ud1b5\uc2e0\uc774\ub77c \uc18d\ub3c4\ub3c4 \uc6b0\uc6d4\ud558\uace0 \uba54\ubaa8\ub9ac \uc18c\ubaa8\ub97c \uc904\uc77c \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">? nofile \uc124\uc815<\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vi \/etc\/security\/limits.conf<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">*               soft    nofile          65535\n*               hard    nofile          65535<\/pre>\n\n\n\n<p>\uc704 \uc124\uc815\uc744 \ud574\uc8fc\uc9c0 \uc54a\uc73c\uba74 \ud30c\uc77c \uc5f4\uae30 \ucd5c\ub300 \uac1c\uc218\uac00 <strong>soft\/1024, hard\/4096<\/strong>\uc774 default\uc778 \uac83\uc73c\ub85c \uae30\uc5b5\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">? History<\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@manvscloud-web-pub-kr1 ~]# cat -n \/etc\/profile | grep HISTFILESIZE\n    78\tHISTFILESIZE=0\n[root@manvscloud-web-pub-kr1 ~]# sed -i '78s\/0\/5000\/g' \/etc\/profile\n[root@manvscloud-web-pub-kr1 ~]# cat -n \/etc\/profile | grep HISTFILESIZE\n    78\tHISTFILESIZE=5000\n[root@manvscloud-web-pub-kr1 ~]# echo export HISTTIMEFORMAT=\\\"[%F %T] \\\" > \/etc\/profile.d\/bash_history.sh\n[root@manvscloud-web-pub-kr1 ~]# chmod 755 \/etc\/profile.d\/bash_history.sh\n[root@manvscloud-web-pub-kr1 ~]# init 6\n<\/pre>\n\n\n\n<p>\uc800\ub294 history\ub97c \uc790\uc8fc \uc774\uc6a9\ud558\ub294 \ud3b8\uc785\ub2c8\ub2e4.<br>\uadf8\ub7f0\ub370 \uae30\ubcf8 \uc124\uc815\uc744 \ud558\uace0 \ub2e4\uc74c \ub0a0 \uc11c\ubc84\uc5d0 \uc811\uc18d\ud588\ub294\ub370 history\uac00 \ud558\ub098\ub3c4 \ub0a8\uc544\uc788\uc9c0 \uc54a\uc544 \ud655\uc778\ud574\ubcf4\ub2c8 HISTFILESIZE\uac00 0\uc73c\ub85c \ub418\uc5b4\uc788\uc5b4 \uc774\ub97c \ubcc0\uacbd\ud574\uc8fc\uae30\ub85c \ud558\uc600\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uac12\uc744 5000\uc73c\ub85c \ubcc0\uacbd\ud574\uc8fc\uace0 HISTTIMEFORMAT\uc744 \uc8fc\uc5b4 history\uc5d0 \uc2dc\uac04\ub300\ub3c4 \ud655\uc778\ud560 \uc218 \uc788\ub3c4\ub85d \uc124\uc815\ud574\ub450\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>Nginx\uc640 MariaDB \uc124\uc815\uc740 \ub2e4\uc74c #3\ud3b8\uc5d0\uc11c  \uc2a4\ud1a0\ub9ac\uc9c0 \ucd94\uac00 \ubc0f NAS \uc5f0\uacb0\uacfc \ud568\uaed8 \uc124\uc815\uc744 \uc9c4\ud589\ud560 \uac83\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h3 class=\"has-white-color has-cyan-bluish-gray-background-color has-text-color has-background wp-block-heading\"> Personal Comments<\/h3>\n\n\n\n<p>#3\ud3b8\uc5d0\uc11c\ub294 &#8220;ManVSCloud \uc2e0\uaddc Architecture&#8221; \uacf5\uac1c\uc640 \ud568\uaed8 \uc2a4\ud1a0\ub9ac\uc9c0 \ucd94\uac00 \ubc0f NAS \uc5f0\uacb0\uc5d0 \ub300\ud55c \ud3ec\uc2a4\ud305\uc744 \uc9c4\ud589\ud560 \uac83\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc81c\uac00 \uc774\ubc88\uc5d0 \uc9c4\ud589\ud558\ub294 AWS to NCloud \uc774\uc804 \uc791\uc5c5\uc5d0\uc11c \uc124\uc815\ub418\ub294 \ubd80\ubd84\uc774\ub098 \uc774\ub807\uac8c \uc774\uc804\uc774 \ub420 \uc218\ub3c4 \uc788\uad6c\ub098\ud558\ub294 \uac78 \uc7ac\ubc0c\uac8c \ubd10\uc8fc\uc168\uc73c\uba74 \ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uae34 \uae00 \uc77d\uc5b4\uc8fc\uc154\uc11c \uac10\uc0ac\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"137\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/25143135\/ncloud-master-1.png\" alt=\"\" class=\"wp-image-1265\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/25143135\/ncloud-master-1.png 800w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/25143135\/ncloud-master-1-300x51.png 300w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/25143135\/ncloud-master-1-768x132.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\uc548\ub155\ud558\uc138\uc694. ManVSCloud \uae40\uc218\ud604\uc785\ub2c8\ub2e4. \uc624\ub298 &#8220;AWS TO NCLOUD SERVER MIGRATION \u2013 #2\ud3b8&#8221;\uc5d0\uc11c\ub294 \uac04\ub2e8\ud55c Install\uacfc \uc81c\uac00 \uae30\ubcf8\uc801\uc73c\ub85c \uc124\uc815\ud558\ub294 \uc124\uc815\uac12\ub4e4\uc744 \ubcf4\uc5ec\ub4dc\ub9ac\uba70 \uc815\ubcf4\ub97c \uacf5\uc720\ud558\uace0\uc790 \ud569\ub2c8\ub2e4. Base Install &#8220;[NCP] AWS TO NCLOUD SERVER MIGRATION \u2013 #1\ud3b8&#8221;\uc5d0\uc11c \uc0dd\uc131\ud55c \uc11c\ubc84\uc5d0 \uae30\ubcf8 \uc124\uce58\uc640 \uc124\uc815 \uc791\uc5c5\uc744 \uc9c4\ud589\ud558\uae30\ub85c \ud588\uc2b5\ub2c8\ub2e4. ? Nginx \uc124\uce58 CentOS 7\uc5d0\uc11c\ub294 \uc704\uc640 \uac19\uc774 repo\ub97c \ucd94\uac00 \ud6c4 \uc124\uce58\ub97c \uc9c4\ud589\ud558\uba74 \uc124\uce58\uac04\uc5d0 \ud070 \uc5b4\ub824\uc6c0\uc740 \uc5c6\uc744 \uac83\uc785\ub2c8\ub2e4. \uc774\ud6c4 LB\ub97c \ubd99\uc774\uba74 Nginx Access Log\uc5d0\uc11c LB\uc758 \ub85c\uadf8\ub85c \ub098\uc624\uae30\ub54c\ubb38\uc5d0 Client IP\ub97c \ubcf4\uae30 \uc704\ud574\uc11c\ub294 nginx -V 2&gt;&amp;1 | grep &#8216;http_realip_module&#8217; \ub85c \ud655\uc778\ud558\uc5ec http_realip_module\uc774 \uc788\ub294\uc9c0 \ud655\uc778\uc774 \ub418\uc5b4\uc57c\ud569\ub2c8\ub2e4. RPM \uc124\uce58 \uc2dc \uc774 \ubaa8\ub4c8\uc774 \ub4e4\uc5b4\uac00\uc788\ub294\ub370 \ucef4\ud30c\uc77c\ub85c \uc124\uce58\ub97c \uc9c4\ud589\ud560 \uacbd\uc6b0 \uc774 \ubd80\ubd84\uc744 \uc798 \uccb4\ud06c\ud574\uc8fc\uc154\uc57c\ud569\ub2c8\ub2e4. ? PHP \uc124\uce58 PHP\ub294 remi\ub97c \uc774\uc6a9\ud558\uc5ec \uc124\uce58\ub97c \uc9c4\ud589\ud588\uc2b5\ub2c8\ub2e4.Migration\ud560 \ub54c \uc8fc\uc758\ud560 \uc810 \uc911 \ud558\ub098\ub294 PHP\uc758 \ubaa8\ub4c8\uc744 \ub9de\ucdb0\uc8fc\ub294 \uac83\uc785\ub2c8\ub2e4.\uae30\uc874 \uc11c\ubc84\uc640 \uc774\uc804\ud558\ub294 \uc11c\ubc84\uc5d0\uc11c php -m \ub85c \ud655\uc778\ud574\uc90d\uc2dc\ub2e4. ? MariaDB \uc124\uce58 MariaDB\ub3c4 repo\ub9cc \ucd94\uac00\ud574\uc8fc\uba74 \uc27d\uac8c \uc124\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.MariaDB\uc758 \ubc84\uc804\uc740 baseurl \ubd80\ubd84\uc5d0\uc11c 10.5 \ubd80\ubd84\uc744 \uc6d0\ud558\uc2dc\ub294 \ubc84\uc804\uc73c\ub85c \ubcc0\uacbd\ud558\uba74 \uc6d0\ud558\uc2dc\ub294 \ubc84\uc804\uc73c\ub85c \uc124\uce58\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4. ? Memcached Memcached\uc758 \uacbd\uc6b0 \uac1c\uc778 \uc0ac\uc774\ud2b8 \uc6b4\uc601\uc5d0 \ud070 \ud6a8\uacfc\ub97c \uac00\uc838\ub2e4\uc8fc\uc9c0 \ubabb\ud55c\ub2e4\ub294 \ud3c9\uc774 \uc788\uc5c8\uc73c\ub098 \uac1c\uc778 \ube14\ub85c\uadf8 \uc6a9\ub3c4\ubfd0\ub9cc \uc544\ub2c8\ub77c \ub2e4\uc591\ud55c \ud14c\uc2a4\ud2b8\ub97c \ud574\ubcfc \uc608\uc815\uc774\uae30\uc5d0 memcached\ub97c \ub3c4\uc785\ud558\uae30\ub85c \ud588\uc2b5\ub2c8\ub2e4. \/etc\/sysconfig\/memcached \uac12\uc744 \uc544\ub798\uc640 \uac19\uc774 \ubcc0\uacbd\ud574\uc8fc\uc5c8\uc2b5\ub2c8\ub2e4. php-memcached\ub3c4 \uc124\uce58\ud574\uc90d\uc2dc\ub2e4! php.ini\ub97c \ubcf4\uba74 session.save_handler\uac00 files\ub85c \ub418\uc5b4\uc788\uc2b5\ub2c8\ub2e4. \uc774\ub97c memcached\ub85c \ubcc0\uacbd\ud574\uc904 \uac83\uc785\ub2c8\ub2e4. \uc544\ub798\ucc98\ub7fc \uc791\uc5c5\uc744 \uc9c4\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uadf8\ub0e5 \ube14\ub85c\uadf8\ub9cc \uc6b4\uc601\ud558\ub358 \uc11c\ubc84\ub2e4\ubcf4\ub2c8 \ud06c\uac8c \uc124\uce58\ud560 \uac83\ub4e4\uc774 \ubcc4\ub85c \uc5c6\uc2b5\ub2c8\ub2e4.\uc774\uc81c \uae30\ubcf8 \uc138\ud305\ub9cc \uc9c4\ud589\ud574\ubcf4\ub3c4\ub85d \ud569\uc2dc\ub2e4. Default [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"[NCP] AWS TO NCLOUD SERVER MIGRATION \u2013 #2\ud3b8","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[6,154,448,453,449,32,155,454,413,446,445,87,91,17,90,191,447,408,450,451,203,452,418,89,202,398,412,152],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts\/1290"}],"collection":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1290"}],"version-history":[{"count":5,"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts\/1290\/revisions"}],"predecessor-version":[{"id":1930,"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts\/1290\/revisions\/1930"}],"wp:attachment":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}