Open fish-404 opened 2 years ago
Certbot https://certbot.eff.org/
Reference: https://github.com/mastodon/documentation/issues/1432
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Solution:
export NODE_OPTIONS=--max_old_space_size=4096
Reference: https://stackoverflow.com/questions/38558989/node-js-heap-out-of-memory
PostgresSQL
Don't use yum install postgresql-server
to install [^1]. Follow official guide[^2] to install.
Note:
postgresql-14.service
(maybe other version instead of 14)postgresql14-xxx
(use version number instead of 14)https://rhel.pkgs.org/7/postgresql-common-x86_64/libpq5-devel-15.0-42.2PGDG.rhel7.x86_64.rpm.html
[^1]: Centos 7 default postgresql is 9.2, mastodon(v3.5.3) dependency is 9.5+ [^2]: PostgreSQL: Linux downloads (Red Hat family)
To Do: Learn to write a shell script to install these packages, or I have to check them every time if I migrate to a new machine. And the special pg packages installing may need a version check. If I can know the dependency requirement by shell, the whole install process maybe possiable to install automatically.
Packages:
imagemagick
-ImageMagick
ffmpeg
[^1]libxml2-dev
-libxml2-devel
libxslt1-dev
-libxslt-devel
libyaml-dev
-libyaml-devel
libffi-dev
-libffi-devel
g++
gcc
autoconf
build-essential
-group 'Development Tools'
[^2][^3]redis-server
redis-tools
-redis
[^4]libjemalloc-dev
-jemalloc-devel
[^5]libssl-dev
-openssl-devel
pkg-config
-pkgconfig
libprotobuf-dev
-protobuf-devel
libgdbm-dev
-gdbm-devel
libreadline6-dev
-readline-devel
zlib1g-dev
-zlib-devel
libidn11-dev
-libidn-devel
libncurses5-dev - ncurses-devel
Some deploy guide[^6] writes clearly, but miss some packages after mastodon has upgraded to a new version.
About Node.js and Yarn:
curl https://xxxxxxx/setup_[version].x
, be careful with the version.[^7]If you have installed Node.js from other source, you will get a warning, follow the installation hint to install Yarn package manager.
Useful websites:
[^1]: How to Install and Use FFmpeg on CentOS 7 | Linuxize
[^2]: How to install GCC Compiler on CentOS 7 | Linuxize](https://linuxize.com/post/how-to-install-gcc-compiler-on-centos-7/)
[^3]: software installation - Can't Install build-essential on CentOS - Unix & Linux Stack Exchange
[^4]:
jemalloc
package will also be installed[^5]: Require
jemalloc
package[^6]: Deploying a Mastodon Instance on CentOS7 | by Grant 'Faceman' Foster | Medium
[^7]: According to the NodeSource repository, CentOS 7 (64-bit) BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+