Last active
January 14, 2025 07:41
-
-
Save PowerKiKi/5005ec0c23cc35df1088 to your computer and use it in GitHub Desktop.
ubuntu fresh install
This file contains hidden or 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
# apache+mariadb+php+misc | |
sudo apt-add-repository ppa:ondrej/php | |
sudo apt update | |
sudo apt install blueman libspa-0.2-bluetooth vim curl git git-gui gitk htop nginx nginx-extras mariadb-server zip graphicsmagick php-cli php-gd php-xml php-mysql php-sqlite3 php-mbstring php-curl php-imagick php-xml php-zip php-bcmath php-bz2 php-soap php-intl php-apcu php-pcov php-fpm php-yaml | |
# wp-cli | |
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp | |
# composer | |
wget https://getcomposer.org/composer.phar | |
chmod +x composer.phar | |
sudo mv composer.phar /usr/local/bin/composer | |
# nodejs | |
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - | |
sudo apt install -y nodejs | |
# Gems for lolcommits | |
sudo gem install lolcommits | |
# user apps | |
sudo apt install apg scite baobab ffmpeg engrampa pipx default-jre meld gitk ssh vlc vim gimp inkscape poedit php-xdebug ruby ruby-dev libreoffice subdownloader kazam flameshot python-is-python3 mplayer ristretto gvfs-backends xserver-xorg-input-synaptics | |
sudo snap install phpstorm --classic | |
pipx install https://github.com/joh/when-changed/archive/master.zip | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i google-chrome-stable_current_amd64.deb | |
# MongoDB 4.4 | |
curl -O http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb | |
sudo dpkg -i ./libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb | |
sudo wget -O- "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x656408E390CFB1F5" -O /etc/apt/trusted.gpg.d/mongodb.gpg | |
echo "deb [ arch=amd64,arm64 trusted=yes ] http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list | |
sudo apt update | |
sudo apt install mongodb-org-server mongodb-org-database-tools-extra mongodb-database-tools | |
# Configuration | |
sudo a2enmod rewrite headers ssl | |
/etc/apache2/apache2.conf => | |
<Directory /srv/data/www/> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
# /etc/php/custom.ini: | |
max_execution_time = 300 | |
memory_limit = 1G | |
error_reporting = E_ALL | |
display_errors = On | |
display_startup_errors = On | |
post_max_size = 800M | |
upload_max_filesize = 200M | |
session.gc_maxlifetime = 10368000 | |
date.timezone = Asia/Seoul | |
phar.readonly = 0 | |
max_input_vars=1500 | |
xdebug.mode=develop | |
xdebug.var_display_max_data=2048 | |
xdebug.var_display_max_depth=3 | |
xdebug.remote_handler=dbgp | |
xdebug.client_host=localhost | |
xdebug.client_port=9000 | |
xdebug.max_nesting_level=5000 | |
xdebug.start_with_request=trigger | |
; As recommnded to avoid warnings | |
always_populate_raw_post_data=-1 | |
apc.shm_size=512M | |
# /srv/data/www/phpmyadmin/config.inc.php: | |
<?php | |
$cfg['LoginCookieValidity'] = 3600 * 9; // 9 hours | |
# /etc/mysql/mariadb.conf.d/99-non-strict.cnf: | |
# Make non-strict mode like on previous server | |
[mysqld] | |
sql_mode="" | |
# Colored emojis | |
# But see bug with gitk: https://bugs.launchpad.net/ubuntu/+source/git/+bug/1852985 | |
wget -P ~/.fonts https://github.com/googlefonts/noto-emoji/raw/main/fonts/NotoColorEmoji.ttf | |
fc-cache -f -v | |
# Pour `yarn test` parce que https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md | |
# /etc/apparmor.d/playwright-chrome: | |
abi <abi/4.0>, | |
include <tunables/global> | |
profile chrome /@{HOME}/.cache/ms-playwright/**/chrome flags=(unconfined) { | |
userns, | |
# Site-specific additions and overrides. See local/README for details. | |
include if exists <local/chrome> | |
} | |
sudo service apparmor reload | |
sudo systemctl daemon-reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment