Setup
Kresna Satya's personal setup on Computer.
macOS
Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Zsh Config
Text Editor
- Visual Studio Code (VS Code).
- VS Code settings and keybindings
- Zed editor
Additional Software
- Table Plus
- DBngin
- Postman
- Notion
- Figma
- Herd by Laravel
- Bezel
- Orbstack for Docker
- App Cleaner
- The Unarchiver
- Discord
- Cloudflare Warp
- Google Chrome
- Firefox
- Zotero for Citation Paper (alternative of Mendeley) -> Optional
- Android Studio -> Optional
- Swift Playgrounds -> Optional
- Office 365 -> Optional
- Screenflow -> Optional
Windows
First of all, please install Windows Terminal on Microsoft Store in order to make it easier to manage terminal between environment Windows and WSL itself.
WSL2
This step below is a WSL2 fresh install of WSL2. Open Windows Shell and run as administrator.
wsl --install -d --web-download UbuntuAfter Ubuntu distro downloaded, you must restart your computer to make it works properly.
Next, open Windows Terminal then choose option for Ubuntu terminal (?). For the first time, the Ubuntu will set an update then there will be a prompt to set username and password.
Usually, I set the password same with the username. 😅
Next, update the Ubuntu distro.
sudo apt -y update && sudo apt -y full-upgradeAdditional information.
# To get list of distro
wsl -l -v
# Shutdown WSL
wsl --shutdown
# Unregister the distro
wsl --unregister Ubuntu
# Close the terminal and open againReference
Install Ubuntu on WSL2 with GUI Support
Utilities
- Install ZSH.
sudo apt -y install wget git zsh
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"- Install Net Tools to check IP on computer with
ifconfigcommand.
sudo apt install -y net-tools
ifconfigHomebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"After download, then add Homebrew to the PATH.
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/usdidev/.zshrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"Next, install Homebrew's dependencies.
sudo apt-get install -y build-essentialInstall PHP, Composer, Volta, and PNPM.
brew install volta php composerInstall NodeJS and PNPM with Volta.
volta install node pnpmMySQL
I use MariaDB instead of MySQL server. MariaDB has same features like MySQL server.
sudo apt install -y mariadb-serverEnable MariaDB and start MariaDB.
sudo systemctl enable mariadb
sudo systemctl start mariadbSecure MySQL
This is in development mode.
Run the script below to secure MySQL.
sudo mysql_secure_installation- Press
Enterto selectnoneas the current root password.
Enter current password for root (enter for none):- Enter
nand pressEnterto use MariaDB without unix_socket authentication.
Switch to unix_socket authentication [Y/n]- Enter
yand pressEnterto change the default root user password.
Change the root password? [Y/n]- Enter a new strong password for the root user. In this case I use password
Root@321.
New password:- Re-enter the new root user password and press
Enterto save changes.
Re-enter new password:- Enter
nand pressEnterto not delete anonymous users on the MariaDB server.
Remove anonymous users? [Y/n]- Enter
nand press Enter to keep remote access to the database server root user.
Disallow root login remotely? [Y/n]- Enter
nand press Enter to keep test database.
Remove test database and access to it? [Y/n]- Enter
yto refresh your MariaDB privilege tables and apply your new configuration changes.
Reload privilege tables now? [Y/n]Next, I use different port (33061) to access MariaDB. This will prevent conflict with MySQL in Laragon.
Edit file 50-server.cnf in /etc/mysql/mariadb.conf.d/50-server.cnf and add set port 33061.
[mysqld]
port = 33061Save it and restart MariaDB server.
sudo systemctl restart mariadbRedis
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get -y update
sudo apt-get install -y redisEnable and run Redis server and client use commands below.
sudo systemctl enable redis-server
redis-cli
# Test connection inside redis-cli with "ping" commandIf I want to make Redis can be accessed with my computer IP address then I need to change the redis configuration file.
# First, stop the Redis server
# Next, go to redis.conf file
sudo vi /etc/redis/redis.conf
# Change value of bind directive
bind 0.0.0.0
# Change protected-mode from yes to no
protected-mode no
# Save it and restart Redis Server
sudo service redis-server restartInstall PHP Redis Extension with PECL command then just HIT ENTER.
pecl install redis
# Then check if redis module or extension has been installed in PHP
php -mReference