2012-01-01ãã1å¹´éã®è¨äºä¸è¦§
éæå¤æ´ãã¾ãã [2014/04/30追è¨] yumããã±ã¼ã¸ãªã¹ããconfigureãªãã·ã§ã³ãGithubã®Gistã§ç®¡çãã¦ã¿ã¾ããã ç®æ¬¡ yumããã±ã¼ã¸ãªã¹ã phpã®configureãªãã·ã§ã³ yumããã±ã¼ã¸ãªã¹ã phpã®configureãªãã·ã§ã³ php-ã¯ã¤ã³ã¹ãã¼ã«ããPHPã®ãã¼ã¸ã§â¦
Apache, MySQLãã¤ã³ã¹ãã¼ã«ããã®ã§ä»åã¯PHPãyumããã¤ã³ã¹ãã¼ã«ãã¦ã¿ãã ãã¼ã¸ã§ã³ã¯PHP5.4.0 ã ããyumã®ãªãã¸ããªã«å ¥ã£ã¦ãããã®ã«ãã£ã¦ãã¼ã¸ã§ã³ãç°ãªãã ã¤ã³ã¹ãã¼ã«æ¹æ³ã¯ãApache, MySQLãã¤ã³ã¹ãã¼ã«ããæã¨ã»ã¼åãã ã¤ã³ã¹ãã¼â¦
ååã¯MySQLãyumã§ã¤ã³ã¹ãã¼ã«ãããä»åã¯ã½ã¼ã¹ããã¤ã³ã¹ãã¼ã«ãã¦ã¿ãã ã¤ã³ã¹ãã¼ã«ãããã¼ã¸ã§ã³ã¯ãMySQL5.5.28ã å¿ è¦ãªããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã« $ sudo yum install gcc gcc-c++ ncurses-devel cmake bison MySQL 5.5ã§ã¯cmakeã使ãã¿ãããªâ¦
MySQLãyumã§ã¤ã³ã¹ãã¼ã«ãã¦ã¿ãã åºæ¬çã«Apacheãyumã§ã¤ã³ã¹ãã¼ã«ããæã¨åãããã«ã§ããã MySQLã®ãã¼ã¸ã§ã³ã確èªãã $ sudo yum --enablerepo=epel info mysql.x86_64 $ sudo yum --enablerepo=remi info mysql.x86_64 $ sudo yum --enablerepâ¦
ååã¯Apacheãyumã§ã¤ã³ã¹ãã¼ã«ããã yumã§ã¤ã³ã¹ãã¼ã«ããã¨ç°¡åã ããèµ·åããã®ã«æéãããããªãã®ã ãã© åå¥ã«ã¢ã¸ã¥ã¼ã«ãå ¥ããããã¤ã³ã¹ãã¼ã«ããããã¼ã¸ã§ã³ããªãã£ããããã®ã§ä¸ä¾¿ãªå ´åãããã ããããæã¯ã½ã¼ã¹ããã¤ã³ã¹ãã¼ã«ãâ¦
Webãµã¼ãã¼ã®Apacheãã¤ã³ã¹ãã¼ã«ããã ä»åã¯ãyumã§ã¤ã³ã¹ãã¼ã«ãã¦ã¿ãã ã½ã¼ã¹ã§ã®ã¤ã³ã¹ãã¼ã«ã¯æ¬¡åã ãªãã¸ããªã®Apacheã®ãã¼ã¸ã§ã³ã確èªãã $ sudo yum --enablerepo=epel info httpd $ sudo yum --enablerepo=remi info httpd $ sudo yum â¦
ãããVPSã§ã¯ã¨ãã£ã¿ã¼ãvi(vim)ãããã©ã«ãã§å ¥ã£ã¦ããã vimã§ãè¯ãã人ã«ãã£ã¦ã¯emacs ãè¯ãã¨ãã人ãããã ããã§emacs ãã¤ã³ã¹ãã¼ã«ãã¦ã¿ãã â»ã¡ãªã¿ã«èªåã¯emacs ãããã¦vim ã使ã£ã¦ãã¾ãããã yumã§ã¤ã³ã¹ãã¼ã« 以ä¸ã®ã³ãã³ãã§â¦
ããã©ã«ãã®yumã«å ¥ã£ã¦ãããªãã¸ããªã ã¨å ¥ã£ã¦ããªãããã°ã©ã ããã¼ã¸ã§ã³ãå¤ãã£ããããã®ã§ãªãã¸ããªã追å ããã ä»åã3ã¤ã®ãªãã¸ããªã追å ããããã©ãã追å ãããã¯ã好ã¿ã§ã ãã¦ã³ãã¼ã Fedora EPEL $ wget http://dl.fedoraproject.oâ¦
vimãemacsãªã©ãæ¥æ¬èªå ¥åããéã«å¿ è¦ rootã¦ã¼ã¶ã§å®è¡ããå¿ è¦ããã rootã¦ã¼ã¶ã«ãªã $ su - ãã¹ã¯ã¼ã: è¨èªã®å¤æ´ # cd /etc/sysconfig/ # vim i18n 以ä¸ã®ããã«å¤æ´ãã¦ä¿åããã LANG="C" â LANG="ja_JP.UTF-8" è¨å®ã®åæ # source i18n 確èªâ¦
iptablesã§ãã¡ã¤ã¢ã¼ã¦ã©ã¼ã«ãè¨å®ããã å ·ä½çã«ã¯ãµã¼ãã¼ã®ãã¼ãçªå·ãéå®ããã iptablesãã¤ã³ã¹ãã¼ã«ããã¦ããã確èªããã $ yum list installed | grep iptables iptables.x86_64 1.4.7-5.1.el6_2 @updates/6.2 iptables-ipv6.x86_64 1.4.7-5â¦
ã³ãã³ããå®è¡ããããã®ãã¹ãå¤æ´ããã 大æµã®ã³ãã³ãã¯ã/usr/binã/binã«ãããã使ãããã³ãã³ãã«ãã£ã¦ã¯ã/usr/sbinãªã©ã«ç½®ããã¦ããããããã®ã¾ã¾ã§ã¯ã³ãã³ããå®è¡ã§ããªãã ãã«ãã¹ã§å ¥åããã°ã³ãã³ããå®è¡ã§ããããæ¯åå ¥åããã®â¦
ãããã®VPSã ã¨SSHæ¥ç¶ã®ãã¼ãçªå·ã¯22ã§åæè¨å®ããã¦ããã ï¼Serversman@VPSã ã¨3843ãããã©ã«ãè¨å®ã«ãªã£ã¦ããï¼ åæè¨å®ã®ã¾ã¾ã ã¨ãæ¥ç¶ã¢ã¿ãã¯ãåãããããæããããã®ã§ åããã«ããããããã«ãã¼ãçªå·ãå¤æ´ããã ååã¨åæ§ã«sshd_â¦
rootï¼ã¹ã¼ãã¼ã¦ã¼ã¶ï¼ã§ã®ãã°ã¤ã³ã許å¯ãã¦ããã¨ããã¹ã¯ã¼ããæ¼ããã¨ãã«å¤§å¤å±éºã rootã§ãã°ã¤ã³ã§ããªãããã«ãã¦ãæ®æ®µã®ä½æ¥ã¯sudo権éãæãããé常ã¦ã¼ã¶ãã suã³ãã³ãã§rootã«ãã¦ä½æ¥ãè¡ãããã«ããã 以ä¸ãé常ã¦ã¼ã¶ï¼ãã®ããã°â¦
ååï¼ã¦ã¼ã¶ã®è¿½å ï¼ã®ç¶ãã 追å ããã¦ã¼ã¶ã§sudo権éãä»ä¸ãããã å ·ä½çã«ã¯ãã¦ã¼ã¶ãwheelã°ã«ã¼ãã«è¿½å ããwheelã°ã«ã¼ãã«å±ããã¦ã¼ã¶ã« sudoã許å¯ãããããã«ããã ã¦ã¼ã¶ãwheelã°ã«ã¼ãã«è¿½å ãã [~]$ su - ãã¹ã¯ã¼ã:ãrootã®ãã¹ã¯ã¼â¦
rootã®ãã¹ã¯ã¼ããè¨å®ããããã¡ã¤ã³ã§ä½¿ç¨ããé常ã¦ã¼ã¶ãä½æããã ãã£ã¨rootã§æä½ããã®ã¯æãã®ã§ãé常ã¦ã¼ã¶ãä½æãã¦ãsudo権éãä»ä¸ãããï¼sudoä»ä¸ã¯æ¬¡åï¼ã ã¦ã¼ã¶ã®è¿½å [~]# useradd hoge hogeã¯ä»»æã®ã¦ã¼ã¶å ãã¹ã¯ã¼ãã®è¨å® [~]#â¦
ãããVPSãªã©ãµã¼ãã¼ãå¥ç´ããããçã£å ã«rootã®ãã¹ã¯ã¼ãã¯å¤ãã¦ããã ããã©ã«ãã®ãã¹ã¯ã¼ãã ã¨ã»ãã¥ãªãã£çã«å±ãªãã [~]# passwd æ°ãããã¹ã¯ã¼ããå ¥åããããä¸åº¦åããã¹ã¯ã¼ããå ¥åããã ããã§ããã¹ã¯ã¼ããééããã¨ã次åSSHã§â¦
ã¾ããfastestmirrorããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ããã ãããå ¥ãããã¨ã§ãèªåçã«æ©ããã¦ã³ãã¼ãã§ãããã©ã¼ãªã¹ããé¸æãã¦ããããããã [~]# yum -y install yum-fastestmirror -yãªãã·ã§ã³ãã¤ãããã¨ã§ãä¸ã ã¤ã³ã¹ãã¼ã«ãããèãããã«æ¸ãâ¦