Skip to content

Instantly share code, notes, and snippets.

--------------PHP versions----------------
sudo apt show php
OR
sudo apt show php -a
//install default PHP version
sudo apt install php
First start by adding Ondřej Surý PPA to install different versions of PHP – PHP 5.6, PHP 7.0 and PHP 7.1 on Ubuntu system.
sudo apt install python-software-properties
sudo add-apt-repository ppa:ondrej/php
@mthabsheer
mthabsheer / gist:acf2a7292afc8d93ee13b1378d7cc7a7
Created April 18, 2018 06:41
Setting server timzone Ubuntu/Debian
dpkg-reconfigure tzdata
@mthabsheer
mthabsheer / gist:3ad9aeb3d071c206a322eb7a90bbb796
Created March 26, 2018 06:37
Configuring Linux Services Using systemd
Step 1: create a file named "myservice.service" in /etc/systemd/system
Step 2: Copy the below code to the file. Replace the path/to/my/script with yours.
[Unit]
Description=My Service
After=network.target
# Mention the required service after which our myservice needs to start
After=mysql.service
Requires=mysql.service