ダン・クァン・ミン Blog

はじめまして

Setup Apache, Mysql and Rails

Install apache2

$ sudo yum install httpd
$ sudo service httpd start

Install mysql

$ sudo yum install mysql-server
$ sudo service mysqld start
$ mysql_secure_installation

$ sudo yum install mlocate tree sysstat iftop dstat lsof tcpdump wget
$ sudo yum install libcurl-devel httpd-devel apr-devel apr-util-devel
$ sudo yum install mysql-devel

Set up rails

$ sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -sSL https://get.rvm.io | bash
$ source ~/.profile
$ rvm install 2.2.2
$ rvm use 2.2.2 --default
$ gem install rails

Edit file /etc/httpd/conf/httpd.conf

LoadModule passenger_module /home/kankou/.rvm/gems/ruby-2.2.2/gems/passenger-5.0.15/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
  PassengerRoot /home/kankou/.rvm/gems/ruby-2.2.2/gems/passenger-5.0.15
  PassengerDefaultRuby /home/kankou/.rvm/gems/ruby-2.2.2/wrappers/ruby
</IfModule>

<VirtualHost *:80>
    ServerName kankouannai-apuri.local
    DocumentRoot /home/kankou/Kankouannai/public/
        RailsEnv development
        RailsBaseURI /
    <Directory /home/kankou/Kankouannai/public/>
        AllowOverride all
        Options -MultiViews
    </Directory>
</VirtualHost>

Install passenger

$ gem install passenger
$ passenger-install-apache2-module

Install vsftpd

$ sudo yum install vsftpd

Install nodejs

$ curl -sL https://rpm.nodesource.com/setup | sudo bash -
$ sudo yum install nodejs

Comments