Last active
September 17, 2021 06:35
-
-
Save sh6210/427715565c31f10261c7eb8913d8088e to your computer and use it in GitHub Desktop.
Ubuntu necessary commands for setting up a dev machine
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
sudo apt-get update && sudo apt-get upgrade -y | |
sudo snap install code --classic | |
sudo snap install skype --classic | |
sudo apt install git-all | |
sudo apt install npm | |
sudo apt install vim | |
sudo apt install apache2 | |
sudo ufw app list | |
sudo ufw enable | |
sudo ufw allow 'Apache' | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt install libapache2-mod-fcgid | |
sudo apt install software-properties-common | |
sudo apt install mysql-server | |
// to change the root password, 1. sudo mysql 2. ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'desired_password'; | |
sudo apt-get install sshpass | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && php composer-setup.php && php -r "unlink('composer-setup.php');" && sudo mv composer.phar /usr/local/bin/composer && composer self-update | |
// generate ssh key for github | |
ssh-keygen -t ed25519 -C "[email protected]" && ssh-add ~/.ssh/id_ed25519 | |
// to show the key run : cat ~/.ssh/id_ed25519.pub | copy and paste in github settings | |
sudo apt-get install php8.0 libapache2-mod-php8.0 php8.0-bcmath php8.0-cli php8.0-common php8.0-curl php8.0-dev php8.0-gd php8.0-intl php8.0-json php8.0-ldap php8.0-mbstring php8.0-mysql php8.0-opcache php8.0-pgsql php8.0-soap php8.0-sqlite3 php8.0-xml php8.0-zip | |
sudo apt-get install php7.4-bcmath php7.4-cli php7.4-common php7.4-curl php7.4-dev php7.4-gd php7.4-intl php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-soap php7.4-sqlite3 php7.4-xml php7.4-zip | |
sudo apt-get install php7.3 php7.3-fpm php7.3-mysql libapache2-mod-php7.3 -y php7.3-apcu php7.3-cli php7.3-common php7.3-curl php7.3-imagick php7.3-intl php7.3-json php7.3-mbstring php7.3-mcrypt php7.3-memcache php7.3-xdebug php7.3-xml php7.3-yaml php7.3-zip php7.3-bcmath php7.3-soap php7.3-gd | |
sudo apt-get install php7.2 php7.2-fpm php7.2-mysql libapache2-mod-php7.2 -y php7.2-apcu php7.2-cli php7.2-common php7.2-curl php7.2-imagick php7.2-intl php7.2-json php7.2-mbstring php7.2-mcrypt php7.2-memcache php7.2-xdebug php7.2-xml php7.2-yaml php7.2-zip php7.2-bcmath php7.2-soap php7.2-gd | |
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql libapache2-mod-php7.0 libapache2-mod-fcgid -y php7.0-apcu php7.0-cli php7.0-common php7.0-curl php7.0-imagick php7.0-intl php7.0-json php7.0-mbstring php7.0-mcrypt php7.0-memcache php7.0-xdebug php7.0-xml php7.0-yaml php7.0-zip php7.0-bcmath php7.0-soap php7.0-gd | |
sudo apt-get install zsh | |
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" | |
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1 && ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" | |
git clone https://github.com/reobin/typewritten.git $ZSH_CUSTOM/themes/typewritten && ln -s "$ZSH_CUSTOM/themes/typewritten/typewritten.zsh-theme" "$ZSH_CUSTOM/themes/typewritten.zsh-theme" && ln -s "$ZSH_CUSTOM/themes/typewritten/async.zsh" "$ZSH_CUSTOM/themes/async" | |
sudo apt-get install fonts-powerline | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
# insdie ~/.zshrc replace plugins value with (git z zsh-autosuggestions) | |
# inside ~/.zshrc place zsh_theme_random_candidates with ( "typewritten" "spaceship" ) | |
# also place the zsh_theme value to `random` | |
sudo apt-get install php{version_number}-xdebug | |
# edit /etc/php/7.4/mods-available/xdebug.ini and place the followings | |
zend_extension=xdebug.so | |
xdebug.remote_autostart = 1 | |
xdebug.remote_enable = 1 | |
xdebug.remote_handler = dbgp | |
xdebug.remote_host = 127.0.0.1 | |
xdebug.remote_log = /tmp/xdebug_remote.log | |
xdebug.remote_mode = req | |
xdebug.remote_port = 9000 | |
composer global require laravel/installer | |
# docker | |
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt-get install docker-ce docker-ce-cli containerd.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment