February 28, 2015

How To Install Ruby On Rails Framework On Windows and Linux

Posted by Unknown
1


To develop a web application using Rails framework, need install some software:
  • Ruby
  • Rails framework (current version rails 4.2.0 )
  • A database system (MySQL, SQLite, PostgreSQL, ...)
  • A web server (Use webrick web server on local, in production: apache, nginx, ...)

1. Install ruby

 Install ruby on windows and linux

2. Install Rails framework


# gem install rails --include-dependencies

3. Create first application

# rails new sample_app
If you want to use MySQL:
# rails new sample_app -d mysql

4. Running

# cd sample_app
# rails s
Then, open browser and type
http://localhost:3000

* Note:

To use MySQL, install MySQL server and conector(mysql2) on your computer.

May you need

Install Node.js

# apt-get install curl
# curl -sL https://deb.nodesource.com/setup | sudo bash -
# apt-get install -y nodejs

How To Install HTTPD To Configure Web Server On CentOS7

Posted by Unknown
0


Install HTTPD


# yum install httpd -y

Remove welcome page 
# rm -rf /etc/httpd/conf.d/welcome.conf

Configure 

# vim /etc/httpd/conf/httpd.conf

# line 86 change admin's email address
ServerAdmin root@example.com

# line 95 change to your server's name
ServerName www.example.com:80

# line 151 change
AllowOverride All

# line 164, add some file name
DirectoryIndex index.html index.php index.cgi index.htm

# keepalive is On
KeepAlive On

# Start | Restart server

# service httpd restart 
# systemctl enable httpd

Create test page

# vim /var/www/html/index.html
and add some text below
<h1> This is a test page </h1>

Open web browser, type your IP or www.example.com


Popular Posts

Labels

Archive

 

Blogroll

Recepies

Flickr Images

Copyright © 2014. Tutorials Blog - All Rights Reserved