Let's init!

Environment: Ubuntu 24.04 LTS

Add SSH Key

Change to your own public key before execute this!

bash -c "$(curl https://init.min.moe/addkey.sh)"

Install Services

# git, htop, byobu (optional)
apt update
apt install -y git htop byobu

# zsh (optional)
bash -c "$(curl https://init.min.moe/zsh.sh)"

# Optimize TCP (optional)
bash -c "$(curl https://init.min.moe/tcp_optimize.sh)"

# Nginx
bash -c "$(curl https://init.min.moe/nginx.sh)"

# PHP 8.3
bash -c "$(curl https://init.min.moe/php_8.3.sh)"

MySQL

apt install mysql-server mysql-client php-mysql -y
mysql -e "CREATE USER admin@localhost IDENTIFIED BY 'PASSWORD';"
mysql -e "GRANT ALL ON *.* TO admin@localhost WITH GRANT OPTION;"
mysql -e "DELETE FROM mysql.user WHERE User='';"
mysql -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
mysql -e "DROP DATABASE IF EXISTS test;"
mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';"
mysql -e "FLUSH PRIVILEGES;"
history -c

# phpMyAdmin
bash -c "$(curl https://init.min.moe/phpmyadmin.sh)"

Redis

apt install redis-server php-redis -y

Certbot for Nginx

apt install python3-certbot-nginx -y && certbot --nginx --register-unsafely-without-email

Cloudflare Config

bash -c "$(curl https://init.min.moe/cloudflare.sh)"