Setup Server Using Ubuntu

update and upgrade ubuntu budgie
sudo apt update
sudo apt upgrade
sudo apt/snap install sublime-text

Install Apache
sudo apt update
sudo apt install apache2
sudo ufw app info "Apache Full"
sudo ufw allow in "Apache Full"

Install Mysql
sudo apt update
sudo apt install mysql-server
sudo mysql_secure_installation
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' WITH GRANT OPTION;
exit
systemctl status mysql.service
sudo mysqladmin -p -u root version

Install phpMyAdmin
sudo apt update
sudo apt install phpmyadmin php-mbstring php-gettext
sudo phpenmod mbstring
sudo systemctl restart apache2
http://127.0.0.1/phpmyadmin/index.php
if phpmyadmin was not found
sudo -H subl /etc/apache2/apache2.conf
Then add the following line to the end of the file:
IncludeOptional /etc/phpmyadmin/apache.conf
/etc/init.d/apache2 restart

Create A Virtual Host
Step One — Create the Directory Structure
sudo mkdir -p /var/www/test.com/public_html
Step Two — Grant Permissions
sudo chown -R $USER:$USER /var/www/test.com/public_html
sudo chmod -R 755 /var/www
Step Three — Create Demo Pages for Each Virtual Host
nano /var/www/test.com/public_html/index.html
Pest below code in the opened file
<html>
  <head>
    <title>Welcome to test.com!</title>
  </head>
  <body>
    <h1>Success!  The test.com virtual host is working!</h1>
  </body>
</html>
Step Four — Create New Virtual Host Files
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/test.conf
sudo subl /etc/apache2/sites-available/test.conf
Pest below code in the opened file
<VirtualHost *:80>
    ServerAdmin adminEmail
    ServerName test.com
    ServerAlias www.test.com
    DocumentRoot /var/www/test.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Step Five — Enable the New Virtual Host Files
sudo a2ensite test.conf
sudo a2dissite 000-default.conf
sudo systemctl restart apache2
sudo service apache2 restart
Step Six — Set Up Hosts File (Optional)
sudo subl /etc/hosts
127.0.0.1 test.com
Enable rewrite mode
sudo /etc/apache2/mods-enabled/a2enmod rewrite
Otherwise, change the Apache configuration
sudo subl /etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks 
AllowOverride All 
Require all granted 
</Directory>
sudo /etc/init.d/apache2 restart

Install Composer
sudo apt update
sudo apt install curl php-cli php-mbstring git unzip
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
https://composer.github.io/pubkeys.html
HASH=dynamicPublicKeyFromAbouveLink
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
If Output says "Installer verified"
To install composer globally, use the following command which will download and install Composer as a system-wide command named composer, under /usr/local/bin:
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
Done!!! use it with "composer" everywhere you want

Install Laravel Installer
composer global require laravel/installer
When composer finish, open below file and pest below code at the end:
export PATH="~/.config/composer/vendor/bin:$PATH"
source ~/.bashrc
Done!!! use it with "laravel" everywhere you want

Install NVM
curl -o-
https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Check installation by below command
command -v nvm
Output "nvm"
After downloading the script, run the script using bash as follows
bash install_nvm.sh
To reflect the changes for the current user session, use following command
source ~/.profile
Check installed NVM version as follows
nvm --version
Use following nvm command to list all available node.js versions
nvm ls-remote
nvm install 14.0 # it will install node 14.0.0
To check node and npm version, use following commands:
node -v
npm -v

Install CLI(s)
sudo apt update
Angular CLI
npm install -g @angular/cli
ng --version
Upgrading
npm update -g @angular/cli
OR
yarn global upgrade --latest @angular/cli
ng new test-app
cd test-app
ng serve

Create React App CLI
npm install -g create-react-app
create-react-app --version
Upgrading
npm update -g create-react-app
OR
yarn global upgrade --latest create-react-app
create-react-app test-app
cd test-app
npm start

Vue CLI
npm install -g @vue/cli
OR
yarn global add @vue/cli
vue --version
Upgrading
npm update -g @vue/cli
OR
yarn global upgrade --latest @vue/cli