安装redmine零碎记录

09-04 15 views

yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel
 
 
$ wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
$ tar xzvf yaml-0.1.4.tar.gz
$ cd yaml-0.1.4
$ ./configure –prefix=/usr/local
$ make
$ make install
 
 
$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
$ tar xzvf ruby-1.9.3-p0.tar.gz
$ cd ruby-1.9.3-p0
$ ./configure –prefix=/usr/local –enable-shared –disable-install-doc –with-opt-dir=/usr/local/lib
$ make
$ make install
 
SeLinux导致问题:
ruby: error while loading shared libraries: /usr/local/lib/libruby.so.1.9: cannot restore segment prot after reloc: Permission denied
cd /usr/local/lib/
chcon -t texrel_shlib_t *.so
 
 
cannot load such file — rails/all
 
 
bundle install –without development test rmagick
 
 
# file: /var/www/redmine/Gemfile
gem “mysql” 


 
local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
 
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock 
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock 
 
 
mysql -u diseen -p -S /var/lib/mysql/mysql.sock
 
mysqladmin -r root -p123456 shutdown
 
gem install bundler
bundle install –without development test rmagick
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
adduser redmine
groupadd redmine
 
nohup ruby script/rails server webrick -e production &
 
降ruby版本1.8.7
 
 
安装passenger:
 
gem install passenger
passenger-install-nginx-module –help
 
./passenger-install-nginx-module
选择自定义nginx
  sh ./configure –prefix=’/usr/local/nginx’ –with-http_ssl_module –with-http_
gzip_static_module –with-cc-opt=’-Wno-error’ –with-pcre=’/tmp/root-passenger-3
2201/pcre-8.30′ –add-module=’/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.14
/ext/nginx’
重新编译安装nginx
 http {
     …
     passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.14;
     passenger_ruby /usr/local/bin/ruby;
     …
 }
passenger_enabled on;
指导手册:
/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.14/doc/Users guide Nginx.html
./nginx -t
./nginx -stop
./nginx -s  reload
Automatic refresh of repositories in Redmine
$ sudo nano /etc/cron.d/redmine
Add the following line and save
*/15 * * * * root ruby /usr/share/redmine/script/runner “Repository.fetch_changesets” -e production > /dev/null 2>&1

发表评论