There are several different methods but now almost everyone is using Mozc (Google Japanese) + iBus. In fact, it is so good I also switched Japanese input in Windows 10 to Google Japanese.
While I prefer XFCE FCITX over iBus, FCITX does not work very well in GNOME desktop.
If you are interested, I wrote a tutorial about iBus-Mozc here: Ibus-mozcのデフォルトをひらがな入力モードにする方法。 How to change default input mode of ibus-mozc to Hiragana