Skip to content

Instantly share code, notes, and snippets.

@mohamm6d
Last active March 20, 2020 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohamm6d/04dba3909825ac5ab75bc21ff0dee887 to your computer and use it in GitHub Desktop.
Save mohamm6d/04dba3909825ac5ab75bc21ff0dee887 to your computer and use it in GitHub Desktop.
Linux Essential Commands
#This is for when multiple packages are installed
sudo nano /etc/apt/sources.list
#Short open tag ubuntu
nano /etc/php.ini
#Install PHP extensions
sudo apt-get install php-mbstring php7.3-mbstring php-gettext libapache2-mod-php7.3
#restarting Apache2
sudo service apache2 restart
sudo systemctl restart apache2
#Make SSL
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-apache
sudo certbot --apache -d example.ai -d www.example.ai
#renew SSL
sudo certbot renew --dry-run
#upgrade php to 7.3
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.3
#enable php to 7.3 in apache
$ sudo a2dismod php5.6
$ sudo a2enmod php7.1
$ sudo service apache2 restart
#install mysqli
sudo apt-get install php7.x-mysqli
sudo service apache2 restart
##change PHPmyadmin URL
sudo nano /etc/phpmyadmin/apache.conf and change the third
Alias /yournewalias /usr/share/phpmyadmin
sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment