Last active
May 12, 2021 19:29
-
-
Save sidward35/681e37af76d9fa5b1671cf93990a4e48 to your computer and use it in GitHub Desktop.
Script to set up Golinks, Pi-hole, and Nextcloud on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install git wget unzip screen neofetch | |
sudo apt autoremove | |
echo neofetch >> .bashrc | |
wget https://golang.org/dl/go1.16.3.linux-amd64.tar.gz | |
sudo rm -rf /usr/local/go | |
sudo tar -C /usr/local -xzf go1.16.3.linux-amd64.tar.gz | |
rm go1.16.3.linux-amd64.tar.gz | |
export PATH=$PATH:/usr/local/go/bin | |
go version | |
git clone https://github.com/prologic/golinks.git | |
cd golinks | |
go build | |
cd .. | |
screen -Sdm newSession golinks/golinks | |
curl -sSL https://install.pi-hole.net | bash | |
sudo apt -y install mariadb-server mariadb-client | |
sudo mysql_secure_installation | |
sudo mysql -u root -p | |
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'password'; | |
CREATE DATABASE nextcloud; | |
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost'; | |
FLUSH PRIVILEGES; | |
QUIT | |
sudo apt -y install php php-{cli,xml,zip,curl,gd,cgi,mysql,mbstring} | |
sudo apt -y install apache2 libapache2-mod-php | |
sudo nano /etc/apache2/ports.conf | |
sudo systemctl restart apache2 | |
wget https://download.nextcloud.com/server/releases/latest-19.zip | |
unzip latest-19.zip | |
rm latest-19.zip | |
sudo mv nextcloud /var/www/html/ | |
sudo chown -R www-data:www-data /var/www/html/nextcloud | |
sudo sudo chmod -R 755 /var/www/html/nextcloud |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment