Перезалив репозитория

This commit is contained in:
2021-12-22 21:51:22 +08:00
commit 065551c442
845 changed files with 46155 additions and 0 deletions

51
install/000-apt.sh Executable file
View File

@@ -0,0 +1,51 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing software from apt..."
aptu
aptug
apti apt-transport-https \
ca-certificates \
curl \
make \
dialog \
build-essential \
software-properties-common \
libaio1 \
libssl-dev \
libghc-zlib-dev \
libcurl4-gnutls-dev \
libexpat1-dev \
gettext \
gnupg \
ubuntu-restricted-extras \
gnome-software \
unzip \
mc \
htop \
nano \
neofetch \
default-jdk \
terminator \
dconf-editor \
alien \
meld \
vlc \
gparted \
hardinfo \
libreoffice \
pulseeffects \
lsp-plugins \
lsb-release \
net-tools \
# minder \
# redshift \
# redshift-gtk \
# nodejs \
# compiz \
# compizconfig-settings-manager \
# earlyoom \
# etckeeper \
# deepin-screenshot \
# geoclue-2.0 \
at

37
install/001-snap.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing snap and its software..."
if !installed snapd; then
aptu
apti snapd
apti gnome-software-plugin-snap
# snapi core
# snapi snapd
else
snap refresh core
fi
snapi snap-store
snapi telegram-desktop
snapi code
snapi phpstorm
snapi skype
snapi audacity
snapi flameshot
snapi gtk-common-themes
snapi gtk2-common-themes
snapi kde-frameworks-5-core18
snapi zoom-client
snapi peek
# https://certbot.eff.org/
snapi certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
# snapi mysql-workbench-community
# snapi dbeaver-ce
# snapi discord
# snapi liquibase
# snapi postman
# snapi obs-studio

8
install/002-flatpak.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing flatpak and its software..."
apti flatpak \
gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

41
install/003-zsh.sh Executable file
View File

@@ -0,0 +1,41 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing zsh + oh-my-zsh"
apti zsh
# sudo chsh -s $(which zsh)
# Based on:
# https://github.com/Powerlevel9k/powerlevel9k/wiki/Install-Instructions
# https://github.com/ohmyzsh/ohmyzsh
# https://powerline.readthedocs.io/en/latest/installation/linux.html#fonts-installation
# https://gist.github.com/dogrocker/1efb8fd9427779c827058f873b94df95
# https://linuxhint.com/install_zsh_shell_ubuntu_1804/
echo ""
echo "1. Installing oh-my-zsh..."
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo ""
echo "2. Installing powerlevel9k theme (legacy)..."
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
sed -i 's@^ZSH_THEME=.*$@ZSH_THEME="powerlevel9k/powerlevel9k"@g' ~/.zshrc
echo ""
echo "3. Installing powerline fonts..."
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
mkdir -p ~/.local/share/fonts/
mv PowerlineSymbols.otf ~/.local/share/fonts/
fc-cache -vf ~/.local/share/fonts/
mkdir -p ~/.config/fontconfig/conf.d/
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
echo ""
echo "4. Installing autosuggestions and syntax highlighting..."
git clone https://github.com/zsh-users/zsh-autosuggestions.git .oh-my-zsh/custom/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git .oh-my-zsh/custom/plugins/zsh-syntax-highlighting
sed -i 's@plugins=(git)@plugins=(git zsh-autosuggestions zsh-syntax-highlighting)@g' ~/.zshrc
echo ""
echo "Finish! Log out of your session and login again."

24
install/010-git.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing git..."
if installed 'git'; then
[ ! -d "/usr/src/git" ] && sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
sudo chown -R anthony: /usr/src/git
cd /usr/src/git/
sudo git pull
sudo make prefix=/usr/local all
sudo make prefix=/usr/local install
else
sudo wget https://github.com/git/git/archive/master.zip -O /usr/src/git.zip
sudo unzip /usr/src/git.zip -d /usr/src/git
sudo rm -f /usr/src/git.zip
cd /usr/src/git/git-master
sudo make prefix=/usr/local all
sudo make prefix=/usr/local install
cd /usr/src
sudo rm -rf git
sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
sudo chown -R anthony: /usr/src/git
fi
success "$(git --version)"

21
install/020-docker.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing docker..."
# https://docs.docker.com/engine/install/ubuntu/
# 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 focal stable"
# sudo apt update
# apti docker-ce docker-compose
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) 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 update
apti docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker anthony
success "You need to logout and log in again to apply docker group"

6
install/040-ulauncher.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing ulauncher from apt..."
sudo add-apt-repository ppa:agornostal/ulauncher
apti ulauncher

23
install/050-syncthing.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing syncthing..."
# https://apt.syncthing.net/
# Add the release PGP keys:
sudo curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
# Add the "stable" channel to your APT sources:
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
# Add the "candidate" channel to your APT sources:
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing candidate" | sudo tee /etc/apt/sources.list.d/syncthing.list
# Update and install syncthing:
aptu
apti syncthing
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-start.desktop" -O /home/anthony/.local/share/applications/syncthing-start.desktop
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-ui.desktop" -O /home/anthony/.local/share/applications/syncthing-ui.desktop
ln -s /home/anthony/.local/share/applications/syncthing-start.desktop /home/anthony/.config/autostart/syncthing-start.desktop
# или демоном: https://habr.com/ru/post/350892/

6
install/100-grub-customizer.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing grub-customizer..."
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
apti grub-customizer

9
install/110-wine.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing wine"
sudo dpkg --add-architecture i386
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
apti winehq-stable
installed "wine" && success "wine installed!"

10
install/120-chrome.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing google chrome (latest)..."
# https://t.me/axenov_blog/251
# snapi chromium
wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" -O /tmp/google-chrome-stable_current_amd64.deb
sudo dpkg -i /tmp/google-chrome-stable_current_amd64.deb
rm /tmp/google-chrome-stable_current_amd64.deb

24
install/130-postman.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing postman (latest)..."
wget "https://dl.pstmn.io/download/latest/linux64" -O /tmp/postman.tar.gz
# sudo tar -xvzf /tmp/postman.tar.gz -C /usr/local/bin
sudo tar -xzf /tmp/postman.tar.gz -C /usr/local/bin
rm /tmp/postman.tar.gz
sudo ln -s /usr/local/bin/Postman/Postman /usr/local/bin/postman
echo "#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Postman
Exec=/usr/local/bin/postman
Icon=/usr/local/bin/Postman/app/icons/icon_128x128.png
Categories=Utility,Network
Terminal=false
Type=Application
Encoding=UTF-8
" > /home/anthony/.local/share/applications/Postman.desktop
sudo update-desktop-database
installed "postman" && success "Postman installed!" || warning "Something wrong, Postman was not installed"

27
install/200-golang.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing golang"
# https://golang.org/doc/install
# https://www.vultr.com/docs/install-the-latest-version-of-golang-on-ubuntu
# if [ "$EUID" -ne 0 ]
# then echo "*** root permissions required ***"
# exit
# fi
[ $1 ] && VERSION="$1" || VERSION="1.17.5"
FILE="go$VERSION.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
wget "https://golang.org/dl/$FILE" -O /tmp/$FILE
sudo tar -xzf $FILE -C /usr/local
rm -rf /tmp/$FILE
sudo chown $USER: -R /usr/local/go
echo "export PATH=$PATH:/usr/local/go/bin" >> /home/anthony/.profile
echo "export GOPATH=~/.go" >> /home/anthony/.profile
# source ~/.profile
success "$(go version)"
info "NOTE: now run \`source ~/.profile\` to apply new env vars"

7
install/700-apache.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing apache2..."
apti apache2
sudo service apache2 restart
success "$(apache2 -v)"

28
install/710-php.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
PHPVER="8.1"
title "Installing php${PHPVER}..."
sudo LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
apti php${PHPVER} \
php${PHPVER}-xdebug \
php${PHPVER}-bcmath \
php${PHPVER}-bz2 \
php${PHPVER}-curl \
php${PHPVER}-gd \
php${PHPVER}-json \
php${PHPVER}-mbstring \
php${PHPVER}-mysql \
php${PHPVER}-opcache \
php${PHPVER}-pgsql \
php${PHPVER}-soap \
php${PHPVER}-xml \
php${PHPVER}-xmlrpc \
php${PHPVER}-xsl \
php${PHPVER}-zip
# php${PHPVER}-common
# php${PHPVER}-cli
# php${PHPVER}-dba
# php${PHPVER}-ldap
# php${PHPVER}-sqlite3
php -v

47
install/720-composer.sh Executable file
View File

@@ -0,0 +1,47 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing composer..."
if installed "php"; then
if installed "composer"; then
warning "You already have composer installed - removing to install actual version"
sudo apt remove -y --autoremove composer
sudo rm -f /bin/composer
sudo rm -f /usr/bin/composer
sudo rm -f /usr/local/bin/composer
sudo rm -rf /usr/src/composer
fi
sudo mkdir -m 0777 -p /usr/src/composer
cd /usr/src/composer
# https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
>&2 echo 'ERROR: Invalid installer checksum'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet
sudo cp /usr/src/composer/composer.phar /usr/local/bin/composer
cd - >/dev/null
sudo rm -rf /usr/src/composer/
installed "composer" && success "composer installed!"
else
warning "*** You need to have php installed"
fi
# title "Installing composer.phar in home dir..."
# cd ~
# EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
# if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
# then
# >&2 echo 'ERROR: Invalid installer signature'
# rm composer-setup.php
# exit 1
# fi
# php composer-setup.php --quiet
# RESULT=$?
# rm composer-setup.php

