Skip to content

Instantly share code, notes, and snippets.

@Faizanq
Last active March 2, 2023 05:54
Show Gist options
  • Save Faizanq/98bfc81dcb708b6a1018f4c0d37a284e to your computer and use it in GitHub Desktop.
Save Faizanq/98bfc81dcb708b6a1018f4c0d37a284e to your computer and use it in GitHub Desktop.
sudo apt-get update
sudo apt-get install apache2
sudo a2enmod headers proxy_http xml2enc proxy ssl proxy_wstunnel rewrite
Note: rewrite // this mode is to enable htaccess
for .htaccess to work enabled mode rewrite
sudo nano /etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All //------ this will be none and should be All
Require all granted
</Directory>
Install PHP 8.1
sudo apt-get install php8.1
sudo apt-cache search php8.1-*
sudo apt-get install php8.1-fpm
sudo apt-get install php8.1-mbstring php8.1-curl php8.1-xml php8.1-mysql php8.1-zip php8.1-gd php8.1-mbstring
sudo apt-get install php-pear php8.1-dev
sudo apt-get install libapache2-mod-php8.1
#Install MySQL phpMyAdmin
sudo apt-get install mysql-server mysql-client
sudo apt-get install phpmyadmin
sudo mysql
SELECT user,authentication_string,plugin,host FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
SELECT user,authentication_string,plugin,host FROM mysql.user;
#Install Copmposer
sudo curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
#Install Node.js on Ubuntu
How To Install Using NVM
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh -o install_nvm.sh
bash install_nvm.sh
#To gain access to the nvm functionality, you'll need to log out and log back in again,
nvm install 18
nvm use 18
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=2048
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment