Compare commits
No commits in common. "3dd0b60730ef9c16a78da6121a4140c9d6ad7afc" and "1f4bbc6a10a7ea5e58d40238ce2dd66b38c1d1b1" have entirely different histories.
3dd0b60730
...
1f4bbc6a10
|
@ -7,5 +7,5 @@ Development environment base packages:
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
|
* add verbose options to commands
|
||||||
* install-wordpress.sh - move virtual host to files/
|
* install-wordpress.sh - move virtual host to files/
|
||||||
* quieter make?
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ done
|
||||||
echo "Updating .."
|
echo "Updating .."
|
||||||
ssh -T $ssh << EOSSH
|
ssh -T $ssh << EOSSH
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt-get -qq -y update && apt-get -qq -y upgrade
|
apt-get update && apt-get upgrade
|
||||||
EOSSH
|
EOSSH
|
||||||
echo "Update complete"
|
echo "Update complete"
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,7 @@ fi
|
||||||
ssh -T $ssh << EOSSH
|
ssh -T $ssh << EOSSH
|
||||||
echo "Installing Apache2"
|
echo "Installing Apache2"
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo "Installing packages .."
|
apt-get install -y apache2
|
||||||
apt-get install -qq -y apache2
|
|
||||||
echo "Packages installed"
|
|
||||||
ufw allow in "WWW Full"
|
ufw allow in "WWW Full"
|
||||||
|
|
||||||
sed -i '/export APACHE_RUN_USER=/c\export APACHE_RUN_USER='"$user" /etc/apache2/envvars
|
sed -i '/export APACHE_RUN_USER=/c\export APACHE_RUN_USER='"$user" /etc/apache2/envvars
|
||||||
|
|
|
@ -8,9 +8,7 @@ sed -i '/PermitRootLogin/c\PermitRootLogin prohibit-password' /etc/ssh/sshd_conf
|
||||||
systemctl restart sshd
|
systemctl restart sshd
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo "Installing packages .."
|
apt-get install -y ufw || (echo "ERROR while installing ufw" ; exit 15)
|
||||||
apt-get install -qq -y ufw || (echo "ERROR while installing ufw" ; exit 15)
|
|
||||||
echo "Packages installed"
|
|
||||||
|
|
||||||
ufw allow ssh || (echo "Error while configuring ufw to allow ssh" ; exit 20 )
|
ufw allow ssh || (echo "Error while configuring ufw to allow ssh" ; exit 20 )
|
||||||
yes | ufw enable
|
yes | ufw enable
|
||||||
|
|
|
@ -6,9 +6,7 @@ ssh -T $ssh << EOSSH
|
||||||
|
|
||||||
echo "Installing packages .."
|
echo "Installing packages .."
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo "Installing packages .."
|
apt-get -y install curl gnupg2 ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip python-pip python3-pip fzf vim ctags
|
||||||
apt-get -qq -y install curl gnupg2 ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip python-pip python3-pip fzf vim ctags
|
|
||||||
echo "Packages installed"
|
|
||||||
|
|
||||||
echo "Installing lazygit .."
|
echo "Installing lazygit .."
|
||||||
curl -fsSL https://github.com/jesseduffield/lazygit/releases/download/v0.22.1/lazygit_0.22.1_Linux_x86_64.tar.gz --output /tmp/lazygit.tar.gz
|
curl -fsSL https://github.com/jesseduffield/lazygit/releases/download/v0.22.1/lazygit_0.22.1_Linux_x86_64.tar.gz --output /tmp/lazygit.tar.gz
|
||||||
|
@ -34,8 +32,7 @@ if command -v php ; then
|
||||||
php -r "unlink('composer-setup.php');"
|
php -r "unlink('composer-setup.php');"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EOSSH
|
exit
|
||||||
ssh -T $ssh << EOSSH
|
|
||||||
|
|
||||||
su "$user"
|
su "$user"
|
||||||
|
|
||||||
|
@ -44,16 +41,12 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
|
||||||
echo 'export NVM_DIR="\$HOME/.nvm"' >> "$_home_dir/.profile"
|
echo 'export NVM_DIR="\$HOME/.nvm"' >> "$_home_dir/.profile"
|
||||||
echo '[ -s "\$NVM_DIR/nvm.sh" ] && \. "\$NVM_DIR/nvm.sh"' >> "$_home_dir/.profile"
|
echo '[ -s "\$NVM_DIR/nvm.sh" ] && \. "\$NVM_DIR/nvm.sh"' >> "$_home_dir/.profile"
|
||||||
|
|
||||||
EOSSH
|
exit
|
||||||
ssh -T $ssh << EOSSH
|
|
||||||
|
|
||||||
su --login "$user"
|
su --login "$user"
|
||||||
. ./.profile
|
. ./.profile
|
||||||
nvm install --lts --latest-npm
|
nvm install --lts --latest-npm
|
||||||
|
|
||||||
EOSSH
|
exit
|
||||||
ssh -T $ssh << EOSSH
|
|
||||||
|
|
||||||
su --login "$user"
|
su --login "$user"
|
||||||
. ./.profile
|
. ./.profile
|
||||||
echo "Configuring neovim ..."
|
echo "Configuring neovim ..."
|
||||||
|
@ -66,6 +59,8 @@ curl -fLo $_home_dir/.config/nvim/autoload/plug.vim --create-dirs \
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
nvim --headless +PlugInstall +qall
|
nvim --headless +PlugInstall +qall
|
||||||
|
|
||||||
|
# TODO wakatime api key
|
||||||
|
|
||||||
echo "Configuring lf .."
|
echo "Configuring lf .."
|
||||||
lf config
|
lf config
|
||||||
if [ -e "$_home_dir/.config/lf" ] ; then
|
if [ -e "$_home_dir/.config/lf" ] ; then
|
||||||
|
|
|
@ -15,9 +15,7 @@ ssh -T $ssh << EOSSH
|
||||||
echo "Installing MariaDB"
|
echo "Installing MariaDB"
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo "Installing packages .."
|
apt-get install -y mariadb-server
|
||||||
apt-get install -qq -y mariadb-server
|
|
||||||
echo "Packages installed"
|
|
||||||
|
|
||||||
$_mysql_cmd "DELETE FROM mysql.user WHERE User='';"
|
$_mysql_cmd "DELETE FROM mysql.user WHERE User='';"
|
||||||
$_mysql_cmd "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
|
$_mysql_cmd "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
|
||||||
|
|
|
@ -15,9 +15,7 @@ ssh -T $ssh << EOSSH
|
||||||
echo "Installing MySQL"
|
echo "Installing MySQL"
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo "Installing packages .."
|
apt-get install -y mysql-server
|
||||||
apt-get install -qq -y mysql-server
|
|
||||||
echo "Packages installed"
|
|
||||||
|
|
||||||
$_mysql_cmd "DELETE FROM mysql.user WHERE User='';"
|
$_mysql_cmd "DELETE FROM mysql.user WHERE User='';"
|
||||||
$_mysql_cmd "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
|
$_mysql_cmd "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
|
||||||
|
|
|
@ -10,10 +10,8 @@ if [ -n "$wp_user" ] ; then
|
||||||
|
|
||||||
ssh -T $ssh << 'EOSSH'
|
ssh -T $ssh << 'EOSSH'
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo "Installing packages .."
|
apt-get install -y php libapache2-mod-php php-fpm php-bcmath php-curl php-gd php-imagick php-mbstring \
|
||||||
apt-get install -qq -y php libapache2-mod-php php-fpm php-bcmath php-curl php-gd php-imagick php-mbstring \
|
|
||||||
php-mysql php-soap php-xml php-zip
|
php-mysql php-soap php-xml php-zip
|
||||||
echo "Packages installed"
|
|
||||||
|
|
||||||
_php_config_file=$(php --ini | grep Loaded | awk '{ print $4 }')
|
_php_config_file=$(php --ini | grep Loaded | awk '{ print $4 }')
|
||||||
sed -i '/memory_limit/c\memory_limit = 256M' "$_php_config_file"
|
sed -i '/memory_limit/c\memory_limit = 256M' "$_php_config_file"
|
||||||
|
@ -27,8 +25,6 @@ else
|
||||||
|
|
||||||
ssh -T $ssh << EOSSH
|
ssh -T $ssh << EOSSH
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo "Installing packages .."
|
apt-get install -y php libapache2-mod-php php-mysql
|
||||||
apt-get install -qq -y php libapache2-mod-php php-mysql
|
|
||||||
echo "Packages installed"
|
|
||||||
EOSSH
|
EOSSH
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -32,9 +32,7 @@ ssh -T $ssh << EOSSH
|
||||||
|
|
||||||
echo "Installing required packages .."
|
echo "Installing required packages .."
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo "Installing packages .."
|
apt-get --assume-yes install sudo git tmux zsh curl
|
||||||
apt-get -qq -y install sudo git tmux zsh curl
|
|
||||||
echo "Packages installed"
|
|
||||||
|
|
||||||
echo "Cloning configuration files .."
|
echo "Cloning configuration files .."
|
||||||
su --login "$user"
|
su --login "$user"
|
||||||
|
|
Loading…
Reference in New Issue