ãããã®VPSã¯ãã客æ§ãä»®æ³ãµã¼ãã®ãroot権éã(管çè 権é)ããæã£ã¦ããµã¼ãããå©ç¨ããã ããµã¼ãã¹ã§ãã æ¬ãã¼ã¸ã§ã¯ããå©ç¨éå§æã®ãµã¼ãã®åæè¨å®å 容ããç´¹ä»ãã¾ãã ãµã¼ãã®åæè¨å®ãè¡ããªãå ´åãã客æ§ã®VPSã第ä¸è ã«æä½ãããå¯è½æ§ãé«ã¾ãã¾ãã å®å ¨ã«ãå©ç¨ããã ãããã«ããã®ãã¼ã¸ãåèã«è¨å®ãè¡ãã¾ãããã â»æ¬ããã¥ã¢ã«ã¯ãããããã®VPS for Windows Serverãã¯å¯¾è±¡å¤ã§ãã â»ãµã¼ãèµ·åå¾ã¯ãããã«ãSTEP2 ã»ãã¥ãªãã£ã®è¨å®ãè¡ãã¾ããããã¸é²ãã§ãã ããã 以ä¸ã§ãã»ãã¥ãªãã£ã®è¨å®ã¯å®äºã§ãã â»ããã§ã¯æä½éå¿ è¦ãªã»ãã¥ãªãã£ã®è¨å®ããç´¹ä»ãã¦ãã¾ããã客æ§ãèªèº«ã§ãã»ãã¥ãªãã£ãå¼·åããè¨å®ãå®æ½ãã¦ãã ããã ã»ãã¥ãªãã£ã®è¨å®å¾ã¯ãã客æ§ã®ç®çã«å¿ãã¦è¨å®å 容ãç°ãªãã¾ãã ãå¸æã®ãµã¼ãè¨å®ãã確èªã®ãããå種åèæ¸ç±
2016/07/20 ä¿®æ£ï¼nginx.confãç´æ¥æ¸ãæãã¦ããã¨ããããconf.d/blog.confãä½æãã¦è¨å®ããããã«ãã¾ããã ãConoHa - GMOã®é«æ§è½ãªã¼ã«SSDã¯ã©ã¦ããã®ConoHaã®VPSã§ãCentOS 7 + nginx + WordPress ç°å¢ãæ§ç¯ãã¾ããæ £ããã¨30åã®ä½æ¥ã§ãã åæ ConoHaæ¨æºã®Cent OS 7ã¯ãæåããSELinuxãåããã¦ãããã¾ãEPELã使ããã¨ãã£ãç¹å¾´ãããã®ã§ãä»ã®VPSã§ã¯åæè¨å®ã®é¨åã§å¿ è¦ãªã¨ãããããã¨æãã¾ãã ã¾ãããµã¼ãã¼ã®æ§ç¯ãèµ·åã«ã¤ãã¦ã¯çãã¾ããã¾ããsshã§rootã§ãã°ã¤ã³ã§ããç¶æ ããå§ãããã®ã¨ãã¾ããã¾ãã使ç¨ãããã¡ã¤ã³åãexample.comã¨ãã¾ãã sshã¦ã¼ã¶ã¼ã®ä½æ rootãã°ã¤ã³ã¯å«ãªã®ã§ãsshã§ãã°ã¤ã³ããã¦ã¼ã¶ã¼ãä½æãã¾ããããã§ã¯ãä»®ã«
çéã§ã»ããã¢ãããå®äºããããã極åã³ããã§è¨å®ã§ããããã«ãã¦ã¿ããï¼ã»âã»ï¼ åä½æ¤è¨¼ã¯ããããã®VPSã§æ¨æºOSãã¤ã³ã¹ãã¼ã«ãã¦è¡ã£ããè¨äºå·çæç¹ã§ã¯CentOS6.6ãã¤ã³ã¹ãã¼ã«ããããã # cat /etc/issue CentOS release 6.6 (Final) # uname -rs Linux 2.6.32-504.3.3.el6.x86_64 ãç¥ãã æ¬è¨äºã®å 容ãFabricåããã¹ã¯ãªãããå ¬éï¼ãã²è©¦ãã¦ã¿ã¦ãã â è¶ éã§CentOS6.6ï¼ãããã®VPSï¼ãã»ããã¢ãããã俺å²ä¸æå¼·ã®Fabricã¹ã¯ãªãããããã rootã®ãã¹ã¯ã¼ãå¤æ´ã¨ä½æ¥ç¨ã¦ã¼ã¶ã®ä½æ ã¾ãã¯ãã³ã³ã½ã¼ã«ããSSHã§æ¥ç¶ãããã [localhost ~]$ ssh [email protected] ãªãããµã¼ããèµ·åãã¦ãªãå ´åã¯ãäºåã«ç®¡çç»é¢ãããµã¼ããèµ·åãã
10. ã»ãã¥ãªãã£å¯¾çã®éè¦æ§ ã·ã¹ãã ã®ãã°ã¤ã³èªè¨¼ãã° /var/log/secure 15:12:12 sshd[27259]: Failed password for bin from 69.94.125.45 port 35312 ssh2 15:12:12 sshd[27259]: Received disconnect from 69.94.125.45: 11: Bye Bye [preauth] 15:12:13 sshd[27266]: reverse mapping checking getaddrinfo for nyfishpix.nyfishpix.com [69.94.125.45] failed - POSSIBLE BREAK-IN ATTEMPT! 15:12:13 sshd[27266]: pam_unix(sshd:auth): authentic
ãããã®VPSãããServersMan@VPS ããã®åºç¾ã§ããããã¨æ·å± ã®ããã£ãæã®ãã VPS ã ããè¨ããã®ãµã¼ãããçµVPSã§éç¨ããã¦ãããã§ãããVPSãæ¢åã®ã¬ã³ãµãæè¦ã§ä½¿ã£ã¦ã人ã«ããã¦ãããããã®ã»ãã¥ãªãã£è¨å®ã¯ãã£ã¦ãããã»ããè¯ããã£ã¦ããã話ã§ãã ä»åã対象ã«ãã OS 㯠CentOS ã§ãã ãããVPS åã㦠Ubuntu ã¨ããå¥ã® OS ã§éç¨ãããããªä¸ä¸ç´è ã¯èªåã§ã§ããããã ãªã¢ã¼ãããã® root ãã°ã¤ã³ãç¡å¹ã«ãã ssh çµç±ã§ root ã§ãã°ã¤ã³ãã¦ä½æ¥ããããã¦ã¾ãããï¼ ãã root ãã¹ã¯ã¼ããç ´ããããããµã¼ããä¹ã£åããã¡ããã®ã§ã大å¤ã«å±éºã§ãã root ãã°ã¤ã³ãç¡å¹ã«ãã¦ã権éã®ããã¦ã¼ã¶ã§ãã°ã¤ã³ãã¦ãã sudo or su ãã¦ä½æ¥ããããã«ãã¾ãããã root ãã°ã¤ã³ãç¡å¹ã«ããæ¹æ³ã¯ããã
ããã°éè¨æã«æ¸ããã¨æã£ã¦ããå 容ãªã®ã ãå®å ¨ã«å¿ãã¦ãã. ConoHaã§ãµããã¡ã¤ã³ã使ã£ã¦ blog.owl8.net ã¨ã files.owl8.net ã¿ãããªãã¨ãããããã¦è²ã èºããã®ã§ã¡ã¢. ã¾ã,"ConoHa ãµããã¡ã¤ã³"ã§ã°ã°ã£ãæãã ã¨ãã¾ãã¡ããæãã®è§£èª¬ããããããªãã®ã§"VPS ãµããã¡ã¤ã³"ã§ã°ã°ã£ãã¨ãã, ãããVPSã®ãµããã¡ã¤ã³è¨å®æ¹æ³ - ã¡ã³ãã° ãããããã. ãããçä¼¼ããã°ãããã¨ConoHaã®ã³ã³ã½ã¼ã«ã®DNSãããããªæãã§ãã£ã¦ã¿ããã¨ãã㨠å¤ã®ã¨ããã@ã ã¨OKãã¦ãããªã. 解決æ¹æ³ãè¦ã¤ãããªãã¦ãã°ããæ©ãã ã,ããã¯èªåã®ãã¡ã¤ã³,ãã®å ´åã ã¨owl8.net,ãå ¥åããã°è¯ã. ãã¨ã¯ä¸è¨ã®ãµã¤ãã®éã, /etc/httpd/conf/httpd.conf ã«VirtualHostã®å 容ãæ¸ãå ãã¦Apacheã®å
ãµããã¡ã¤ã³ã®å©ç¨ã¯ãç¬èªãã¡ã¤ã³ãåå¾ãã¦ãµã¤ãéå¶ãè¡ãªã£ã¦ããæ¹ã«ã¨ã£ã¦åãã¡ãªãããããã¨æãã®ã§ã¾ã¨ãã¦ã¿ã¾ããã ãµããã¡ã¤ã³ã¨ã¯ï¼ ç¬èªãã¡ã¤ã³ã®é ã«è±æ°åã足ããæ¬ä¼¼çã«å¥ã®ãã¡ã¤ã³ã®ããã«è¦ãããã¡ã¤ã³ã®ãã¨ã§ãã yahooãä¾ã«ãã㨠ç¬èªãã¡ã¤ã³ï¼yahoo.co.jp ãµããã¡ã¤ã³ ã¤ããªã¯ï¼auctions.yahoo.co.jp ã¤ãã¼ã¡ã¼ã«ï¼mail.yahoo.co.jp ãã®ãmailãããauctionsãã®ããã«èªç±ã«æåã足ãã¦ãç¬èªãã¡ã¤ã³ã£ã½ãè¦ãããã¨ãåºæ¥ã¾ãã ãµããã¡ã¤ã³ãå©ç¨ããã¡ãªãã yahoo.co.jp/auctions/ãã¨ãã£ãé層ã§æ±ããããã¹ãããªãã¦è¦ãã æ°è¦ã«ãã¡ã¤ã³ãåå¾ããªãã¦ããããã£ã½ãã®ãæ±ãã ãµã¼ãã¹ã®æã¤ãã©ã³ãã¤ã¡ã¼ã¸ããµã¼ãã¹éã§å ±æã§ãã ããã ãã®ã¡ãªãããæããªããããã¡ãªããã¯ç¹ã«ç¡ã
ååConoHaã«CentOS7ãã¤ã³ã¹ãã¼ã«ããç¿æ¥ï¼ã¨ãããå½æ¥ï¼ã«ConoHaãCentOS7ãæ¨æºã§ãµãã¼ããå§ãã¦ä¸ã®ä¸ã®ä¸æ¡çããã¿ããã¦ãã¾ãã ä»æ¥ã¯ãåå.comã§åå¾ãããã¡ã¤ã³ãå©ç¨ãã¦ConoHaã§WEBãµã¼ãã¼ãå ¬éããã¾ã§ããã£ã¦ã¿ããã¨æãã¾ãã æ¡ã®å®åããã«ããã£ãã 1-ã¾ãåæã¨ãã¦ConoHaã§WEBãµã¼ãã¼ç«ã¦ã¦ãIPããæã£ã¦ããªã ConoHaããã¨ãããVPSãµã¼ãã¹ã¯åºæ¬çã«ã¯IPã®å²ãå½ã¦ã®ã¿ããè¡ããªãããWEBãµã¼ãã¼ãèµ·åãã¦ã http://127.0.0.1/ ã¿ãããªæãã§ã¢ã¯ã»ã¹ããã http://vsp.127.0.0.1.hogehoge_company/ã¿ãããªãã£ãããããã¹ãåã«ãªã£ã¦ãã¾ãã¾ãã ãã®ã¤ã±ã¦ãªããç´ãããã«ã¯ãã¡ã¤ã³ãåå¾ããå¿ è¦ãããã¾ãã 2-ãåå.comã§ãã¡ã¤ã³ãåå¾ãã ãã¡ã¤ã³ãå
ãã¡ã¤ã³ã®ã¬ã¸ã¹ãã©ã¯ä½ã§ããããã©VALUE-DOMAINã§åå¾ã ãã¼ã ãµã¼ãã¯ConoHaVPSã«ããã®ã§åå¾ãããã¡ã¤ã³ã®ãã¼ã ãµã¼ãã«ConoHaVPSã®ãæå®ãã¦ããã°OKã VALUE-DOMAINã§åå¾ãããã¡ã¤ã³ã®ãã¼ã ãµã¼ãã®è¨å®ãå¤æ´ãã ãã¼ã ãµã¼ã 1 : ns-a1.conoha.ioãã¼ã ãµã¼ã 2 : ns-a2.conoha.ioãã¼ã ãµã¼ã 3 : ns-a3.conoha.ioããã¼ã ãµã¼ãã«è¨å®ãããVALUE-DOMEIN以å¤ã®ã¬ã¸ã¹ãã©ã§ããããã¨ã¯ä¸ç·ã ConoHaã®ã³ã³ããã¼ã«ããã«ãããã¡ã¤ã³ã追å [DNS] -> [+ãã¡ã¤ã³] ãé¸æ ããã¡ã¤ã³åããå ¥åãã¦ãä¿åããããGeoDNSã¯ã¨ããããæ°ã«ããªãã ãã¡ã¤ã³åã¯åå¾ãããã¡ã¤ã³ãã®ãã®ã§ãµããã¡ã¤ã³ãªã©ã¯å ¥åããªãã ãä¿åãããã¨ä¸ã®ç»åã®ããã«è¨å®ãå¢ãããã¿ã¤ãNS
æ¦è¦éå¶ããããµã¤ãããã¡ã¤ã³ã®æ°ã ããµã¼ãã¼ãå¥ç´ãããããã°ã©ã ãã¤ã³ã¹ãã¼ã«ããã®ã¯å¤§å¤ã§ãããWordPressã«ã¯ããã«ããµã¤ããã¨ããæ©è½ãæ¨æºã§ç¨æããã¦ãã¾ãã ããã«ããµã¤ããã¯1ã¤ã®ãµã¼ãã¼ã1ã¤ã®ããã°ã©ã ã§è¤æ°ã®ãµã¤ããéå¶ã§ãã便å©ãªæ©è½ã§ãã ããã«ããµã¤ããã§è¤æ°ã®ãµã¤ããéç¨ããå ´åã以ä¸ã®3ã¤ã®æ¹æ³ãããé¸ã³ããã ãã¾ãã ãµããã£ã¬ã¯ããªåãµããã¡ã¤ã³åè¤æ°ãã¡ã¤ã³åâ»Â æåã«ãé¸ã³ããã ããæ¹æ³ãããéä¸ã§å¥ã®æ¹æ³ã«ã¯å¤æ´ã§ãã¾ããã ä»åã¯ããµããã¡ã¤ã³åãã«ã¤ãã¦ã説æãã¾ãã ãµããã¡ã¤ã³å ãã«ããµã¤ãã¨ã¯ï¼ãexample.comãã§å ¬éãã¦ãããµã¤ãã«ãsub1.example.comããsub2.example.comããªã©ããµããã¡ã¤ã³ã§è¤æ°ã®ãµã¤ããå ¬éãã¾ãã ãã¡ã¤ã³ã®æºååºæ¬ã¨ãªããµã¤ããå ¬éããä¸ä½ãã¡ã¤ã³ãexample.c
ãã£ããã¨ã¾ã¨ãã VPSã追å ãã¼ã«ã«ã¦ã¼ã¶ã¼ã®ä½æ FTPã¦ã¼ã¶ã¼ã®ä½æ vsftpdã®å°å ¥ WordPressåæè¨å® WordPressã®ãã©ã°ã¤ã³è¿½å ä»å¾ããããã㨠ãããæ¹æ³ãé©åãªã®ãã¯ãããããªãã ã°ã°ã£ãæ å ±ãåãé ¼ãã«ãã¦ãã®ã§ãã»ãã¥ãªãã£çãªåé¡ã¨ãæããããããªãã ããå¤ãªã¨ãããããã°ãææãã¦ããã ããã°å©ããã¾ãã VPSã追å ããã¾ãã«ãç°¡åã§ãç¹ã«èª¬æã¨ããããªãã®ã§çç¥ã å ¬å¼ã®èãæ¬(?)ãããã¾ãã ConoHaã®èãæ¬é»åçVol.1ãWordPressããå ¬éãã¾ããï¼ - ConoHa ãã¼ã«ã«ã¦ã¼ã¶ã¼ã®ä½æ adduser tatsuya passwd tatsuya (ãã¹ã¯ã¼ãè¨å®ç¥) FTPã¦ã¼ã¶ã¼ã®ä½æ adduser www passwd www (ãã¹ã¯ã¼ãè¨å®ç¥) usermod -d /var/www -g ng
ConoHaã®VPSãåãã¦éãã§ã¾ãï½ ããã©ã«ãã ã¨ã ãã³ãã¬ã¼ãã¤ã¡ã¼ã¸ãCentOS6.5 ãå ¥ãã¾ãã åã¤ã³ã¹ãã¼ã«ãã¦ã5åãããããªãã®ã§ã ã¬ã·ã¬ã·å£ãã¦ããã¾ãããï¼ï¼ ã¾ããããã¨ã¯ãSSHãµã¼ãã§ããããã ConoHaã®ã³ã³ããã¼ã«ããã«ã«ãKey Pairãã¨ããã®ãããã¾ãã ããã¯ããrootãã使ãæå·éµã«ãªãã¾ãã ã§ããæçµçã«ã¯rootãã°ã¤ã³ã¯æå¦ããã®ã§ã ä»åã¯ä½¿ããã¨ã¯ãªãããï½ ä½ã¯ã¨ããããç¹ãã¦ã¿ã¾ãããã åã¯Windows端æ«ã§Puttyã使ãSSHã§æ¥ç¶ãã¦ã¿ã¾ãã ãã®æç¹ã§ã¯ç¹ã«ä½ããããã¨ã¯ãªãããã®ã¾ã¾ConoHaã®VPSã¸SSHæ¥ç¶ãã¾ãã ã¦ã¼ã¶ã¯rootã§å ¥ããããã«ãªã£ã¦ããã ConoHaã®ã³ã³ããã¼ã«ããã«ããOSãå ¥ããã¨ãã«å ¥ããrootãã¹ã¯ã¼ãã使ãã¾ãã login as: root [root@v
SSHãµã¼ãã¼ã®åæè¨å®ã¯ã22çªãã¼ããå©ç¨ãã¾ãããã®ãã¼ãçªå·ã¯ä¸è¬çã§åºãç¥ããã¦ãããããä¸æ£ä¾µå ¥ã®ãªã¹ã¯ãé«ã¾ãã¾ããããã§ãä»åã¯SSHã®ãã¼ãçªå·ã22çªããå¤æ´ããæ¹æ³ã解説ãã¾ãã SSHã®ãã¼ãçªå·ãå¤æ´ SSHã®ãã¼ãçªå·ãå¤æ´ããããã«ãSSHã®è¨å®ãã¡ã¤ã«ï¼/etc/ssh/sshd_configï¼ãç·¨éãã¾ããSSHãµã¼ãã¼ã«ãã°ã¤ã³ããrootã«ãªãã¾ãã SSHã®è¨å®ãã¡ã¤ã«ï¼/etc/ssh/sshd_configï¼ãããã¯ã¢ãããã¾ãã # cp /ssh/sshd_config /ssh/sshd_config.old ãã¼ãçªå·ã®å¤æ´ ãã¼ãçªå·ãå¤æ´ããããã«ãSSHè¨å®ãã¡ã¤ã«ï¼/etc/ssh/sshd_configï¼ã®Porté ç®ãç·¨éãã¾ãã # What ports, IPs and protocols we listen for Po
ConoHaã§Railsãã³ãã¬ã¼ãã使ã£ã¦Railsã¢ããªã±ã¼ã·ã§ã³ã®ãã¹ãããã¦ãã¾ãããã¢ããªã±ã¼ã·ã§ã³èªä½ã¯ããæãã«ãªã£ã¦ããã®ã§ãå¾åãã«ãã¦ããã»ãã¥ãªãã£ãã¡ãã£ã¨è¦ç´ããã¨ã«ãã¾ãããSSHã®ãã¼ããããã¯å¤ãããããªã...ã¨ã Conohaã«VPSãè¨ç½®ãã¦ãSSHãã°ã¤ã³ããã¼ãçªå·å¤æ´ãrootãã°ã¤ã³ç¦æ¢ã¾ã§ã30åã§ï¼ http://qiita.com/ongaeshi/items/bb17ebfbd4d22057c8fd ããããè¨äºãåèã«ãã¼ãã®è¨å®ããããã¨æã£ãã®ã§ããããããã /etc/sysconfig/iptablesãè¦å½ãããããã¼ãã®éæ¾è¨å®ãã§ãã¾ããã§ãããã²ãã£ã¨ãã¦ãã¡ã¤ã¢ã¦ã©ã¼ã«ãè¨ç½®ããã¦ããããå ¨ã¦ã®ãã¼ãã«ã¢ã¯ã»ã¹ã§ããã®ã§ã¯ï¼ã¨èãã¾ããããå¤é¨ãã¼ã«ã使ã£ã¦æ¥ç¶å¯è½ãªãã¼ãã調ã¹ãã¨ããã80çªãã¼ãã22çªãã¼ãã¯
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}