39
install/730-oci8.sh_ Normal file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing oci8..."
#check for
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip -- only libociicus.so
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linuxx64.zip
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-tools-linuxx64.zip
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
#unzip
sudo mkdir /opt/oracle/
sudo mv ~/Downloads/instant_client/ /opt/oracle/
sudo sh -c "echo /opt/oracle/instant_client > /etc/ld.so.conf.d/oracle-instantclient.conf"
sudo ldconfig
apti php-dev php-pear build-essential libaio1 default-jdk
sudo pecl channel-update pecl.php.net
#sudo pecl install oci8 # php8
sudo pecl install oci8-2.2.0 # php7
#sh -c "echo '; priority=10' > /etc/php/7.4/mods-available/oci8.ini"
sudo sh -c "echo 'extension=oci8.so' >> /etc/php/7.4/mods-available/oci8.ini"
sudo chmod 0644 /etc/php/7.4/mods-available/oci8.ini
sudo phpenmod oci8
php -i | grep oci8
# instantclient,/opt/oracle/instant_client
# https://pecl.php.net/package/oci8
sudo pecl install oci8-2.2.0

8
install/800-mysql.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing mariadb..."
apti mariadb-server mariadb-client
sudo mysql_secure_installation
installed "php" && apti php-mysql phpmyadmin
installed "mysql" && success "mariadb installed!"

7
install/810-pgsql.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing pgsql..."
apti postgresql postgresql-contrib
sudo service postgresql restart
installed php && apti php-pgsql

28
install/996-zint.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing zint..."
apti g++ cmake qtbase5-dev qttools5-dev libpng-dev
if installed git; then
# 2.9.* ===============================================================================
sudo git clone git://git.code.sf.net/p/zint/code /usr/src/zint
cd /usr/src/zint
sudo cmake .
sudo make
sudo make install
cd -
else
echo "You need git to be installed!"
# 2.4.2 ===============================================================================
# https://wayneoutthere.com/2021/02/17/how-to-install-zint-on-ubuntu/
# sudo wget https://github.com/downloads/zint/zint/zint-2.4.2.tar.gz -O /usr/src/zint.tar.gz
# sudo tar -C /usr/src/ -xzf /usr/src/zint.tar.gz
# sudo rm -rf /usr/src/zint.tar.gz
# cd /usr/src/zint-2.4.2/build
# sudo cmake ..
# sudo make
# sudo make install
# sudo rm -rf /usr/src/zint*
# cd -
fi

20
install/997-nodejs.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing nodejs..."
# apti nodejs npm
if !installed "nvm"; then
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
fi
if [ $(nvm current) == 'system' ]; then
warning "You already have node installed - removing to install actual version"
sudo apt remove -y --autoremove nodejs npm
else
nvm install-latest-npm
fi
nvm install node
nvm use node
installed "node" && success "nodejs installed! $(nvm current)"
installed "npm" && success "npm installed! $(nvm current)"
nvm ls

View File

@@ -0,0 +1,35 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing phpstorm-url-handler..."
# https://github.com/rozwell/phpstorm-url-handler/
# https://askubuntu.com/a/1023143
# https://askubuntu.com/a/919825
# https://medium.com/swlh/custom-protocol-handling-how-to-8ac41ff651eb
# https://www.linuxquestions.org/questions/linux-desktop-74/xdg-open-doesn%27t-recognize-custom-protocol-4175433062/#post4809984
sudo rm -rf /usr/bin/phpstorm-url-handler >/dev/null
sudo rm -rf ~/.local/share/applications/phpstorm-url-handler.desktop >/dev/null
sudo rm -rf /usr/share/applications/phpstorm-url-handler.desktop >/dev/null
if installed "git"; then
sudo git clone https://github.com/rozwell/phpstorm-url-handler.git /usr/src/phpstorm-url-handler
else
sudo wget https://github.com/rozwell/phpstorm-url-handler/archive/master.zip -O /usr/src/phpstorm-url-handler.zip
sudo unzip /usr/src/phpstorm-url-handler.zip -d /usr/src/phpstorm-url-handler
sudo rm -f /usr/src/phpstorm-url-handler.zip
fi
info "Copy .desktop"
sudo cp /usr/src/phpstorm-url-handler/phpstorm-url-handler.desktop /usr/share/local/applications/phpstorm-url-handler.desktop
info "Symlink bin"
sudo cp /usr/src/phpstorm-url-handler/phpstorm-url-handler /usr/bin/phpstorm-url-handler
info "desktop-file-install"
sudo desktop-file-install phpstorm-url-handler.desktop
info "update-desktop-database"
sudo update-desktop-database -v 2>&1 | grep -E "^(.+)\/phpstorm-url-handler.desktop(.+)$"
info "xdg-mime"
xdg-mime default phpstorm-url-handler.desktop x-scheme-handler/phpstorm

10
install/999-dotfiles.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Copying dotfiles..."
require_start
cp $DOTFILESDIR/.aliases $HOME/.aliases
cp $DOTFILESDIR/.bashrc $HOME/.bashrc
cp $DOTFILESDIR/.zshrc $HOME/.zshrc
cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig
cp -R $DOTFILESDIR/Шаблоны $HOME/Шаблоны