Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
SELinuxã®æå¹å ãRedmine 3.4ãCentOS 7.3ã«ã¤ã³ã¹ãã¼ã«ããæé ãã使ç¨ãã¦æ§ç¯ããç°å¢ã§ã¯SELinuxã®ç¶æ ãDisabledã«è¨å®ããã¦ãã¾ããSELinuxãDisabledã®ç¶æ ã§ä½æããããã¡ã¤ã«ã«ã¯SELinuxã®ã©ãã«ãä»ä¸ããã¾ãããSELinuxã使ç¨ããããã«ã¯å ¨ã¦ã®ãã¡ã¤ã«ã«SELinuxã®ã©ãã«ãä»ä¸ããå¿ è¦ãããã¾ããããã ãã¡ã¤ã«ã·ã¹ãã ã®åã©ãã«ä»ã ã¨å¼ã³ã¾ãã åã©ãã«ä»ãããããã¨ã§SELinuxãå©ç¨ã§ããããã«ãªãã¾ããåã©ãã«ä»ãå¾ãåãã¦ã·ã¹ãã ã«ã¢ã¯ã»ã¹ãããã¨ããªã·ã¼éåã«ãã£ã¦ããã¤ãã®å¿ è¦ãªå¦çãæå¦ãããå ´åãããã¾ããã¢ã¯ã»ã¹æå¦ãèµ·åä¸ã«çºçããã¨ã·ã¹ãã èªä½ãèµ·åã§ããªããªãå¯è½æ§ãããã¾ãããããåé¿ãããããSELinuxã®ã¢ã¼ããå¿ ã Permissive ã¢ã¼ãã«è¨å®ãã¾ããå ¨ã¦ã®è¨å®ãå®äº
FROM ruby:latest MAINTAINER ABCanG <abcang1015@gmail.com> RUN apt-get update && apt-get install -y cron # timezone RUN cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime RUN mkdir -p /app WORKDIR /app COPY Gemfile /app/ COPY Gemfile.lock /app/ RUN bundle install --deployment COPY . /app RUN env > /env CMD echo '30 * * * * cd /app; env - `cat /env` ruby ./script.rb' | crontab - && cron -f 以ä¸ã®äºãå®è¡ãã¦ãã¾
ãã¼ã«ã«ã® Rails ã®éçºç°å¢ãç´æ¥OSã«æ§ç¯ãã¦ãã¾ãã¨ã ä»äºã§å¥ã®ãã¼ã¸ã§ã³ã® DB ãå¿ è¦ã«ãªã£ãã±ã¼ã¹ãªã©ã§é常ã«è¦å´ããã®ã§ ä½ããã®ä»®æ³ãã·ã³ä¸ã«éçºç°å¢ãæ§ç¯ããã»ãã楽ã ã¨æãã Vagrant ã¨ä½ãããã®ãããã¸ã§ãã³ã°ãã¼ã«ã使ãæ¹æ³ããã¿ã¼ã ãã Docker Compose ã試ãã«ä½¿ã£ã¦ã¿ãã便å©ã ã£ãã Docker Compose ãªã«? Docker ã«ãããè¤æ°ã³ã³ããã®ç®¡çã docker-compose.yml ã¨ãã1ãã¡ã¤ã«ã§ã§ããããã«ãããã¼ã«ã§ãã 詳ãã㯠https://docs.docker.com/compose Vagrant ã¨æ¯ã¹ãã¡ãªãã è¨å®ãã¡ã¤ã«ãçãã ä¾ãã° Vagrant + ansible ã®å ´åãRuby ã¨ã PostgreSQL ã¨ãã®ã¤ã³ã¹ãã¼ã«æ¹æ³ãèªåã§æ¸ãå¿ è¦ãããã¾ããã docker-c
çµè« 以ä¸ã®æé ã§ä½ãã®ãå¹ççã§ãã ãã¼ã¹ã«ãã Docker ã¤ã¡ã¼ã¸ã決ãã docker run -it <docker-image> sh ã§ã³ã³ããå é¨ã§ä½æ¥ 1è¡ãã¤ããã¾ããã£ããã©ããã«ã¡ã¢ 失æããããã£ãã exit ãã¦å度 docker run ãã¡ã¤ã«ã®åãè¾¼ã¿ããã¼ãã®å¤é¨å ¬éãå¿ è¦ãªããªãã·ã§ã³ä»ã㧠docker run å ¨é¨ãã¾ããã£ãã Dockerfile ã«ãã ãããã§è¦ããã¨ã¯ãªãã§ããããã docker build ã§è©¦è¡é¯èª¤ããªãã Dockerfile ãä½ãã¨ããããããã¯ãããã«è¦è¡ã§ãã é ã ãããã°ãã«ããï¼ã³ã³ããççºããï¼ï¼ã£ã¦æ°æã¡ã«ãªãã¾ãã ãããåå ã§ãDocker 使ããªã 便å©ãããªã ãã¨æã£ã¦ããã®ãªãããã¯åéãã§ãã æé 詳説 試ãã« ip-api.com ã«ãªãã¼ã¹ãããã·ããã ãã® Nginx ã¤
ã¯ããã« Dockerã§ã®éçºç°å¢æ§ç¯ã«ã¤ãã¦ã¯è²ã ã¨æ å ±ã転ãã£ã¦ãã¾ããããæ å ±ãå¤ãã£ããæ§æãéã£ããã§è©¦è¡é¯èª¤ããã¾ããã®ã§ã²ã¨ã¾ãã¾ã¨ãã¾ãããã¡ãªã¿ã«æ¬çªç°å¢ã¯ä»ã®ã¨ããDockerå ¨ã使ã£ã¦ããããéçºç°å¢ãæ軽ã«æ´ããã¨ããç®çã®ã¿ã§ä½¿ã£ã¦ãã¾ãã éçºä¸ã®ãµã¼ãã¹ã¯ç¾å¨ä¸è¨ã®ã³ã³ãã¼ãã³ãã§æ§æããã¦ãã¾ãã Ruby on Rails 4 MySQL memcached redis nginx Dockerå°å ¥åã¨å¾ã§ã®å¤å å¼ç¤¾ã§ã¯åå人ã®PCã«ç°å¢ãæ§ç¯ãã¦éçºãã¦ãã¾ãã mysqldãmemcachedãImageMagickãªã©ä¾åãã¦ããã¢ã¸ã¥ã¼ã«ãå ¥ãã¦ç°å¢ãã»ããã¢ããããã®ã§ãããã¾ããã«ãã¯æéãããããã¼ã¸ã§ã³ãéã£ããã§ãªãã ããã 丸ä¸æ¥è²»ãããã¨ãå¤ãã£ãã§ãã Dockerã§éçºç°å¢ãã»ããã¢ããã§ããããã«ããçµæãPCãã¾ã£ãããªç¶æ ã§
Amazon EC2 ã« Nginx ãã¤ã³ã¹ãã¼ã«ãã¦èµ·åãããã¨ããã¨ã以ä¸ã®ãããªã¨ã©ã¼ãåºã¦èµ·åã«å¤±æãã¾ããã $ sudo service nginx start Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] still could not bind() ã¨ã©ã¼ã¡ãã»ã¼ã¸ã«ããéããã»ãã®ããã»ã¹ãå ã« 80 çªãã¼ãããªãã¹ã³ãã¦ããã®ãåå ã§ããã ç¹å®ã®ãã¼ãããªãã¹ã³ãã¦ããããã»ã¹ã調ã¹ãã«ã¯ lsof ã³ãã³ãã使ãã¾ãããã¼ãçªå·ã調ã¹ãã«ã¯ i ãªãã·ã§ã³ã使ãã¾ãããªããlsof ã³ãã³ããå®è¡ããã«ã¯ root 権éãå¿ è¦ã§ãã $ sudo lsof -i:80 COMMAND PID USER F
yum -y install yum-plugin-priorities wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm rm -f rpmforge-release-* wget http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/6/remi/x86_64/remi-release-6-1.
CentOS 7ã®å¿ è¦ãªããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«Â¶ Redmineãã¤ã³ã¹ãã¼ã«ãåããã®ã«å¿ è¦ã¨ãªãCentOS 7ã®ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¾ãã éçºãã¼ã«ç¶ ~$ sudo yum groupinstall "Development Tools" : ~$ sudo yum install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel ImageMagick ImageMagick-devel : MariaDB¶ MariaDBã®CentOS 7æ¨æºããã±ã¼ã¸ã¤ã³ã¹ãã¼ã«Â¶ ~$ sudo yum install mariadb-server mariadb-devel : MariaDBã®è¨å®Â¶ MariaDBã¯ã/etc/my.cnf ããã/etc/my.cnd.d/* ãã¤ã³ã¯ã«ã¼ãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}