Last active
June 27, 2018 18:54
-
-
Save ikbelkirasan/48b124272dc0a827d29336ac877f14ff to your computer and use it in GitHub Desktop.
Install ubuntu 16.04 server dependencies
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
# update apt cache | |
sudo apt update | |
# install composer | |
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer | |
# install nvm | |
wget -qO- https://cdn.rawgit.com/creationix/nvm/master/install.sh | bash | |
# run a new terminal to reflect changes | |
# install mysql | |
sudo apt install mysql-server | |
# install php | |
sudo apt install php | |
# install php extensions (for laravel) | |
sudo apt install php-cli php-curl php-mbstring php-gd php-mcrypt php-xml php-mysql php-zip | |
# install sqlite driver | |
sudo apt install php7.0-sqlite | |
# install docker | |
sudo apt update | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt update | |
sudo apt install docker-ce | |
sudo usermod -aG docker $USER | |
# restart the terminal session | |
# install docker-compose | |
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
# done, test it | |
docker-compose --version | |
# if it doesn't work, install it in /usr/bin/docker-compose | |
# change default node version (nvm) | |
# VERSION=whatever version | |
nvm alias default $VERSION | |
# delete a node version | |
nvm uninstall $VERSION | |
# reload terminal session | |
# remove nvm completely | |
rm -rf ~/.nvm | |
rm -rf ~/.npm | |
rm -rf ~/.bower | |
# restart terminal | |
# unzip | |
sudo apt-get install unzip | |
unzip file.zip -d destination_folder | |
# add user in Dockerfile | |
ARG PUID=1000 | |
ARG PGID=1000 | |
ENV PUID ${PUID} | |
ENV PGID ${PGID} | |
RUN groupadd -g ${PGID} appuser && \ | |
useradd -u ${PUID} -g appuser -m appuser | |
USER appuser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment