Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://github.com/zeropingheroes/lancache
- FIRST. Edit the VM and make two share mounts.
- sudo nano /etc/fstab
- nginx /etc/nginx/ 9p trans=virtio,version=9p2000.L,_netdev,rw 0 0
- nginx-cache /var/lancache/cache/ 9p trans=virtio,version=9p2000.L,_netdev,rw 0 0
- Save and reboot. Use "df" to see if it worked, you should see the shares listed
- Enter an interative superuser shell:
- sudo -i
- Create the Nginx config directory:
- mkdir /etc/nginx && cd /etc/nginx
- Clone the zeropingheroes/lancache repository into it:
- git clone https://github.com/zeropingheroes/lancache.git
- cd lancache
- find . -maxdepth 1 -exec mv {} .. \; to move everything up one folder
- cd .. to move up one folder
- sudo rm -rf lancache to remove the now empty lancache folder
- Make all the scripts in the install directory executable:
- chmod -R +x /etc/nginx/install/
- Compile Nginx from source:
- sudo /etc/nginx/install/compile-nginx.sh
- Prepare directories:
- sudo /etc/nginx/install/prepare-directories.sh
- For whatever reason this script doesn't create a nginx.service file so make one,
- sudo nano /lib/systemd/system/nginx.service
- place this in the file:
- [Unit]
- Description=The NGINX HTTP and reverse proxy server
- After=syslog.target network.target remote-fs.target nss-lookup.target
- [Service]
- Type=forking
- PIDFile=/run/nginx.pid
- ExecStartPre=/usr/local/bin/nginx -t
- ExecStart=/usr/local/bin/nginx
- ExecReload=/bin/kill -s HUP $MAINPID
- ExecStop=/bin/kill -s QUIT $MAINPID
- PrivateTmp=true
- [Install]
- WantedBy=multi-user.target
- Install Nginx as a service to start at boot:
- /etc/nginx/install/install-nginx-service.sh
- Start Nginx:
- systemctl start nginx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement