"레일즈 서버 시작/중지"의 두 판 사이의 차이

(새 문서: ;레일즈 서버 시작/중지 == 서버 시작 == <source lang='cli'> railsuser@zetawiki:~$ cd MyDemo/ railsuser@zetawiki:~/MyDemo$ rails server & [1] 10622 => Booting WEBrick => R...)
 
잔글 (봇: Rails(을)를 레일즈(으)로 분류 대체함)
 
(사용자 2명의 중간 판 6개는 보이지 않습니다)
2번째 줄: 2번째 줄:


== 서버 시작 ==
== 서버 시작 ==
<source lang='cli'>
<source lang='console'>
railsuser@zetawiki:~$ cd MyDemo/
railsuser@zetawiki:~$ cd my_app/
railsuser@zetawiki:~/MyDemo$ rails server &
railsuser@zetawiki:~/my_app$ rails server -d
[1] 10622
=> Booting WEBrick
=> Booting WEBrick
=> Rails 4.2.5 application starting in development on http://localhost:3000
=> Rails 4.2.5 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2016-01-25 16:55:33] INFO  WEBrick 1.3.1
[2016-01-25 16:55:33] INFO  ruby 2.2.1 (2015-02-26) [x86_64-linux]
[2016-01-25 16:55:33] INFO  WEBrick::HTTPServer#start: pid=2017 port=3000
</source>
</source>


==확인==
==확인==
<source lang='cli'>
<source lang='console'>
railsuser@zetawiki:~/MyDemo$ netstat -tnlp | grep ruby
railsuser@zetawiki:~/my_app$ netstat -tnlp | grep ruby
(Not all processes could be identified, non-owned process info
(Not all processes could be identified, non-owned process info
  will not be shown, you would have to be root to see it all.)
  will not be shown, you would have to be root to see it all.)
tcp        0      0 127.0.0.1:3000          0.0.0.0:*              LISTEN      10622/ruby       
tcp        0      0 127.0.0.1:3000          0.0.0.0:*              LISTEN      18374/ruby       
tcp6      0      0 ::1:3000                :::*                    LISTEN      10622/ruby  
tcp6      0      0 ::1:3000                :::*                    LISTEN      18374/ruby  
</source>
</source>
<source lang='cli'>
<source lang='console'>
railsuser@zetawiki:~/MyDemo$ ps -ef | grep ruby | grep -v grep
railsuser@zetawiki:~/my_app$ ps -ef | grep ruby | grep -v grep
testuser 10622 10263 2 08:49 pts/1    00:00:03 /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby bin/rails server
1000    18374    1 0 11:02 ?        00:00:00 /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby bin/rails server -d
</source>
</source>


==서버 중지==
==서버 중지==
<source lang='cli'>
<source lang='console'>
railsuser@zetawiki:~/MyDemo$ kill -9 `pidof ruby`
railsuser@zetawiki:~/my_app$ kill -9 `pidof ruby`
railsuser@zetawiki:~/MyDemo$
railsuser@zetawiki:~/my_app$ ps -ef | grep ruby | grep -v grep
[1]+  Killed                  rails server
railsuser@zetawiki:~/my_app$  
railsuser@zetawiki:~/MyDemo$
railsuser@zetawiki:~/MyDemo$ ps -ef | grep ruby | grep -v grep
railsuser@zetawiki:~/MyDemo$  
</source>
</source>


[[분류: rails]]
==같이 보기==
*[[레일즈 서버 외부 접속 허용하기]]
*[[레일즈 애플리케이션 생성]]
*[[Errno::EADDRINUSE]]
*[[레드마인 시작/중지/재시작]]
 
[[분류:레일즈]]

2016년 11월 24일 (목) 15:05 기준 최신판

레일즈 서버 시작/중지

1 서버 시작[ | ]

railsuser@zetawiki:~$ cd my_app/
railsuser@zetawiki:~/my_app$ rails server -d
=> Booting WEBrick
=> Rails 4.2.5 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options

2 확인[ | ]

railsuser@zetawiki:~/my_app$ netstat -tnlp | grep ruby
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 127.0.0.1:3000          0.0.0.0:*               LISTEN      18374/ruby      
tcp6       0      0 ::1:3000                :::*                    LISTEN      18374/ruby
railsuser@zetawiki:~/my_app$ ps -ef | grep ruby | grep -v grep
1000     18374     1  0 11:02 ?        00:00:00 /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby bin/rails server -d

3 서버 중지[ | ]

railsuser@zetawiki:~/my_app$ kill -9 `pidof ruby`
railsuser@zetawiki:~/my_app$ ps -ef | grep ruby | grep -v grep
railsuser@zetawiki:~/my_app$

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}