当前位置:网站首页>latex论文神器--服务器部署overleaf
latex论文神器--服务器部署overleaf
2022-08-01 19:41:00 【TOMD】
Overleaf是一个使用LaTeX进行多人协同编辑的平台,可以免费注册和使用,不用下载LaTeX软件,是最为著名的LaTeX在线协作系统。
而在有些情况下,考虑到数据安全以及操作方便性,可以购买服务器自行搭建Overleaf平台。
没有服务器的同学可以点此链接购买便宜的腾讯云服务器。
1.基本环境配置
安装Docker:
sudo curl -sSL https://get.daocloud.io/docker | sh查看版本,检查是否安装成功:
docker --version
docker-compose --version启动Docker:
systemctl start docker2.运行容器
2.1安装overleaf
首先将overleaf项目从github拉至本地
git clone https://github.com/overleaf/toolkit.git ./overleaf然后进行初始化配置
cd ./overleaf
bin/init这里我们进入config下的overleaf.rc文件进行配置:
vim ./config/overleaf.rc更改如下两行:
SHARELATEX_LISTEN_IP=如果本地使用按照原配置即可,腾讯云服务器需要改为**内网地址**
SHARELATEX_PORT=想映射的端口,默认的80端口常常被占用(注意,映射的端口需要在腾讯云防火墙和centos内部的防火墙中均被开放)
其中还有许多个性化的配置:如网页抬头文字内容,网址标题,UI语言(中文)等,可以在overleaf的Wiki页面中进行查看和配置。
执行容器:bin/up。
此时正在拉取镜像,可以等出现大量的log时使用 ctrl+c 停止,然后执行bin/start即可。
此时用浏览器打开http://公网IP:映射的端口/launchpad应该能看到管理员注册界面,至此overleaf的安装结束。
2.2下载完整texlive包
以上安装的overleaf配套的LaTeX不是完整版,所以需要继续下载。
首先进入容器的bash:
docker exec -it sharelatex bash
cd /usr/local/texlive然后执行以下命令:
# 下载并运行升级脚本
wget http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh
sh update-tlmgr-latest.sh -- --upgrade
# 更换texlive的下载源
tlmgr option repository https://mirrors.sustech.edu.cn/CTAN/systems/texlive/tlnet/
# 升级tlmgr
tlmgr update --self --all
# 安装完整版texlive(时间比较长,不要让shell断开)
tlmgr install scheme-full
# 退出sharelatex的命令行界面,并重启sharelatex容器
exit
docker restart sharelatex至此,安装完成。
2.3 配置反向代理【可选】
如果想要使用域名ssl访问,或者改变访问端口,可能需要反向代理。
宝塔可能要修改反向配置文件为下面内容,如果直接默认的话,每次加载项目文档会卡卡的,甚至提示XXX加载错误
#PROXY-START/
location ~* \.(php|jsp|cgi|asp|aspx)$
{
proxy_pass http://127.0.0.1:5200;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
}
location /
{
proxy_pass http://127.0.0.1:5200;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'Upgrade';
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 3m;
proxy_send_timeout 3m;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
proxy_ignore_headers Set-Cookie Cache-Control expires;
add_header Cache-Control no-cache;
expires 12h;
}
#PROXY-END/以上内容部分参考:
边栏推荐
- What are the application advantages of SaaS management system?How to efficiently improve the digital and intelligent development level of food manufacturing industry?
- Win11如何删除升级包?Win11删除升级包的方法
- LabVIEW 使用VISA Close真的关闭COM口了吗
- In the background of the GBase 8c database, what command is used to perform the master-slave switchover operation for the gtm and dn nodes?
- GEE(8):使用MODIS填补由去云后的Landsat影像计算得到的NDVI数据
- Compse编排微服务实战
- 为你的“架构”安排定期体检吧!
- 数据库系统原理与应用教程(071)—— MySQL 练习题:操作题 110-120(十五):综合练习
- 【七夕特别篇】七夕已至,让爱闪耀
- 【kali-信息收集】(1.6)服务的指纹识别:Nmap、Amap
猜你喜欢

工作5年,测试用例都设计不好?来看看大神的用例设计总结

Source code analysis of GZIPOutputStream class

Website construction process

为什么限制了Oracle的SGA和PGA,OS仍然会用到SWAP?

安全作业7.25

How PROE/Croe edits a completed sketch and brings it back to sketching state

30-day question brushing plan (5)

Mobile Zero of Likou Brush Questions

XSS range intermediate bypass

Ha ha!A print function, quite good at playing!
随机推荐
Heavy cover special | intercept 99% malicious traffic, reveal WAF offensive and defensive drills best practices
An implementation of an ordered doubly linked list.
[Server data recovery] Data recovery case of offline multiple disks in mdisk group of server Raid5 array
第58章 结构、纪录与类
力扣刷题之合并两个有序数组
nacos installation and configuration
明日盛会|ApacheCon Asia 2022 Pulsar 技术议题一览
18. Distributed configuration center nacos
What should I do if the Win11 campus network cannot be connected?Win11 can't connect to campus network solution
终于有人把AB实验讲明白了
数据库系统原理与应用教程(071)—— MySQL 练习题:操作题 110-120(十五):综合练习
CMake教程——Leeds_Garden
57: Chapter 5: Develop admin management services: 10: Develop [get files from MongoDB's GridFS, interface]; (from GridFS, get the SOP of files) (Do not use MongoDB's service, you can exclude its autom
SQL的 ISNULL 函数
ssh & scp
How to install voice pack in Win11?Win11 Voice Pack Installation Tutorial
DAO开发教程【WEB3.0】
安装GBase 8c数据库的时候,报错显示“Resource:gbase8c already in use”,这怎么处理呢?
C#/VB.NET Extract table from PDF
Creo5.0草绘如何绘制正六边形