By Anup Dhakal
#Ubuntu for Development and SRE Work
###Upstart Fix Ubuntu has recently made the switch to SystemD. Not a bad thing, but many scripts (like the SSH one coming up next) still use Upstart. Lukcily we have a quick fix to tide us ove in the interim.
sudo apt-get install -y upstart-sysv
###Remove CDROM from Soures
sudo sed -i '/cdrom/d' /etc/apt/sources.list
This file contains hidden or 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
| # Youtube: https://www.youtube.com/watch?v=4AVIAz0vbaA&t=4s | |
| #!/bin/sh | |
| # Tomcat installation on Ubuntu: | |
| # ============================== | |
| # Install OpenJDK | |
| sudo apt install default-jdk |
This file contains hidden or 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/bash -x | |
| COMPOSE_VERSION="1.23.2" | |
| COMPOSE_URL="https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" | |
| # Opendax bootstrap script | |
| install_core() { | |
| sudo bash <<EOS | |
| apt-get update | |
| apt-get remove -y --purge unscd |
This file contains hidden or 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-get update | |
| sudo apt-get install nginx mariadb-server php7.2 php7.2-cli php7.2-fpm php7.2-common php7.2-mysql php7.2-curl php7.2-json php7.2-zip php7.2-gd php7.2-xml php7.2-mbstring php7.2-opcache php7.2-pgsql curl git unzip -y | |
| sudo systemctl start nginx | |
| sudo systemctl enable nginx | |
| sudo systemctl start mariadb | |
| sudo systemctl enable mariadb |
http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/
Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
This file contains hidden or 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 | |
| cd $HOME | |
| curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| sudo apt-get install gcc g++ make | |
| curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
| echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
| sudo apt-get update && sudo apt-get install yarn |
This file contains hidden or 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
| # Youtube: https://www.youtube.com/watch?v=bTJcuGcNWMA | |
| # !/bin/sh | |
| # To install HospitalRun on localhost run the following commands: | |
| # Clone repository: | |
| git clone https://github.com/HospitalRun/hospitalrun.github.io.git | |
| # Thereafter, enter into the downloaded folder |
This file contains hidden or 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 | |
| curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add - | |
| echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list | |
| sudo apt install apt-transport-https | |
| sudo apt update | |
| sudo apt install plexmediaserver | |
| sudo systemctl status plexmediaserver | |
| sudo chown -R plex: /opt/plexmedia |
This file contains hidden or 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 | |
| apt-get update -y | |
| apt-get upgrade -y | |
| #Install Apache | |
| sudo apt-get install apache2 | |
| #Install PHP | |
| sudo apt-get install php libapache2-mod-php php-gd php-common php-mail php-mail-mime php-mysql php-pear php-db php-mbstring php-xml php-curl |