LAMP installer for ubuntu
The lampi script can install the required packages automatically and setup LAMP for you. It can also be used to create custom sites (both http and https) on localhost.
The installation is only for Ubuntu, other functionality (like setting up custom sites) are available for other Linux flavors as well
lampi is a single script. You can install it or run it from anywhere by specifying its path. This is how you can install it:
sudo chmod +x install.sh sudo ./install.sh
i.e just give the install.sh file execution permission and run it, or you can manually copy the lampi script to a standard bin (e.g /usr/local/bin) directory and assign execution permission to it.
sudo lampi -i
sudo lampi -i -s
sudo lampi -n site-name -dr document-root, where
site-nameis the desired name of the local site and
document-rootis the directory where you want to create this site.
sudo lampi -n site-name -dr document-root -s
To create a site named example.com.local in ~/example, run the following:
sudo lampi -s -n example.com.local -dr ~/example
The above command will create a site (with both http and https) in ~/example (/home/user/example) directory. The site will be accessible through the URLs: http://example.com.local and https://example.com.local
For https site you will have to add exception to your browser for the SSL certificate
If you haven't installed the LAMP yet, then just add a
-i flag to the above command:
sudo lampi -i -s -n example.com.local -dr ~/example
On amazon aws ec2 ubuntu server instance, you can setup your LAMP server pretty easily:
git clone https://github.com/neurobin/lampi cd lampi sudo ./install.sh
Now to install LAMP, run
sudo lampi -i
sudo lampi -i -n mydomain.com -dr /var/www/mydomain.com -nip
The above will install LAMP stack and create a website named
mydomain.com in /var/www/mydomain.com (the
-nip option is required if you want to expose the site publicly)
lampi [-n, -dr, -i, -ri, -u, -s, -so, -rm, -rmd, -nfo, -nsr, -nip, -f -nu, -v, -h]
|-n [name]||--name [name]||server name (default localhost)|
|-dr [path]||--doc-root [path]||arbitrary document root|
|-rm [name]||--remove [name]||remove a site|
|-rmd [name]||--remove-with-dir [name]||remove a site and it's directory|
|-nu||--no-update||do not run apt-get update|
|-so||--ssl-only||configure for https site only|
|-npa||--no-php-myadmin||no php my admin|
|-nfo||--no-info||do not create info.php|
|-nsr||--no-server-restart||no server restart|
|-nip||--no-ip||no ip, i.e use * instead of 127.0.0.1|
|-v||--version||show version info|
apt-get purgei.e it will remove LAMP as well as its configuration.
If you are a developer, you can consider contributing to this project by forking this repository and making changes for better and do a pull request, or sharing ideas and suggestions or finding bugs, anything at all, what you think will be beneficial for this project.
If you aren't a developer, but still want to contribute, then you can support the contributing developers spiritually, by starring the repository and/or sharing ideas. If you want to be notified of the continuous development, you can add this in your watch list in Github.
If you see any problems or bugs please open an issue here
Copyright © 2016, Neurobin, All rights reserved.