Skip to content

Instantly share code, notes, and snippets.

@PowerKiKi
Last active July 11, 2022 14:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PowerKiKi/5005ec0c23cc35df1088 to your computer and use it in GitHub Desktop.
Save PowerKiKi/5005ec0c23cc35df1088 to your computer and use it in GitHub Desktop.
ubuntu fresh install
# apache+mariadb+php+misc
sudo apt-add-repository ppa:ondrej/php
sudo apt update
sudo apt install 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
# 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 -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
# Gems for lolcommits
sudo gem install lolcommits
# user apps
sudo apt remove --yes mousepad abiword gnumeric transmission-common thunderbird orage
sudo apt install scite default-jre meld gitk ssh vlc vim gimp inkscape unrar doxygen graphviz poedit php-xdebug ruby ruby-dev libreoffice subdownloader kazam flameshot python-is-python3 mplayer
sudo snap install phpstorm --classic
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment