Pancakeswap front-end source compilation and deployment Linux

toString 2021-10-14 02:27:30
pancakeswap front-end end source compilation

Related information

One 、 Source compilation environment deployment

1.1 yarn Deploy

  • Install source configuration
wget -O /etc/yum.repos.d/yarn.repo
  • install yarn
yum install yarn -y
  • View version
yarn --version

1.2 nodejs Deploy

  • download nodejs Binary package
  • Decompress the package
tar xvf node-v12.20.0-linux-x64.tar.xz
  • Change package name
mv node-v12.20.0-linux-x64 /usr/local/nodejs
  • Add environment variables
# vim /etc/profile#nodejsexport NODE_HOME=/usr/local/nodejsexport PATH=$NODE_HOME/bin:$PATH
  • Effective environment variables
source /etc/profile
  • verification nodejs Whether the deployment is successful
# node -vv12.20.0# npm -v6.14.8

1.3 install git

  • install git
yum -y install git
  • View version
# git versiongit version

Two 、pancakeswap Front end source code compilation

2.1 download pancakeswap Front end source code

  • download pancakeswap Front end source code compressed package
  • decompression pancakeswap Front end source code compressed package

2.2 compile pancakeswap Front end source code

  • Get into pancakeswap Front end source folder
# cd pancake-frontend-master/# crowdin.yml cypress cypress.json doc LICENSE netlify.toml package.json public scripts src static.json tsconfig.json yarn.lock
  • initialization git
git init
  • Install all dependent packages
  • There are many projects node_modules Dependency package
# crowdin.yml cypress cypress.json doc LICENSE netlify.toml node_modules package.json public scripts src static.json tsconfig.json yarn.lock
  • Project package
npm run build
  • The compiled static page is in build in
# lsbuild crowdin.yml cypress cypress.json doc LICENSE netlify.toml node_modules package.json public scripts src static.json tsconfig.json yarn.lock

3、 ... and 、 Compile the error report and solve it

3.1 git Not installed

  • Wrong content :
Couldn't find the binary git
  • Error reason : No installation git
  • resolvent :
yum -y install git

3.2 nodejs Version low

  • Wrong content :
error extract-files@9.0.0: The engine "node" is incompatible with this module. Expected version "^10.17.0 || ^12.0.0 || >= 13.7.0". Got "10.12.0"error Found incompatible module.
  • Error reason :nodejs Version low
  • resolvent : take node Upgrade to the following version , The personal version used this time is :v12.20.0
^10.17.0 || ^12.0.0 || >= 13.7.0

3.3 git Not initialized

  • Wrong content :
fatal: Not a git repository (or any parent up to mount point /opt)
  • Error reason :git Not initialized after installation
  • resolvent : initialization git
git init

3.4 git Can't be found

  • Wrong content :
.git can't be found (see Command failed with exit code 1.
  • git Can't be found
  • resolvent : Initialize in the source folder path git
# git initInitialized empty Git repository in /opt/tools/pancake-frontend-master/.git/

Four 、 Deploy pancakeswap The front page

4.1 download nginx Mirror image

docker pull nginx:1.17.9

4.2 newly build nginx Mount Directory

mkdir -p /opt/docker/nginx/{conf,html,logs,cert}

4.3 To write nginx Container startup script

# pwd/opt/docker/nginx# vim #!/bin/bashdocker run -itd --restart=unless-stopped \ -v /etc/localtime:/etc/localtime \ -v /etc/timezone:/etc/timezone \ --network=host \ --name nginx \ -v /opt/docker/nginx/html:/usr/share/nginx/html \ -v /opt/docker/nginx/logs:/var/log/nginx \ -v /opt/docker/nginx/cert:/etc/nginx/cert \ -v /opt/docker/nginx/nginx.conf:/etc/nginx/nginx.conf \ -v /opt/docker/nginx/conf:/etc/nginx/conf.d \ nginx:1.17.9docker logs -f nginx

4.4 To write nginx Master profile

# pwd/opt/docker/nginx# vim nginx.confworker_processes 4;user nginx;#pid /opt/app/nginx/sbin/;events { worker_connections 409600;}http { include mime.types; default_type application/octet-stream; server_tokens off; autoindex on; autoindex_exact_size off; autoindex_localtime on; keepalive_timeout 65; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log error; include /etc/nginx/conf.d/*.conf;}

4.5 Will compile pancakeswap The front-end static page is placed in nginx Under project directory

# mkdir /opt/docker/nginx/html/pancakeswap -p# cd /opt/docker/nginx/html/pancakeswap# cp /opt/tools/pancake-frontend-master/build/* ./ -rf# lsasset-manifest.json favicon.ico googlefddf3c367e79f9e2.html images index.html locales logo.png manifest.json _redirects robots.txt static swap.mp3

4.6 Write domain name conf file

# pwd/opt/docker/nginx/conf# vim { listen 80; server_name; rewrite ^ https://$http_host$request_uri? permanent; server_tokens off; }server { listen 443 ssl; server_name; ssl_certificate /etc/nginx/cert/; ssl_certificate_key /etc/nginx/cert/; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; charset utf-8; location / { root /usr/share/nginx/html/pancakeswap; index index.php index.html index.htm; } access_log /var/log/nginx/; error_log /var/log/nginx/;}

4.7 Start the container , Access page


  1. 初学者怎么学Web前端?
  2. react
  3. PaddlePaddle:在 Serverless 架构上十几行代码实现 OCR 能力
  4. JavaScript数组 几个常用方法
  5. Angular 依赖注入 - 全面解析
  6. html_day02
  7. 那些年我们前端面试中经常被问到的题!
  8. The starting price of Ducati multistada V2 in North America is less than 100000 yuan
  9. Hls.js 使用文檔
  10. Hls.js travailler avec des documents
  11. Problèmes liés à la précision JS
  12. Copie une partie des propriétés d'un objet à un autre objet
  13. Multiplexage de modules en vuex
  14. Développement multilingue Android, questions d'entrevue pour le développement de logiciels Android
  15. Chen lushai and her best friend Wang Meng play video, fearless of the pressure of public opinion, and in a good mood to dance in a bare back
  16. # Sass速通(四):继承、混合与函数
  17. Vidéo de développement de combat Android, questions d'entrevue rxjava
  18. Bugatti Chiron maintenance cost exposure! One piece for one car, burn money endlessly
  19. android应用开发基础答案,深入理解Nginx
  20. 做了三年前端,你才知道10分钟就能实现一个PC版魔方游戏
  21. Html + CSS + JS implémentation ️ Responsive Lucky Turnover ️ [with full source Sharing]
  22. Ren Jialun, who married young, was in a mess. Now she feels that it is a blessing in disguise
  23. 达梦数据库使用disql生成html格式的巡检报告
  24. React render phase parsing II - beginwork process
  25. Tableau linéaire de la structure des données (dessin à la main)
  26. In 2022, what are the highlights and popular elements in skirts to make skirts more elegant and gentle?
  27. JQuery installation
  28. Exemple de développement Android, dernière compilation de questions d'entrevue Android
  29. Differences and relations between JDK, JRE and JVM, nginx architecture diagram
  30. 【Azure 云服务】Azure Cloud Service 为 Web Role(IIS Host)增加自定义字段 (把HTTP Request Header中的User-Agent字段增加到IIS输出日志中)
  31. 【Azure 云服务】Azure Cloud Service 为 Web Role(IIS Host)增加自定义字段 (把HTTP Request Header中的User-Agent字段增加到IIS输出日志中)
  32. Questions d'entrevue pour les ingénieurs en développement Android, Android Foundation 72 questions
  33. It's kind of Cadillac CT6 to have a Mercedes Benz S-class captain and a 10At entry-level configuration, falling to less than 300000
  34. H6 meets the strong enemy again! The car body has a Cayenne visual sense, breaking 8.8 seconds, and the top configuration is less than 130000
  35. How nginx supports HTTPS and Linux kernel video tutorial
  36. Le martyr se réjouit de sa vieillesse Audi R8 V10 performance Rwd
  37. import 方式隨意互轉,感受 babel 插件的威力
  38. Le mode d'importation peut se déplacer librement pour sentir la puissance du plug - in Babel
  39. Pas de héros en termes de ventes!Du point de vue de la force du produit, la nouvelle version ax7 Mach est plus forte que H6
  40. The vue3 + TS project introduces vant as needed
  41. 深入浅出虚拟 DOM 和 Diff 算法,及 Vue2 与 Vue3 中的区别
  42. 深入淺出虛擬 DOM 和 Diff 算法,及 Vue2 與 Vue3 中的區別
  43. Explorer les algorithmes DOM et diff virtuels et les différences entre vue2 et vue3
  44. 两万字Vue基础知识总结,小白零基础入门,跟着路线走,不迷路(建议收藏)
  45. Résumé des connaissances de base de 20 000 mots vue, Introduction à la petite base blanche zéro, suivre la route et ne pas se perdre (Collection recommandée)
  46. 兩萬字Vue基礎知識總結,小白零基礎入門,跟著路線走,不迷路(建議收藏)
  47. "Talk show conference 4" Zhou qimo a remporté le championnat. Tout le monde l'admire. Il est mature et stable et a une vue d'ensemble
  48. Test logiciel entrevue non technique questions classiques - mise à jour continue!
  49. Digital forward disassembly reverse disassembly
  50. Analyse du cache distribué redis et essence de l'entrevue en usine v6.2.6
  51. [Hadoop 3. X series] use of HDFS rest HTTP API (II) httpfs
  52. Zhang Daxian sang in the morning to bless the motherland, xYG team: singing is much better than us
  53. My three years' experience -- avoiding endless internal friction
  54. Introduction à l'algorithme "dénombrement binaire" modéré 01 - - question d'entrevue leetcode 10.09. Recherche de matrice de tri
  55. Introduction à l'algorithme simple 06 - - leetcode 34. Trouver la première et la dernière position d'un élément dans un tableau de tri
  56. CSS animation
  57. Explain the new tags in HTML5 and the pseudo classes and pseudo elements in CSS3
  58. They are all talking about "serverless first", but do you really understand serverless?
  59. [apprentissage de l'algorithme] 1486. Fonctionnement exclusif du tableau (Java / C / C + + / python / go / Rust)
  60. Front and back end data interaction (VI) -- advantages, disadvantages and comparison of Ajax, fetch and Axios