Last active
October 4, 2021 14:23
-
-
Save dcai/c5418bcf9203cf19c93a to your computer and use it in GitHub Desktop.
ubuntu packages
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 | |
sudo apt update | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
apt-utils \ | |
ca-certificates \ | |
locales \ | |
gnupg2 \ | |
software-properties-common \ | |
wget | |
sudo add-apt-repository -y ppa:jonathonf/vim | |
sudo add-apt-repository -y ppa:fish-shell/release-3 | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install -y \ | |
aptitude \ | |
aria2 \ | |
aspell \ | |
cmake \ | |
fd-find \ | |
fish \ | |
git \ | |
gettext-base \ | |
htop \ | |
httpie \ | |
jq \ | |
libxml2-utils \ | |
mariadb-client \ | |
mcrypt \ | |
memcached \ | |
moreutils \ | |
mycli \ | |
ncdu \ | |
ntp \ | |
ntpdate \ | |
p7zip \ | |
pgcli \ | |
python3-pip \ | |
python3-tmuxp \ | |
python3-venv \ | |
rsync \ | |
ruby \ | |
ruby-dev \ | |
silversearcher-ag \ | |
software-properties-common \ | |
tig \ | |
tmux \ | |
tree \ | |
unrar \ | |
unzip \ | |
vim \ | |
virtualenv \ | |
wajig \ | |
wbritish \ | |
watchman \ | |
xz-utils | |
sudo sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && | |
dpkg-reconfigure --frontend=noninteractive locales && | |
update-locale LANG=en_US.UTF-8 | |
sudo ln -fs /usr/share/zoneinfo/Australia/Sydney /etc/localtime |
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 | |
BIN=$HOME/.local/bin | |
TMP=/tmp/dl | |
mkdir -p $BIN | |
mkdir -p $TMP | |
curl https://github.com/BurntSushi/ripgrep/releases/download/12.0.1/ripgrep_12.0.1_amd64.deb -o $TMP/rg.deb | |
sudo dpkg -i $TMP/rg.deb | |
curl https://github.com/gopasspw/gopass/releases/download/v1.12.6/gopass_1.12.6_linux_amd64.deb -o $TMP/gopass.deb | |
sudo dpkg -i $TMP/gopass.deb | |
curl https://github.com/ogham/exa/releases/download/v0.10.1/exa-linux-x86_64-musl-v0.10.1.zip -o $TMP/exa.zip | |
cd $TMP | |
unzip -o exa.zip | |
mv -f bin/exa $BIN/exa | |
curl https://github.com/dalance/procs/releases/download/v0.11.8/procs-v0.11.8-x86_64-lnx.zip -o $TMP/procs.zip | |
cd $BIN | |
unzip -o $TMP/procs.zip | |
cd $BIN | |
curl https://github.com/mvdan/sh/releases/download/v3.3.0/shfmt_v3.3.0_linux_amd64 -o shfmt | |
chmod a+x shfmt |
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 | |
cd $HOME | |
git clone [email protected]:dcai/.vim.git | |
git clone [email protected]:dcai/.password-store.git | |
git clone [email protected]:dcai/.bin.git | |
git clone [email protected]:dcai/.fish.d.git $HOME/.config/fish | |
git clone [email protected]:2885623.git $HOME/.config/git | |
git clone [email protected]:dcai/.tmuxp.git $HOME/.tmuxp | |
git clone https://github.com/asdf-vm/asdf.git $HOME/.asdf --branch v0.8.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
# oracle java | |
add-apt-repository ppa:linuxuprising/java | |
apt install oracle-java16-installer oracle-java16-set-default |
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 | |
FPMCONF=/etc/php/7.4/fpm/pool.d/www.conf | |
FPMPORT=9000 | |
USER=dcai | |
GROUP=dcai | |
export WWWROOT=/home/dcai/moodles/www | |
sudo add-apt-repository -y ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install -y \ | |
nginx \ | |
php7.4-fpm \ | |
php7.4-cli \ | |
php7.4-common \ | |
php7.4-curl \ | |
php7.4-fpm \ | |
php7.4-gd \ | |
php7.4-intl \ | |
php7.4-json \ | |
php7.4-mbstring \ | |
php7.4-opcache \ | |
php7.4-pgsql \ | |
php7.4-readline \ | |
php7.4-soap \ | |
php7.4-xml \ | |
php7.4-xmlrpc \ | |
php7.4-zip | |
sudo apt-get install -y postgresql-12 | |
sudo sed -i "s/^user = www-data/user = $USER/g" $FPMCONF | |
sudo sed -i "s/^group = www-data/group = $GROUP/g" $FPMCONF | |
sudo sed -i "s/^listen = .*/listen = $FPMPORT/g" $FPMCONF | |
sudo sed -i "s/^;listen.mode = .*/listen.mode = 0666/g" $FPMCONF | |
sudo sed -i "s/^listen.owner = .*/listen.owner = $USER/g" $FPMCONF | |
sudo sed -i "s/^listen.group = .*/listen.group = $USER/g" $FPMCONF | |
echo 'php_flag[display_errors] = on' | sudo tee -a $FPMCONF | |
echo 'php_admin_value[error_log] = /tmp/fpm-php.www.log' | sudo tee -a $FPMCONF | |
echo 'php_admin_flag[log_errors] = on' | sudo tee -a $FPMCONF | |
echo 'php_admin_value[memory_limit] = 256M' | sudo tee -a $FPMCONF | |
echo 'php_admin_value[max_input_vars] = 50000' | sudo tee -a $FPMCONF | |
sed "s|__WWWROOT__|$WWWROOT|g" nginx-default.conf | sudo sponge /etc/nginx/sites-enabled/default | |
sudo service php7.4-fpm restart | |
sudo service nginx restart |
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
server { | |
listen 8080 default_server; | |
root __WWWROOT__; | |
index index.php index.html; | |
server_name _; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
location ~ ^(.+\.php)(.*)$ { | |
fastcgi_split_path_info ^(.+\.php)(.*)$; | |
fastcgi_index index.php; | |
fastcgi_pass 127.0.0.1:9000; | |
include /etc/nginx/mime.types; | |
include fastcgi_params; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment