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/bash | |
# Bu kodları çalıştırmak için bu dosyayı name.sh olarak kayıt edip bulunduğu dizine gidin ve | |
# terminalden şu kodu çalıştırın | |
# sh name.sh /directory/subdirectory | |
# dosya isminden sonraki /directory/subdirectory yedeği oluşturulacak dizini belirtir | |
# Terminali temizle | |
clear |
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/bash | |
# Yorum satırı | |
# İlk satırdaki komut ise yorum değildir. | |
# Bu satırın anlamı bu scripti bash shell de çalıştır. | |
# Terminali temizle komutu | |
clear |
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/bash | |
## Fancy echo | |
fancy_echo() { | |
printf "\n%b\n" "$1" | |
} | |
## Debian-Ubuntu package update | |
fancy_echo "Updating system packages ..." | |
sudo apt-get update |
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/bash | |
## Exit trap | |
trap 'ret=$?; test $ret -ne 0 && printf "failed\n\n" >&2; exit $ret' EXIT | |
set -e | |
## Fancy echo | |
fancy_echo() { | |
printf "\n%b\n" "$1" |
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/bash | |
## Fancy echo | |
fancy_echo() { | |
printf "\n%b\n" "$1" | |
} | |
## Install php5 | |
fancy_echo "Installing php5" |
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
# Deploy group | |
deploy_group=deploy | |
# Deploy user | |
deploy_user=deploy | |
# Github usernames for access with ssh to deploy user | |
usernames=(tayfunoziserikan ismailakbudak) | |
# Check user is exist | |
id -u $deploy_user &> /dev/null | |
if [ $? -ne 0 ] |
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
## Run this command with deploy user | |
# define user home path | |
user_path=/home/deploy | |
## Fancy echo | |
fancy_echo() { | |
printf "\n%b\n" "$1" | |
} | |
fancy_echo "Installing rbenv..." | |
git clone git://github.com/sstephenson/rbenv.git $user_path/.rbenv |
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
## Run this script with root user | |
# After installation check this | |
# vi /etc/ssh/sshd_config # Change ssh post | |
# vi /etc/environment # Write below locales | |
# LANGUAGE="en_US.utf8" | |
# LC_ALL="en_US.utf8" | |
# dpkg-reconfigure locales # Configure locales | |
## Fancy echo | |
fancy_echo() { |
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
# Deploy user | |
deploy_user=deploy | |
# Github usernames for access with ssh to deploy user. They should be separater with one space. | |
usernames=(ismailakbudak) | |
# Check user is exist, maybe some errors occurred | |
id -u $deploy_user &> /dev/null | |
if [ $? -ne 0 ] | |
then |
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
# Change ssh port | |
sudo vi /etc/ssh/sshd_config | |
port 22 | |
sudo service ssh restart | |
# Language problem solution | |
sudo vi /etc/environment | |
LC_ALL="en_US.utf8" | |
LANGUAGE="en_US.utf8" | |
sudo dpkg-reconfigure locales |
OlderNewer