{"id":319,"date":"2022-09-06T14:30:35","date_gmt":"2022-09-06T05:30:35","guid":{"rendered":"http:\/\/192.168.0.139:8080\/2022\/09\/06\/shirasagi%e3%82%92centos7%e4%bb%a5%e5%a4%96%e3%81%a7%e5%8b%95%e3%81%8b%e3%81%99%ef%bc%88docker%e3%80%81almalinux%e3%80%81ubuntu%e3%80%81arm64%e7%92%b0%e5%a2%83\/"},"modified":"2022-09-06T14:30:35","modified_gmt":"2022-09-06T05:30:35","slug":"shirasagi%e3%82%92centos7%e4%bb%a5%e5%a4%96%e3%81%a7%e5%8b%95%e3%81%8b%e3%81%99%ef%bc%88docker%e3%80%81almalinux%e3%80%81ubuntu%e3%80%81arm64%e7%92%b0%e5%a2%83","status":"publish","type":"post","link":"http:\/\/192.168.0.139:8080\/2022\/09\/06\/319\/","title":{"rendered":"shirasagi\u3092CentOS7\u4ee5\u5916\u3067\u52d5\u304b\u3059\uff08Docker\u3001AlmaLinux\u3001ubuntu\u3001arm64\u74b0\u5883)"},"content":{"rendered":"\n

\u5148\u65e5\u3001Docker\u3092\u4f7f\u3063\u3066AlmaLinux\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002\u3053\u306e\u6642\u3001\u30db\u30b9\u30c8\u306farm64\u306eubuntu22.04\u3067\u3057\u305f\u3002<\/p>\n\n\n\n

\nhttps:\/\/minokamo.tokyo\/2022\/08\/28\/5200\/\n<\/div><\/figure>\n\n\n\n

\u672c\u65e5\u306f\u3001\u3053\u306eAlmaLinux\u306bshirasagi\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002shirasagi\u306f\u682a\u5f0f\u4f1a\u793e\u30a6\u30a7\u30d6\u30c1\u30c3\u30d7\u30b9\u304c\u958b\u767a\u3057\u305f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002Ruby on Rails\u3067\u958b\u767a\u3055\u308c\u3066\u304a\u308a\u3001CMS\u3084\u30b0\u30eb\u30fc\u30d7\u30a6\u30a7\u30a2\u3068\u3057\u3066\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u74b0\u5883\u306fCentOS7\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n

http:\/\/ss-proj.org\/<\/a><\/p>\n\n\n\n

\u305d\u308c\u3067\u306f\u4f5c\u696d\u3092\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u6700\u521d\u306bAlmaLinux\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u7acb\u3061\u4e0a\u3052\u307e\u3059\u3002<\/p>\n\n\n\n

docker run -d -p 3000:3000 --privileged --name shirasagi \u30a4\u30e1\u30fc\u30b8ID \/sbin\/init<\/code><\/pre>\n\n\n\n

\u30b3\u30f3\u30c6\u30ca\u306b\u5165\u3063\u3066AlmaLinux\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u66f4\u65b0\u306f\u6700\u521d\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n

docker exec -it shirasagi bash\ncat \/etc\/almalinux-release\ndnf update<\/code><\/pre>\n\n\n\n

AlmaLinux release 8.6 (Sky Tiger)<\/p>\n\n\n\n

\u3053\u3053\u304b\u3089\u306f\u3001\u516c\u5f0f\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u3092\u53c2\u8003\u306b\u3057\u3066\u9032\u307f\u307e\u3059\u3002<\/p>\n\n\n\n

https:\/\/shirasagi.github.io\/installation\/manual.html<\/a><\/p>\n\n\n\n

\u305f\u3060\u3057\u3001\u7c21\u5358\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u51fa\u6765\u307e\u305b\u3093\u3002\u307e\u305f\u3001\u30b3\u30de\u30f3\u30c9\u3092\u5909\u66f4\u3059\u308b\u3068\u3053\u308d\u304c\u591a\u6570\u51fa\u3066\u304d\u307e\u3059\u3002\u30b3\u30f3\u30c6\u30ca\u5185\u3067\u306fSELlinux\u3001 Firewalld\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3067\u3057\u305f\u306e\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a2d\u5b9a\u306f\u3057\u307e\u305b\u3093\u3002<\/p>\n\n\n\n

\u2605\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/p>\n\n\n\n

dnf install scl-utils\ndnf install wget git<\/code><\/pre>\n\n\n\n

AlmaLinux\u306a\u306e\u3067centos-release-scl\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30b3\u30f3\u30c6\u30ca\u5185\u3067\u306fclear\u30b3\u30de\u30f3\u30c9\u304c\u7121\u304b\u3063\u305f\u306e\u3067\u300cCtrl+L\u300d\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002ImageMagick\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u306f\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n

dnf install ImageMagick ImageMagick-devel<\/code><\/pre>\n\n\n\n

No match for argument: ImageMagick
No match for argument: ImageMagick-devel
Error: Unable to find a match: ImageMagick ImageMagick-devel<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

\u3053\u308c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001powertools\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

dnf config-manager --set-enabled powertools<\/code><\/pre>\n\n\n\n

\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u304c\u3001\u6b21\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n

No such command: config-manager. Please use \/usr\/bin\/dnf –help
It could be a DNF plugin command, try: “dnf install ‘dnf-command(config-manager)'”<\/p>\n\n\n\n

cd \/etc\/yum.repos.d\/\nvi almalinux-powertools.repo<\/code><\/pre>\n\n\n\n

\u30a8\u30c7\u30a3\u30bf\u3067\u958b\u3044\u3066powertools\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

enable=1<\/p>\n\n\n\n

\u66f4\u65b0\u3057\u3066ImageMagick\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u8a66\u307f\u308b\u304c\u3001\u540c\u3058\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n

dnf update\ndnf install ImageMagick ImageMagick-devel<\/code><\/pre>\n\n\n\n

\u3053\u306e\u554f\u984c\u306f\u3001EPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3067\u89e3\u6c7a\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n

dnf install epel-release\ndnf install ImageMagick ImageMagick-devel<\/code><\/pre>\n\n\n\n

devtoolset-10\u306fRHEL7\u3001CentOS7\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u306a\u3044\u306e\u3067\u3001devtoolset-11\u3092\u8a66\u3059\u304c\u5931\u6557\u3002\u8272\u3005\u8abf\u67fb\u3057\u305f\u7d50\u679c\u3001\u6b21\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3068\u540c\u69d8\u3089\u3057\u3044\u3002<\/p>\n\n\n\n

dnf install gcc-toolset-11<\/code><\/pre>\n\n\n\n

\u2605MongoDB\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n\n\n\n

Official installation
http:\/\/docs.mongodb.org\/manual\/installation\/<\/a><\/p>\n\n\n\n

shirasagi\u516c\u5f0f\u3067\u306fMongoDB\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c4.4\u3067\u3042\u3063\u305f\u304c\u3001\u30d0\u30fc\u30b8\u30e7\u30f36\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u624b\u52d5\u3067\u8ffd\u52a0\u3057\u307e\u3059\u3002\u65b0\u898f\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

vi \/etc\/yum.repos.d\/mongodb-org-6.0.repo<\/code><\/pre>\n\n\n\n

\u30fb\u8a18\u8ff0\u5185\u5bb9
[mongodb-org-6.0]
name=MongoDB Repository
baseurl=https:\/\/repo.mongodb.org\/yum\/redhat\/$releasever\/mongodb-org\/6.0\/aarch64\/
gpgcheck=1
enabled=1
gpgkey=https:\/\/www.mongodb.org\/static\/pgp\/server-6.0.asc<\/p>\n\n\n\n

CPU\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u304carm64\u3067\u3059\u306e\u3067\u3001x86_64\u3092aarch64\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

MongoDB\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5b8c\u4e86\u5f8c\u306b\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f\u304c\u3001\u505c\u6b62\u3057\u3066\u3044\u308b\u306e\u3067\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

dnf install --enablerepo=mongodb-org-6.0 mongodb-org\nsystemctl start mongod\nsystemctl enable mongod<\/code><\/pre>\n\n\n\n

\u2605Ruby(RVM) \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n\n\n\n

curl\u30b3\u30de\u30f3\u30c9\u306e3\u884c\u76ee\u306bsudo\u304c\u3042\u308a\u307e\u3059\u304c\u3001root\u3067\u5b9f\u884c\u3057\u3066\u3044\u308b\u306e\u3067\u53d6\u308a\u9664\u3044\u3066\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

curl -sSL https:\/\/rvm.io\/pkuczynski.asc | gpg --import -\ncurl -sSL https:\/\/rvm.io\/mpapis.asc | gpg --import -\ncurl -sSL https:\/\/get.rvm.io | bash -s stable<\/code><\/pre>\n\n\n\n
source \/etc\/profile\nrvm install 2.7.5 --disable-binary\nrvm use 2.7.5 --default<\/code><\/pre>\n\n\n\n

\u2605shirasagi\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/p>\n\n\n\n

git clone -b stable https:\/\/github.com\/shirasagi\/shirasagi \/var\/www\/shirasagi<\/code><\/pre>\n\n\n\n

\u2605Web\u30b5\u30fc\u30d0\u30fc\u306e\u8d77\u52d5<\/p>\n\n\n\n

devtoolset-10\u306e\u6240\u306f\u5909\u66f4\u3057\u3066\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

cd \/var\/www\/shirasagi\ncp -n config\/samples\/*.{rb,yml} config\/\nsource \/opt\/rh\/gcc-toolset-11\/enable\nbundle install --without development test<\/code><\/pre>\n\n\n\n

grpc 1.38.0\u3068sassc 2.3.0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u30de\u30b7\u30f3\u304c\u30d5\u30ea\u30fc\u30ba\u3057\u305f\u304b\u3068\u601d\u3046\u304f\u3089\u3044\u9045\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u5f85\u3063\u3066\u3044\u308c\u3070\u6b63\u5e38\u306b\u7d42\u4e86\u3057\u307e\u3059\u3002\u3057\u304b\u3057\u3001Bundler\u304c\u53e4\u3044\u3068\u8868\u793a\u3055\u308c\u305f\u306e\u3067\u6307\u793a\u306b\u5f93\u3044\u307e\u3059\u3002\u3055\u3089\u306bBundler\u3092root\u3068\u3057\u3066\u5b9f\u884c\u3057\u3066\u306f\u3044\u3051\u306a\u3044\u3068\u8868\u793a\u3055\u308c\u305f\u306e\u3067\u5bfe\u51e6\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

[DEPRECATED] The --without<\/code> flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use bundle config set without 'development test'<\/code>, and stop using this flag
Don’t run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.2.32). We suggest you to upgrade to the version that created the lockfile by running gem install bundler:2.2.32<\/code>.<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n
gem install bundler:2.2.32\ndnf install sudo<\/code><\/pre>\n\n\n\n
rake unicorn:start<\/code><\/pre>\n\n\n\n

\u3057\u304b\u3057\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u306e\u3067\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u5bfe\u51e6\u65b9\u6cd5\u3092\u8a66\u307f\u307e\u3059\u3002<\/p>\n\n\n\n

ERROR: It looks like you’re trying to use Nokogiri as a precompiled native gem on a system with glibc < 2.17:<\/p>\n\n\n\n

\/lib64\/libm.so.6: version `GLIBC_2.29′ not found (required by \/usr\/local\/rvm\/gems\/ruby-2.7.5\/gems\/nokogiri-1.13.6-aarch64-linux\/lib\/nokogiri\/2.7\/nokogiri.so) – \/usr\/local\/rvm\/gems\/ruby-2.7.5\/gems\/nokogiri-1.13.6-aarch64-linux\/lib\/nokogiri\/2.7\/nokogiri.so<\/p>\n\n\n\n

If that’s the case, then please install Nokogiri via the ruby<\/code> platform gem:
gem install nokogiri –platform=ruby
or:
bundle config set force_ruby_platform true<\/p>\n\n\n\n

Please visit https:\/\/nokogiri.org\/tutorials\/installing_nokogiri.html for more help.<\/p>\n\n\n\n

rake aborted!
LoadError: \/lib64\/libm.so.6: version `GLIBC_2.29′ not found (required by \/usr\/local\/rvm\/gems\/ruby-2.7.5\/gems\/nokogiri-1.13.6-aarch64-linux\/lib\/nokogiri\/2.7\/nokogiri.so) – \/usr\/local\/rvm\/gems\/ruby-2.7.5\/gems\/nokogiri-1.13.6-aarch64-linux\/lib\/nokogiri\/2.7\/nokogiri.so<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n
gem install nokogiri --platform=ruby\nbundle config set force_ruby_platform true<\/code><\/pre>\n\n\n\n

\u305d\u306e\u5f8c\u518d\u3073\u3001rake\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

rake unicorn:start<\/code><\/pre>\n\n\n\n

Could not find libv8-node-15.14.0.1, nokogiri-1.13.6 in any of the sources
Run bundle install<\/code> to install missing gems.<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

\u4eca\u5ea6\u306f\u4e0d\u8db3\u3057\u3066\u3044\u308b\u3082\u306e\u304c\u3042\u308b\u307f\u305f\u3044\u306a\u306e\u3067\u5bfe\u51e6\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

gem install libv8-node\ngem install nokogiri<\/code><\/pre>\n\n\n\n

\u305d\u306e\u5f8c\u3001\u30d0\u30f3\u30c9\u30eb\u30b3\u30de\u30f3\u30c9\u3092\u518d\u5ea6\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

sudo bundle install --without development test<\/code><\/pre>\n\n\n\n

Bundle complete! 124 Gemfile dependencies, 209 gems now installed.
Gems in the groups ‘development’ and ‘test’ were not installed.
Use bundle info [gemname]<\/code> to see where a bundled gem is installed.<\/p>\n\n\n\n

nokogiri 1.13.6\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u6642\u306f\u30de\u30b7\u30f3\u304c\u30d5\u30ea\u30fc\u30ba\u3057\u305f\u304b\u3068\u601d\u3046\u304f\u3089\u3044\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3057\u305f\u30021\u6642\u9593\u304f\u3089\u3044\u306f\u898b\u3066\u304a\u3044\u305f\u65b9\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n\n\n\n

rake unicorn:start<\/code><\/pre>\n\n\n\n

bundle exec unicorn_rails -c \/var\/www\/shirasagi\/config\/unicorn.rb -E production -D<\/p>\n\n\n\n

\u3046\u307e\u304f\u3044\u3063\u305f\u3088\u3046\u306a\u306e\u3067\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002\u30db\u30b9\u30c8\u3068\u30b3\u30f3\u30c6\u30ca\u3067\u30d5\u30a1\u30a4\u30e4\u30fc\u30a6\u30a9\u30fc\u30eb\u306f\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u3001Oracle Cloud\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ea\u30b9\u30c8\u306b\u306f\u30dd\u30fc\u30c8\u756a\u53f73000\u3092\u8ffd\u52a0\u3057\u3066\u3001\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u8a31\u53ef\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n

http:\/\/150.136.164.12:3000\/.mypage<\/p>\n\n\n\n

\u30ed\u30b0\u30a4\u30f3\u753b\u9762\u304c\u6b63\u5e38\u306b\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n

\u2605\u65b0\u898f\u30b5\u30a4\u30c8\u306e\u4f5c\u6210<\/p>\n\n\n\n

shirasagi\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5207\u308a\u66ff\u3048\u307e\u3059\u3002<\/p>\n\n\n\n

cd \/var\/www\/shirasagi<\/code><\/pre>\n\n\n\n

\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u524a\u9664\u3057\u3066\u3001\u65b0\u305f\u306b\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n

rake db:drop\nrake db:create_indexes<\/code><\/pre>\n\n\n\n

\u7ba1\u7406\u8005\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n

rake ss:create_user data='{ name: \"\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u8005\", email: \"sys@example.jp\", password: \"pass\" }'<\/code><\/pre>\n\n\n\n