Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.
/ lamp-pack Public archive

A bash script to automate the installation of LAMP, phpMyAdmin and Let's Encrypt

Notifications You must be signed in to change notification settings

rehmatworks/lamp-pack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LampPack

A bash script to automate the installation of LAMP, phpMyAdmin, Let's Encrypt and WordPress.

Supported OS

Ubuntu 14.04.x (both 32 bit and 64 bit) and Ubuntu 16.04.x (both 32 bit and 64 bit)

About LampPack

LampPack is a set of some bash/shell scripts that automate several tasks together on your Ubuntu servers. If you are tired of repetitive tasks while deploying Ubuntu servers for web or if you aren't well-versed in server configuration, then these scripts are for you. Automate installation of Apache, MySQL, PHP, phpMyAdmin, Let's Encrypt (free SSL) as well as automate the deploy of WordPress for new domains. For WordPress deployment, I've used wp-cli, the renowned WordPress deployment command-line tool.

Getting started

Step 1: Clone the repo If git isn't installed, then install it first and then clone the repo

sudo apt-get -y install git

and then:

git clone https://github.com/rehmatworks/lamp-pack

Step 2: Browse the directory

cd lamp-pack

Step 3: Make sp-lamp.sh executable

chmod +x sp-lamp.sh

Step 4: Execute the script and wait for the configuration to complete

./sp-lamp.sh

Dealing with vhosts

Creating vhosts

spvhost create example.com

Deleting vhosts (Beware! This will delete the domain's directory with all data as well)

spvhost delete example.com

Deploying WordPress (Courtesy: wp-cli)

When you deploy a WordPress website, a new vhost is created. So if you have created any vhost previously, then you will have to delete it before proceeding.

 spwp example.com "Website Title" "admin_username" "admin_email" "admin_password"

Installing Let's Encrypt SSL

Thanks to Let's Encrypt, we can install a valid SSL on unlimited domains for free! Here is what you need to do in order to install SSL on a website. Required arguments:

  1. Domain type (Maybe sub or main)
  2. Domain name
  3. Force SSL (optional)
spssl main example.com

If you want to force SSL by redirecting all HTTP requests to HTTPS, then you will have to pass the third argument as well

spssl main example.com force

To install the SSL on a sub-domain, pass sub as the first argument:

spssl sub blog.example.com

To force the SSL on a sub domain, you have to do the same as you did above

spssl sub blog.example.com force

Releases

No releases published

Packages

No packages published

Languages