LoginSignup
2
2

More than 5 years have passed since last update.

どどんとふ1.46.00を最小構成のCentOS7から構築できた時の手順

Last updated at Posted at 2016-03-30

こちらこちらの手順にしたがってどどんとふのセットアップをしていたが、それだけでは動かなかったのでほんの少し追記したものを自分でもう一度まとめて書く。CentOS7をminimumな感じでインストールしたあとから始める。

必要なものどもを取得

$ sudo yum update
$ sudo yum install wget libyaml-devel gcc httpd unzip policycoreutils-python

rubyのセットアップ

$ wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.6.tar.gz
$ tar -zxvf ruby-2.1.6.tar.gz
$ cd ruby-2.1.6
$ ./configure
$ sudo make install

どどんとふのセットアップ

//どどんとふの取得&展開
$ cd ~
$ wget http://www.dodontof.com/Download/DodontoF_release/DodontoF_Ver.1.46.00_MASTERPIECE.zip
$ unzip DodontoF_Ver.1.46.00_MASTERPIECE.zip
$ sudo mv DodontoF_WebSet/* /var/www/
//所有権とかセキュリティコンテクストとか権限の変更
$ cd /var/www
$ sudo chown -R apache:apache public_html/ saveData/
$ sudo chcon -R -t httpd_sys_content_t public_html/ saveData/

$ cd public_html/DodontoF 
$ sudo chmod -R 705 saveDataTempSpace fileUploadSpace replayDataUploadSpace ../../saveData ../imageUploadSpace

$ sudo chmod 700 DodontoF*.rb

$ sudo chmod 600 log.txt*

/etc/httpd/conf/httpd.conf を編集する。

httpd.conf
- DocumentRoot "/var/www/html"
+ DocumentRoot "/var/www/public_html"

- #AddHandler cgi-script .cgi
+ AddHandler cgi-script .cgi .rb

- <Directory "/var/www/html/">
+ <Directory "/var/www/public_html/">

+ <Directory "/var/www/public_html/DodontoF/">
+ DirectoryIndex DodontoF.swf
+ Options ExecCGI
+ </Directory>

DodontoFServer.rbを編集する。

DodontoFServer.rb
- #!/user/local/bin/ruby -Ku
+ #!/user/local/bin/ruby -EUTF-8

SELinuxを切る。

/etc/selinux/config
- SELINUX=enforcing
+ SELINUX=disabled

再起動しないと反映されないので注意。

reboot

httpdをstartする。

$ systemctl start httpd

以上で動くようになる。このあとセキュリティとかの設定をする必要がある。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2