Browse Source

Update install.sh

master
yuriy0803 2 years ago committed by GitHub
parent
commit
b5ae8f3165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      install.sh

29
install.sh

@ -16,12 +16,35 @@ sudo apt-get install -y nodejs
wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
# Create a symbolic link for the Go binary
sudo ln -s /usr/local/go/bin/go /usr/local/bin/go
# Check the installed Go version
go version
# Configure Nginx
sudo sh -c 'cat > /etc/nginx/sites-available/default <<EOF
upstream api {
server 127.0.0.1:8080;
}
echo "Installation completed!"
server {
listen 0.0.0.0:80;
root /var/www/etc2pool;
index index.html index.htm;
server_name localhost;
location /api {
proxy_pass http://127.0.0.1:8080;
}
location / {
try_files $uri $uri/ /index.html;
}
}
EOF'
# Reload Nginx configuration
sudo systemctl reload nginx
echo "Installation completed!"

Loading…
Cancel
Save