[精讚] [會員登入]
381

JIRA instance migration phase2: install node.js and chinese fonts

install node.js to export PDF though BigPicture plugin

分享此文連結 //n.sfs.tw/15169

分享連結 JIRA instance migration phase2: install node.js and chinese fonts@der amateur
(文章歡迎轉載,務必尊重版權註明連結來源)
2021-07-05 00:13:11 最後編修
2021-05-31 23:29:30 By
 

將jira移到centos7目的,

就是為了可以使用BigPicture這個套件,

把Gantt Chart甘特圖轉成pdf格式匯出,增加報表的表面效度

結果遇到中文字型的問題,網路上谷歌大神找不到特定的解法,

試了好幾次,終於解決,特別紀錄一下

 

1. 安裝node.js

為了用puppeteer這個套件

呼叫chromium在命令列處理pdf檔

官方文件說,已經到node.js 14了,node.js8不再維護

先把node.js repo加到yum repolist

curl --silent --location https://rpm.nodesource.com/setup_14.x | sudo bash -

接下來直接用yum裝

yum install -y nodejs

 

2. 用npm裝puppeteer

指定最新的10.0.0

可以到官方隨時查詢最新版本

https://pptr.dev/

npm install -g --allow-root --unsafe-perm=true puppeteer@10.0.0

要更新也很簡單

npm i puppeteer

就幫你把套件相依都跑完

真的覺得node.js很厲害,可以用javascript搞定前後端

 

3. 需要 gcc-c++ make

預設已經安裝,可以yum檢查一下

 

4. 安裝相依套件

yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 -y

 

5.測試puppeteer

裝完可以測試目前puppeteer用的是哪個核心的chromium

cd /usr/lib/node_modules/puppeteer/.local-chromium/linux-579032/chrome-linux/
./chrome --version

 

6. 把npm加到profile

echo "export NODE_PATH=$(npm root --quiet -g)" >> /etc/profile.d/lib.sh

 

7. 安裝繁體中文字型

yum install wqy-zenhei-fonts -y

在debian/ubuntu 叫做 fonts-wqy-zenhei

 

END

你可能感興趣的文章

import csv into jira to create mass issues import csv into jira to create mass issues

packages before adding as module into Intellij IDEA project, need to handle git repostory first. if you wish doing VCS for your code packages, do git setup first, before adding them into Intellij IDEA

how to rename git branch rename git branch

JIRA instance migration phase3: upgrading jira trying to upgrade jira from 7.6.1 to 8.x

JIRA instance migration phase2: install node.js and chinese fonts install node.js to export PDF though BigPicture plugin

how to adjust text line spacing on macos terminal it's a annoying detail while generating qrcode on terminal

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

how to stop mac os startup sound permanently how to stop mac os startup sound permanently

a function that takes an array of integers and a target then added any two equals the target Write a function that takes an array of numbers (integers fo