Instalasi LibreOffice
Karena terdapat fitur konversi file-file PDF, maka semenjak SIPP versi 3.2.0., pada server SIPP harus terinstall LibreOffice. Sebelum menginstall LibreOffice, Anda diharuskan menginstal/mengupdate Phyton terlebih dahulu, dengan perintah:
yum -y install python
Selanjutnya, Anda melakukan instalasi LibreOffice dengan perintah:
yum -y install libreoffice
Tunggu beberapa saat hingga instalasi selesai.
Setelah instalasi selesai, Anda diharuskan membuat service untuk LibreOffice dengan perintah:
nano /etc/systemd/system/soffice.service
Akan terbuka file baru yang masih kosong. Pada file tersebut paste kode di bawah ini, pada file tersebut:
[Unit]
Description=Soffice Service
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=simple
ExecStart=/usr/lib64/libreoffice/program/soffice --nofirststartwizard --headless --norestore --invisible "--accept=socket,host=localhost,port=6969,tcpNoDelay=1;urp;"
RestartSec=5
ExecStop=/usr/bin/pkill -F /var/run/soffice.pid
PIDFile=/var/run/soffice.pid
[Install]
WantedBy=multi-user.target
Simpan dan keluar dari Nano.
Kemudian jalankan service LibreOffice dengan mengetikan satu persatu kode berikut ini, yang diikuti dengan tanda Enter pada keyboard untuk setiap baris kodenya:
systemctl daemon-reload
systemctl start soffice.service
Untuk mengetahui apakah Anda berhasil menjalankan service LibroOffice, ketikkan perintah berikut:
systemctl status soffice.service
Perhatikan respon teks yang diberikan oleh CentOS:
Jika sudah terlihat tulisan hijau "active (running)", berarti service LibreOffice sudah berjalan.
Langkah di bawah ini dijalankan hanya apabila service LibreOffice tidak berjalan. Jika dengan langkah di atas sudah berhasil menjalankannya, langkah berikut ini TIDAK dijalankan.
Apabila service LibreOffice tidak aktif, maka edit file /etc/systemd/system/soffice.service yang sebelumnya sudah dibuat, dengan perintah:
nano /etc/systemd/system/soffice.service
Hapus semua isi dari file tersebut, kemudian copy kode di bawah ini, dan paste ke file tersebut.
[Unit]
Description=Soffice Service
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/soffice --nofirststartwizard --headless --norestore --invisible "--accept=socket,host=localhost,port=6969,tcpNoDelay=1;urp;"
RestartSec=5
ExecStop=/usr/bin/pkill -F /var/run/soffice.pid
PIDFile=/var/run/soffice.pid
[Install]
WantedBy=multi-user.target