-
-
Save skaag/5547890 to your computer and use it in GitHub Desktop.
| # Install some system dependencies: | |
| apt-get install build-essential openssl libcurl4-openssl-dev \ | |
| libreadline6 libreadline6-dev curl mysql-server libmysqlclient-dev git-core \ | |
| zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev \ | |
| libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion \ | |
| pkg-config imagemagick joe libmagickwand-dev libmagickwand4 | |
| # Install Ruby via RVM (easiest!): | |
| cd /root/ | |
| curl -L https://get.rvm.io | bash -s stable --ruby | |
| source /usr/local/rvm/scripts/rvm | |
| echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"' >> ~/.bashrc | |
| # Install Passenger + Nginx: | |
| gem install passenger --no-ri --no-rdoc | |
| passenger-install-nginx-module | |
| # Get some redmine scripts | |
| useradd -m redmine -s /bin/bash | |
| cd ~redmine | |
| git clone git://github.com/jnstq/rails-nginx-passenger-ubuntu.git | |
| mv rails-nginx-passenger-ubuntu/nginx/nginx /etc/init.d/ | |
| chown root:root /etc/init.d/nginx | |
| chmod +x /etc/init.d/nginx | |
| # Add the server section for our redmine install (remove the other server{} block): | |
| joe /opt/nginx/conf/nginx.conf | |
| server { | |
| listen 80; | |
| server_name redmine.nsa.co.il; | |
| root /var/data/redmine/public; | |
| passenger_enabled on; | |
| client_max_body_size 50m; | |
| } | |
| # Download the latest 2.3 redmine version: | |
| mkdir /var/data | |
| cd /var/data | |
| svn co http://svn.redmine.org/redmine/branches/2.3-stable redmine | |
| # Get the dependencies installed: | |
| cd redmine/ | |
| bundle install --without postgresql sqlite development test rmagick --path bundle | |
| # Create some required folders / Fix permissions: | |
| mkdir public/plugin_assets | |
| chown -R www-data:www-data files log tmp public/plugin_assets config.ru | |
| chmod -R 755 files log tmp public/plugin_assets | |
| # Configure the 'production' database, you can remove the other sections: | |
| cp config/database.yml.example config/database.yml | |
| joe config/database.yml | |
| # Login to mysql to create the database | |
| mysql -uroot -p | |
| # Create the redmine database, user, password (as configured in database.yml) | |
| create database redminedb character set utf8; | |
| grant all privileges on redminedb.* to redmine@localhost identified by 'redmine'; | |
| flush privileges; | |
| \q | |
| # Load the redmine database | |
| rake db:migrate | |
| # Restart nginx and passenger: | |
| service nginx restart | |
| touch tmp/restart.txt | |
| # Access redmine: http://yourdomain.com/ | |
| # User: admin | |
| # Pass: admin |
Why i'm have error?(
Could not find gem 'rails (= 3.2.13) ruby' in the gems available on this machine. (Bundler::GemNotFound)
/usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/resolver.rb:296:in resolve' /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/resolver.rb:168:instart'
/usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/resolver.rb:129:in block in resolve' /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:incatch'
/usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in resolve' /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/definition.rb:179:inresolve'
/usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in specs' /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/definition.rb:159:inspecs_for'
/usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in requested_specs' /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/environment.rb:18:inrequested_specs'
/usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in setup' /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:120:insetup'
/usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in <top (required)>' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:133:inrequire'
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:133:in rescue in require' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:142:inrequire'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18/lib/phusion_passenger/loader_shared_helpers.rb:212:in run_load_path_setup_code' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:96:inpreload_app'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:150:in <module:App>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:29:inmodule:PhusionPassenger'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:28:in `
Файл /opt/nginx/conf/nginx.conf сохранён
redmine2.3inst.sh: 33: redmine2.3inst.sh: server: not found
redmine2.3inst.sh: 34: redmine2.3inst.sh: listen: not found
redmine2.3inst.sh: 35: redmine2.3inst.sh: server_name: not found
redmine2.3inst.sh: 36: redmine2.3inst.sh: root: not found
redmine2.3inst.sh: 37: redmine2.3inst.sh: passenger_enabled: not found
redmine2.3inst.sh: 38: redmine2.3inst.sh: client_max_body_size: not found
redmine2.3inst.sh: 39: redmine2.3inst.sh: Syntax error: "}" unexpected