freebsdにenjuインストールするにもsolrのバージョンが
Java SE / OpenJDK 8(Java9以上では動作しません)
Apache Solr 5.5 以上 (7.x系は未検証) 
このつながりのせいで ports pkg install では新しすぎる
古いsolrをダウンロードしようとしたらやたらと時間がかかる
でも、じっと我慢。
パッケージの管理が pkg gem yarn と何がなんだかわからないまま試行錯誤しながらインストールを始めたこともあり、なかなかまともに起動画面にたどり着くことができなかったが、なんとかめどがついた。
pkg install bash
pkg install apache24
        apache24: 2.4.46
ee /etc/rc.conf
        apache24_enable="YES"
pkg install ruby
        ruby: 2.6.6_1,1
pkg install ImageMagick7-7.0.10.24
        ImageMagick7: 7.0.10.24
pkg install openjdk8
        openjdk8: 8.265.01.1
pkg install postgresql95-server-9.5.23
        postgresql95-client: 9.5.23
        postgresql95-server: 9.5.23
ee /etc/rc.conf
        postgresql_enable="YES"
/usr/local/etc/rc.d/postgresql initdb
/usr/local/etc/rc.d/postgresql start
restart -r
pkg install redis
        redis: 5.0.9
pkg install ruby26-gems
        ruby26-gems: 3.0.6
pkg install node
        node: 14.13.0
pkg install yarn
        yarn: 1.22.4_1
pkg install git
        git: 2.28.0
pkg install wget
        wget: 1.20.3
wgetで直接ダウンロード
        Apache Solr6.6.6
tar zxf solr-6.6.6.tgz
mv solr-6.6.6 /usr/local/solr
gem install rails -v 5.2.4
gem install foreman whenever
mkdir enju
chown ○○:○○ enju
ユーザー○○になって
cd /usr/local/enju
rails
 new enju_leaf_13 -d postgresql --skip-bundle --skip-turbolinks -m 
https://gist.github.com/nabeta/6c56f0edf5cc1c80d9c655c2660a9c59.txt
cd enju_leaf_13
bundle -j4 --path vendor/bundle
bundle install
bundle exec rake enju_biblio_engine:install:migrations
yarn install
rootになって
su pgsql
createuser ○○ --interactive -W
n
y
y
パスワード
exit
exit
ee config/database.yml
username: ○○
bundle exec rake db:create:all
echo SECRET_KEY_BASE=`bundle exec rake secret` >> .env
echo RAILS_SERVE_STATIC_FILES=true >> .env
echo REDIS_URL=redis://127.0.0.1/enju_leaf >> .env
rails g enju_leaf:setup
rails g enju_leaf:quick_install
RAILS_ENV=production rails g enju_leaf:seed
bundle exec whenever --update-crontab
echo RAILS_ENV=production >> .env
ee Procfile
redis: redis-server solr: bundle exec rake sunspot:solr:run resque: bundle exec rake environment resque:work QUEUE=enju_leaf,mailers TERM_CHILD=1 web: bundle exec rails s -b 0.0.0.0 -p 3000
foreman start
cd
ee enju
#!/bin/sh
cd /usr/local/enju/enju_leaf_13
nohup foreman start > out.log 2> err.log < /dev/null &
chmod 744 enju
 
0 件のコメント:
コメントを投稿