ShareLaTeX is an online Latex editor, which allows collaboration with other users in real time, along with its compilation of PDF projects. This editor is accessible through the Web being a server-based application.
Here, I will write the steps to follow to install ShareLaTeX on our servers, in this case, I have used Ubuntu 16.04.
Step 1. Install these packages: docker, and curl
apt-get install -y docker docker-compose curl
Step 2. Install docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.8.1/docker-compose-$(uname -s)-$(uname -m)" > /usr/local/bin/docker-compose
Step 3. Give the appropriate permissions to the docker-compose folder
chmod +x /usr/local/bin/docker-compose
Step 4. Create the ShareLaTex folder, enter that folder and download the compose file for ShareLaTeX
mkdir sharelatex && cd ./sharelatex
wget https://raw.githubusercontent.com/sharelatex/sharelatex/master/docker-compose.yml
Step 5. Change default parameters by our parameters, such as the port and email configuration
sed -i -e "s/ - 80:80/ - 6000:80/g" ./docker-compose.yml
sed -i -e "s\ # SHARELATEX_SITE_URL: http://sharelatex.mydomain.com\ SHARELATEX_SITE_URL: http://site.com:6000\g" ./docker-compose.yml
sed -i -e "s/ # SHARELATEX_NAV_TITLE: Our ShareLaTeX Instance/ SHARELATEX_NAV_TITLE: Our Title/g" ./docker-compose.yml
sed -i -e "s/ # SHARELATEX_ADMIN_EMAIL: support@it.com/ SHARELATEX_ADMIN_EMAIL: admin@site.com/g" ./docker-compose.yml
sed -i -e "s\ # SHARELATEX_HEADER_IMAGE_URL: http://somewhere.com/mylogo.png\ SHARELATEX_HEADER_IMAGE_URL: http://site.com/logo.png\g" ./docker-compose.yml
sed -i -e "s/ # SHARELATEX_EMAIL_FROM_ADDRESS: \"team@sharelatex.com\"/ SHARELATEX_EMAIL_FROM_ADDRESS: \'adminMail@site.com\'/g" ./docker-compose.yml
sed -i -e "s/ # SHARELATEX_EMAIL_SMTP_HOST: smtp.mydomain.com/ SHARELATEX_EMAIL_SMTP_HOST: smtp.site.com/g" ./docker-compose.yml
sed -i -e "s/ # SHARELATEX_EMAIL_SMTP_PORT: 587/ SHARELATEX_EMAIL_SMTP_PORT: 465/g" ./docker-compose.yml
sed -i -e "s/ # SHARELATEX_EMAIL_SMTP_SECURE: false/ SHARELATEX_EMAIL_SMTP_SECURE: 'true'/g" ./docker-compose.yml
sed -i -e "s/ # SHARELATEX_EMAIL_SMTP_USER: / SHARELATEX_EMAIL_SMTP_USER: 'adminMail@site.com'/g" ./docker-compose.yml
sed -i -e "s/ # SHARELATEX_EMAIL_SMTP_PASS: / SHARELATEX_EMAIL_SMTP_PASS: 'password123'/g" ./docker-compose.yml
sed -i -e "s/ # SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH: true/ SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH: 'true'/g" ./docker-compose.yml
sed -i -e "s/ # SHARELATEX_EMAIL_SMTP_IGNORE_TLS: false/ SHARELATEX_EMAIL_SMTP_IGNORE_TLS: 'false'/g" ./docker-compose.yml
Step 6. Download dependencies and run the server in the background next time.
docker-compose up -d
Step 7. Install the LaTeX packages
docker exec sharelatex tlmgr update --self
docker exec sharelatex tlmgr install scheme-full
Step 8. Create Administrator
http://site.com:6000/launchpad
Extra:
To stop or start ShareLaTeX services:
docker-compose stop sharelatex
docker-compose start sharelatex
In case of making other configurations in ShareLaTeX, you can enter the docker image with
docker exec -it sharelatex bash
Edit the /etc/sharelatex/settings.coffee by adding the correct settings
Some useful commands for docker:
To clear containers:
docker rm -f $(docker ps -a -q)
To clear images:
docker rmi -f $(docker images -a -q)
To clear volumes:
docker volume rm $(docker volume ls -q)
To clear networks:
docker network rm $(docker network ls | tail -n+2 | awk '{if($2 !~ /bridge|none|host/){ print $1 }}')
Comentarios
Publicar un comentario