Thursday, August 12, 2021

Remove the Apache Web Server Ubuntu

sudo service apache2 stop

sudo systemctl disable apache2

sudo apt remove apache2

sudo apt autoremove

Tuesday, August 10, 2021

How to install Postal MTA using Docker & Caddy server in Ubuntu 18.04

Step-1: Hostname Setup

sudo hostname postal.example.com

Step-2: Docker

sudo apt-get update

sudo apt-get install \

    apt-transport-https \

    ca-certificates \

    curl \

    gnupg \

    lsb-release

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo \

  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \

  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

docker-compose --version

Step-3: System utilties

apt install git curl jq

Step-4: Git & installation helper repository

git clone https://postalserver.io/start/install /opt/postal/install

sudo ln -s /opt/postal/install/bin/postal /usr/bin/postal

Step-5: MariaDB

docker run -d \

   --name postal-mariadb \

   -p 127.0.0.1:3306:3306 \

   --restart always \

   -e MARIADB_DATABASE=postal \

   -e MARIADB_ROOT_PASSWORD=postal \

   mariadb

Step-6: RabbitMQ

docker run -d \

   --name postal-rabbitmq \

   -p 127.0.0.1:5672:5672 \

   --restart always \

   -e RABBITMQ_DEFAULT_USER=postal \

   -e RABBITMQ_DEFAULT_PASS=postal \

   -e RABBITMQ_DEFAULT_VHOST=postal \

   rabbitmq:3.8

Step-7: Installation postal

postal bootstrap mailer.justnutritive2.com

Step-8: DB Config and Permission (This is optional if you use step-5)

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

GRANT ALL ON postal.* TO 'postal'@'localhost' WITH GRANT OPTION;

FLUSH PRIVILEGES;

Exit;

sudo nano /opt/postal/config/postal.yml

Step-9: DB initialise

postal initialize

postal make-user

Step-10: Postal Running

postal start

Step-11: Installing WEB Client

docker run -d \

   --name postal-caddy \

   --restart always \

   --network host \

   -v /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile \

   -v /opt/postal/caddy-data:/data \

   caddy

Step-12: STPM Configure

https://postal.justnutritive2.com

-----------------------------------------

Postal Login Credentials

-----------------------------------------

Mr X.

https://postal.example.com/settings

Username: alexise@example.com

Password: **********

====================================================

docker run -d \

   --name postal-caddy \

   --restart always \

   --network host \

   -v /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile \

   -v /home/postal/public_html/caddy-data:/data \

   caddy

sudo /etc/init.d/apache2 start

sudo /etc/init.d/apache2 stop

----------------------------

Postal stop

Postal start



Monday, August 9, 2021

Install only Webmin without Lamp Stack

$ sudo nano /etc/apt/sources.list

$ deb http://download.webmin.com/download/repository sarge contrib

$ wget http://www.webmin.com/jcameron-key.asc 

$ sudo apt-key add jcameron-key.asc

$ sudo apt update 

$ sudo apt install webmin

Sunday, August 8, 2021

Change Ubuntu server Hoatname permanently

 Type the hostnamectl command :

sudo hostnamectl set-hostname newNameHere

Delete the old name and setup new name.

Next Edit the /etc/hosts file:

sudo nano /etc/hosts

Replace any occurrence of the existing computer name with your new one.

Reboot the system to changes take effect:

sudo reboot

Saturday, August 7, 2021

How to install VestaCP


# Connect to your server as root via SSH

ssh root@your.server

# Download installation script

curl -O http://vestacp.com/pub/vst-install.sh

# Run it
bash vst-install.sh

Tuesday, August 3, 2021

How to Install SQLite driver for your PHP version in Ubuntu


Log in to your web server via SSH and run the following command:

sudo apt-get install php-sqlite3

If the above command does not work, you can try the PHP version-specific instructions below:

For PHP5, use

sudo apt-get install php5-sqlite

For PHP7.0, use

sudo apt-get install php7.0-sqlite

For PHP7.1, use

sudo apt-get install php7.1-sqlite

For PHP7.2, use

sudo apt-get install php7.2-sqlite

For PHP7.3, use

sudo apt-get install php7.3-sqlite

For PHP7.4, use

Then

Restart Apache

sudo service apache2 restart

Restart Nginx

sudo service nginx restart

How to get Ranking of the Students in Excel using RANK Function

=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...