Skip to content

Instantly share code, notes, and snippets.

@vupdh-0867
Last active August 17, 2020 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vupdh-0867/555a8b8da86be3acc25bf40f4fc6748d to your computer and use it in GitHub Desktop.
Save vupdh-0867/555a8b8da86be3acc25bf40f4fc6748d to your computer and use it in GitHub Desktop.
Script to install some ubuntu packages

Install PHP and Mysql

1. Install Java

sudo apt-get install default-jre
sudo apt-get install default-jdk

2. Install Jenkins

# sudo apt install -y curl
sudo wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt update
sudo apt install jenkins
sudo service jenkins start

Install PHP and Mysql

1. Install package PHP

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2 php7.2-cli php7.2-common
sudo apt-get install php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-intl php7.2-mysql php7.2-xml php7.2-zip
php -v

2. Install package MySQL

sudo apt-get install mysql-server
sudo service mysql start

Install SSH and Nginx

1. Install package SSH

sudo apt-get install ssh
sudo service ssh start

2. Install package Nginx

sudo apt-get install -y nginx
sudo service nginx start

Install Sudo and Add user deploy

1. Install package Sudo

apt-get update
apt-get install sudo

2. Create user "deploy" and add to group "sudo"

sudo adduser deploy
usermod -aG sudo deploy
su deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment