nginx install
http://wiki.nginx.org/Install
# cd /etc/yum.repos.d/
# vi nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
# yum install nginx
# which nginx
/usr/sbin/nginx
2013年3月29日金曜日
php-fpm install
cd <phpソースディレクトリ>
$./configure --enable-fpm
$make
$make test
$su -
#make install
#cd /usr/local/etc/php-fpm.conf.default
#cp php-fpm.conf.default php-fpm.conf
#/usr/local/sbin/php-fpm
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-zts-20090626/curl.so' - /usr/local/lib/php/extensions/no-debug-zts-20090626/curl.so: undefined symbol: file_globals_id in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-zts-20090626/imagick.so' - /usr/local/lib/php/extensions/no-debug-zts-20090626/imagick.so: undefined symbol: core_globals_id in <b>Unknown</b> on line <b>0</b><br />
#warningが出た
#原因は調査中
ex) http://shiken.infrabu.info/nginx/nginx%E3%81%A8php-fpm%E3%81%AE%E7%B5%84%E3%81%BF%E5%90%88%E3%82%8F%E3%81%9B%E8%A8%AD%E5%AE%9A/
$./configure --enable-fpm
$make
$make test
$su -
#make install
#cd /usr/local/etc/php-fpm.conf.default
#cp php-fpm.conf.default php-fpm.conf
#/usr/local/sbin/php-fpm
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-zts-20090626/curl.so' - /usr/local/lib/php/extensions/no-debug-zts-20090626/curl.so: undefined symbol: file_globals_id in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-zts-20090626/imagick.so' - /usr/local/lib/php/extensions/no-debug-zts-20090626/imagick.so: undefined symbol: core_globals_id in <b>Unknown</b> on line <b>0</b><br />
#warningが出た
#原因は調査中
ex) http://shiken.infrabu.info/nginx/nginx%E3%81%A8php-fpm%E3%81%AE%E7%B5%84%E3%81%BF%E5%90%88%E3%82%8F%E3%81%9B%E8%A8%AD%E5%AE%9A/
2013年3月19日火曜日
php pdo_mysql インストール
#pecl install pdo_mysql
checking for mysql_config... not found
configure: error: Cannot find MySQL header files under
ERROR: `/tmp/pear/temp/PDO_MYSQL/configure' failed
⇒headerファイルがないのでインストールできなかった。
ソースをダウンロード
$pecl download pdo_mysql
cd PDO_MYSQL-1.0.2
$ ./configure --with-pdo-mysql=shared,/usr/local/mysql
make
make test
su
make install
pdo_mysql.soが出来る
/usr/local/lib/php/extensions/no-debug-zts-20090626/
php.iniを修正
extension=pdo_mysql.so
phpindo()のPDOにmysqlが表示されていればOK
2013年3月9日土曜日
rails console エラー
$ rails console
/usr/local/lib/ruby/1.9.1/irb/completion.rb:9:in `require': cannot load such file -- readline (LoadError)
from /usr/local/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands/console.rb:3:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands/console.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:38:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:38:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
#readlineがないのでinstallする
sudo yum install libreadline
#Gemfile編集
gem 'rb-readline' #を追加
$bundle install
Installing rb-readline (0.4.2)
#↑が出てくる
#もう一度
$rails console
#成功
Ruby on Rails をインストール
$gem install rails
Fetching: rails-3.2.12.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/lib/ruby/gems/1.9.1 directory.
$sudo /usr/local/bin/gem install rails
Successfully installed rails-3.2.12
1 gem installed
Installing ri documentation for rails-3.2.12...
Installing RDoc documentation for rails-3.2.12...
$ gem which rails
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails.rb
$ rails -v
Rails 3.2.12
$rails new AppName
#AppNameが作成される
cd AppName
#動かしてみる
$rails start
/usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
from /usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:72:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:70:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:70:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:59:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:59:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler.rb:132:in `require'
from /home/yoshioka/myBooks/config/application.rb:7:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:53:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:53:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
#エラー。。
#autodetect が見つからない?
#https://github.com/sstephenson/execjs を見てみる
#README.md
$gem install execjs
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/lib/ruby/gems/1.9.1 directory.
$sudo /usr/local/bin/gem install execjs
Successfully installed execjs-1.4.0
1 gem installed
Installing ri documentation for execjs-1.4.0...
Installing RDoc documentation for execjs-1.4.0...
#もう一度実行してみる
$rails server
/usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
#同じエラー
#Gemfileを編集した。
$ diff Gemfile Gemfile.20130309
18c18
< gem 'therubyracer', :platforms => :ruby
---
> # gem 'therubyracer', :platforms => :ruby
#再度実行
$ rails server
=> Booting WEBrick
=> Rails 3.2.12 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-03-09 11:41:51] INFO WEBrick 1.3.1
[2013-03-09 11:41:51] INFO ruby 1.9.3 (2011-10-30) [x86_64-linux]
[2013-03-09 11:41:51] INFO WEBrick::HTTPServer#start: pid=5481 port=3000
#動いた
Fetching: rails-3.2.12.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/lib/ruby/gems/1.9.1 directory.
$sudo /usr/local/bin/gem install rails
Successfully installed rails-3.2.12
1 gem installed
Installing ri documentation for rails-3.2.12...
Installing RDoc documentation for rails-3.2.12...
$ gem which rails
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails.rb
$ rails -v
Rails 3.2.12
$rails new AppName
#AppNameが作成される
cd AppName
#動かしてみる
$rails start
/usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
from /usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:72:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:70:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:70:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:59:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/runtime.rb:59:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler.rb:132:in `require'
from /home/yoshioka/myBooks/config/application.rb:7:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:53:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:53:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
#エラー。。
#autodetect が見つからない?
#https://github.com/sstephenson/execjs を見てみる
#README.md
Installation
$ gem install execjs
#試してみる$gem install execjs
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/lib/ruby/gems/1.9.1 directory.
$sudo /usr/local/bin/gem install execjs
Successfully installed execjs-1.4.0
1 gem installed
Installing ri documentation for execjs-1.4.0...
Installing RDoc documentation for execjs-1.4.0...
#もう一度実行してみる
$rails server
/usr/local/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
#同じエラー
#Gemfileを編集した。
$ diff Gemfile Gemfile.20130309
18c18
< gem 'therubyracer', :platforms => :ruby
---
> # gem 'therubyracer', :platforms => :ruby
#再度実行
$ rails server
=> Booting WEBrick
=> Rails 3.2.12 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-03-09 11:41:51] INFO WEBrick 1.3.1
[2013-03-09 11:41:51] INFO ruby 1.9.3 (2011-10-30) [x86_64-linux]
[2013-03-09 11:41:51] INFO WEBrick::HTTPServer#start: pid=5481 port=3000
#動いた
登録:
投稿 (Atom)