This repository will not be maintained anymore!
For the past few years tools like puppet, docker, etc. have made the process of compiling from sources obsolete, IMO. Thank you all for using and contributing to this script. It will be left here for a while, so please feel free so fork this repository and to improve it as you see fit. Thank you.
This script installs the latest NginX, MySQL and PHP (with APC and Memcache extensions).
*Note APC is not yet available for PHP 5.5+.
Optionally you can install the Memcached Server and Postfix.
You can install your preferred versions for any of the programs. Just edit the OPTIONS file and change them accordingly.
It is highly recommended to run this installer on a fresh installed system.
This is tested automatically on the following distributions (i386 & amd64):
- Ubuntu Server 12.04 (Precise Pangolin)
- Ubuntu Server 13.04 (Raring Ringtail)
- Debian Server 6.0.7 (Squeeze) (amd64 only)
- Debian Server 7.1 (Wheezy) (amd64 only)
Make sure you have Git installed on your Ubuntu System:
sudo apt-get install git-core screen
Clone this repository, and get the latest stable version of this script:
git clone git://github.com/vladgh/VladGh.com-LEMP.git cd VladGh.com-LEMP
Start a screen session:
I recommend running everything inside a screen session because in case your
connection drops you can easily come back with
screen -rad. If you use
something else (ex: byobu) you can skip this step.
Take a look at the OPTIONS file. This is were you can choose to install the MySQL Server or modify the versions for any of the programs, as well as the paths.
Run the installer:
sudo bash install.sh
After the installer is finished (this will take a long time depending on your server specifications), you MUST set your mysql root password:
sudo mysqladmin -u root password 'MYPASSWORD'
You can go to your server's address and you will see the PHP info page. Also, if you go to:
- http://example.com/nginx_status - for the NginX statistics;
- http://example.com/status?html - for the FPM statistics;
- http://example.com/status.html - for the FPM real-time status page;
- http://example.com/apc.php - for the APC Cache information page.
In order to have immediate access to new paths you should also execute
source /etc/environment. This command reloads the new environment variables.
In the "ext" folder you will also find some utilities:
nxmksiteto generate a basic, but functional, vhost.
nxdissitecommands to enable or disable sites in NginX. (similar to a2ensite and a2dissite in Apache).
update_nginx.sh- upgrades or modifies NginX (
sudo ext/update_nginx.sh 1.3.2).
update_php.sh- upgrades or modifies PHP (
sudo ext/update_php.sh 5.4.4).
update_apc.sh- upgrades or modifies APC (
sudo ext/update_apc.sh 3.1.10).
- The update_* scripts above can be used to upgrade the software, or change current configure arguments.
- You can only have one argument in a strict form x.x.x.
CONFIGURE_ARGSvariable inside can be modified, but make sure the installation directory (
--prefix) is the same.
This project is still under development. Feedback and suggestions are very welcomed and I encourage you to use the Issues list on Github to provide that feedback.
Feel free to fork this repository and to commit your additions. When done, open a pull request to your feature branch.
The formatting conventions already present in these scripts are as follows:
- Unix (LF), not dos (CRLF) line endings.
- Two space indentation (GNU Style).
- Eliminate all trailing whitespace.
- Aim to wrap code at 80 characters, but favor functionality over wrapping.
- Preserve existing formatting; i.e. do not reformat code for its own sake.
If you want to report an issue you can use the tracker available at
** All content provided here including the scripts is provided without any warranty. You use it at your own risk. I can not be held responsible for any damage that may occur because of it. By using the scripts I provide here you accept this terms. **
Copyright 2013 Vlad Ghinea
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.