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

3번째 줄: 3번째 줄:
== 서버 시작 ==
== 서버 시작 ==
<source lang='cli'>
<source lang='cli'>
railsuser@zetawiki:~$ cd MyDemo/
railsuser@zetawiki:~$ cd my_app/
railsuser@zetawiki:~/MyDemo$ rails server -d
railsuser@zetawiki:~/my_app$ rails server -d
=> 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
12번째 줄: 12번째 줄:
==확인==
==확인==
<source lang='cli'>
<source lang='cli'>
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.)
19번째 줄: 19번째 줄:
</source>
</source>
<source lang='cli'>
<source lang='cli'>
railsuser@zetawiki:~/MyDemo$ ps -ef | grep ruby | grep -v grep
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
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>
25번째 줄: 25번째 줄:
==서버 중지==
==서버 중지==
<source lang='cli'>
<source lang='cli'>
railsuser@zetawiki:~/MyDemo$ kill -9 `pidof ruby`
railsuser@zetawiki:~/my_app$ kill -9 `pidof ruby`
railsuser@zetawiki:~/MyDemo$ ps -ef | grep ruby | grep -v grep
railsuser@zetawiki:~/my_app$ ps -ef | grep ruby | grep -v grep
railsuser@zetawiki:~/MyDemo$  
railsuser@zetawiki:~/my_app$  
</source>
</source>



2016년 1월 26일 (화) 14:27 판

레일즈 서버 시작/중지

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 }}