Skip to content

Instantly share code, notes, and snippets.

@GiancarloAparicio
Last active August 31, 2022 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GiancarloAparicio/4d9224fe6b0fb031c70fdcf0c9771dc9 to your computer and use it in GitHub Desktop.
Save GiancarloAparicio/4d9224fe6b0fb031c70fdcf0c9771dc9 to your computer and use it in GitHub Desktop.
Script de configuración para Termux
apt update -y && apt upgrade -y
install() {
echo "$@" | xargs -n 1 sudo apt install -y
}
git clone --depth 3 https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.0
echo ". $HOME/.asdf/asdf.sh" >>~/.bashrc
echo ". $HOME/.asdf/completions/asdf.bash" >>~/.bashrc
### Mini flux
install postgresql
wget https://github.com/miniflux/v2/releases/download/2.0.38/miniflux_2.0.38_arm64.deb
dpkg -i miniflux_2.0.38_arm64.deb
rm miniflux_2.0.38_arm64.deb
### INSTALL CODE SERVER
asdf plugin add nodejs
asdf install nodejs 14.15.0
asdf global nodejs 14.15.0
asdf reshim
curl -fsSL https://code-server.dev/install.sh | sh
mkdir ~/.config/code-server
echo "bind-addr: 127.0.0.1:5000
auth: none
cert: false
user-data-dir: /root/.config/code-server/user-data
extensions-dir: /root/.config/code-server/extensions
disable-update-check: true
disable-telemetry: true
" >~/.config/code-server/config.yaml
### INSTALL FILEBROWSER
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
filebrowser config set --auth.method=noauth
### INSTALL CLOUDBEAVER DATABASE
install mariadb-server openjdk-11-jdk maven nginx
npm install --global lerna
npm install --global yarn
git clone --depth 3 https://github.com/dbeaver/cloudbeaver.git
cd cloudbeaver/deploy
bash ./build.sh
# cd cloudbeaver; bash ./run-server.sh
echo "
[mysqld]
bind-address = 127.0.0.1
port = 3306
" >/etc/mysql/conf.d/mysql.cnf
service mariadb start
mysql_secure_installation
echo "Cree un usuario SQL para conectarse remotamente:"
read user
echo "Ingrese su contraseña para conectarse remotamente: "
read password
mysql -e "CREATE USER '$user'@'%' IDENTIFIED BY '$password';"
mysql -e "GRANT ALL PRIVILEGES ON *.* TO '$user'@'%';"
mysql -e "FLUSH privileges;"
service mariadb restart
### INSTALL UNGIT
#npm install -g ungit
### SSHwifty
git clone --depth 1 https://github.com/nirui/sshwifty ~/sshwifty
cd ~/sshwifty
yarn install
yarn run build
### PostWoman
git clone --depth 1 https://github.com/f0rb1d/postwoman.git ~/postwoman
cd ~/postwoman
yarn install
yarm run build
### Nikto
git clone --depth 1 https://github.com/sullo/nikto.git /opt/nikto
chmod +x /opt/nikto/program/nikto.pl
ln -s /opt/nikto/program/nikto.pl /usr/bin/nikto
nikto -h http://www.example.com
### Wallabag
install php-fpm php-mysql php-bcmath php-xml php-zip php-curl php-mbstring php-gd php-tidy php-gettext php-tokenizer composer php-sqlite3
git clone https://github.com/wallabag/wallabag.git
cd wallabag
make install
# Config nginx
# https://www.howtoforge.com/how-to-install-wallabag-on-ubuntu-1804/
### Homer
git clone --depth 1 https://github.com/bastienwirtz/homer.git ~/homer
cd ~/homer
yarn install
yarm run build
EMAIL="GiancarloAparicio"
NAME="GiancarloAparicio"
apt update -y && apt upgrade -y
termux-setup-storage
install() {
echo "$@" | xargs -n 1 apt install -y
}
echo "
run-debian() {
proot-distro login --termux-home --fix-low-ports debian -- eval \$@
}
alias debian='proot-distro login --termux-home --fix-low-ports debian'
" >> ~/.bashrc
echo "
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
" > ~/.profile
source .bashrc
# Install on termux
install proot-distro wget nodejs curl git neofetch htop openssh termux-services tmux gh neovim gotty termux-services
echo '
#!/data/data/com.termux/files/usr/bin/bash
$@
' > /data/data/com.termux/files/usr/bin/sudo
chmod +x $PREFIX/bin/sudo
echo "Ingresa una contraseña para conectarte por SSH"
passwd
cd ~/.ssh; ssh-keygen -o -t rsa -b 4096 -m PEM
sv-enable sshd
git config --global user.email "$EMAIL"
git config --global user.name "$NAME"
gh auth login
### FINISH INSTALLATION
# echo "Run debian"
# proot-distro install debian
# proot-distro login --termux-home --fix-low-ports debian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment