0% found this document useful (0 votes)
167 views

How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack On Ubuntu 14

Ngix LEMP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views

How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack On Ubuntu 14

Ngix LEMP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

Community

Menu

Subscribe

By:JustinEllingwood

HowToInstallLinux,nginx,MySQL,PHP(LEMP)stack
onUbuntu14.04
230

PostedApr25,2014

455.5k

GettingStarted

Nginx

MySQL

PHP

Ubuntu

TutorialSeries
Thistutorialispart2of4intheseries:IntroductiontoNginxandLEMPonUbuntu14.04

Introduction
TheLEMPsoftwarestackisagroupofsoftwarethatcanbeusedtoservedynamicweb
pagesandwebapplications.ThisisanacronymthatdescribesaLinuxoperatingsystem,
withanNginxwebserver.ThebackenddataisstoredinMySQLandthedynamic
processingishandledbyPHP.

Inthisguide,wewilldemonstratehowtoinstallaLEMPstackonanUbuntu14.04server.
TheUbuntuoperatingsystemtakescareofthefirstrequirement.Wewilldescribehowto
gettherestofthecomponentsupandrunning.

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

1/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

Note:TheLEMPStackcanbeinstalledautomaticallyonyourDropletbyaddingthisscriptto

itsUserDatawhenlaunchingit.CheckoutthistutorialtolearnmoreaboutDropletUser
Data.

Prerequisites
Beforeyoucompletethistutorial,youshouldhavearegular,non-rootuseraccountonyour
serverwith

sudoprivileges.Youcanlearnhowtosetupthistypeofaccountby

completingsteps1-4inourUbuntu14.04initialserversetup.

Onceyouhaveyouraccountavailable,signintoyourserverwiththatusername.Youare
nowreadytobeginthestepsoutlinedinthisguide.

1.InstalltheNginxWebServer
Inordertodisplaywebpagestooursitevisitors,wearegoingtoemployNginx,amodern,
efficientwebserver.

AllofthesoftwarewewillbegettingforthisprocedurewillcomedirectlyfromUbuntu's
defaultpackagerepositories.Thismeanswecanusethe

aptpackagemanagementsuite

tocompletetheinstallation.

Sincethisisourfirsttimeusing

aptforthissession,weshouldstartoffbyupdatingour

localpackageindex.Wecantheninstalltheserver:

sudo apt-get update


sudo apt-get install nginx

InUbuntu14.04,Nginxisconfiguredtostartrunninguponinstallation.

Youcantestiftheserverisupandrunningbyaccessingyourserver'sdomainnameor
publicIPaddressinyourwebbrowser.

Ifyoudonothaveadomainnamepointedatyourserverandyoudonotknowyour
server'spublicIPaddress,youcanfinditbytypingoneofthefollowingintoyourterminal:

ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

2/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

111.111.111.111
fe80::601:17ff:fe61:9801

Oryoucouldtryusing:

curl http://icanhazip.com

111.111.111.111

Tryoneofthelinesthatyoureceiveinyourwebbrowser.ItshouldtakeyoutoNginx's
defaultlandingpage:

http://server_domain_name_or_IP

Ifyouseetheabovepage,youhavesuccessfullyinstalledNginx.

2.InstallMySQLtoManageSiteData
Nowthatwehaveawebserver,weneedtoinstallMySQL,adatabasemanagement
system,tostoreandmanagethedataforoursite.

Youcaninstallthiseasilybytyping:

sudo apt-get install mysql-server

Youwillbeaskedtosupplyaroot(administrative)passwordforusewithintheMySQL
system.

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

3/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

TheMySQLdatabasesoftwareisnowinstalled,butitsconfigurationisnotexactlycomplete
yet.

First,weneedtotellMySQLtogeneratethedirectorystructureitneedstostoreits
databasesandinformation.Wecandothisbytyping:

sudo mysql_install_db

Next,you'llwanttorunasimplesecurityscriptthatwillpromptyoutomodifysome
insecuredefaults.Beginthescriptbytyping:

sudo mysql_secure_installation

YouwillneedtoentertheMySQLrootpasswordthatyouselectedduringinstallation.

Next,itwillaskifyouwanttochangethatpassword.IfyouarehappywithyourMySQLroot
password,type"N"fornoandhit"ENTER".Afterwards,youwillbepromptedtoremove

Signupforournewsletter.

sometestusersanddatabases.Youshouldjusthit"ENTER"throughthesepromptsto

GetthelatesttutorialsonSysAdminandopensourcetopics.
removetheunsafedefaultsettings.

Enteryouremailaddress
Oncethescripthasbeenrun,MySQLisreadytogo.

SignUp

3.InstallPHPforProcessing

SCROLLTOTOP

NowwehaveNginxinstalledtoserveourpagesandMySQLinstalledtostoreandmanage
ourdata,butwestillneedsomethingtoconnectthesetwopiecesandtogenerate
dynamiccontent.WecanusePHPforthis.

SinceNginxdoesnotcontainnativePHPprocessinglikesomeotherwebservers,wewill
needtoinstall

php5-fpm,whichstandsfor"fastCGIprocessmanager".WewilltellNginx

topassPHPrequeststothissoftwareforprocessing.

Wecaninstallthismoduleandwillalsograbanadditionalhelperpackagethatwillallow
PHPtocommunicatewithourdatabasebackend.Theinstallationwillpullinthenecessary
PHPcorefiles.Dothisbytyping:

sudo apt-get install php5-fpm php5-mysql

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

4/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

ConfigurethePHPProcessor
WenowhaveourPHPcomponentsinstalled,butweneedtomakeaslightconfiguration
changetomakeoursetupmoresecure.

Openthemain

php5-fpmconfigurationfilewithrootprivileges:

sudo nano /etc/php5/fpm/php.ini

Whatwearelookingforinthisfileistheparameterthatsets

cgi.fix_pathinfo.Thiswill

becommentedoutwithasemi-colon(;)andsetto"1"bydefault.

ThisisanextremelyinsecuresettingbecauseittellsPHPtoattempttoexecutetheclosest
fileitcanfindifaPHPfiledoesnotmatchexactly.Thisbasicallywouldallowuserstocraft
PHPrequestsinawaythatwouldallowthemtoexecutescriptsthattheyshouldn'tbe
allowedtoexecute.

Wewillchangebothoftheseconditionsbyuncommentingthelineandsettingitto"0"like

Signupforournewsletter.

this:

GetthelatesttutorialsonSysAdminandopensourcetopics.

cgi.
fix_pathinfo=0
Enteryouremailaddress

SignUp

Saveandclosethefilewhenyouarefinished.
SCROLLTOTOP

Now,wejustneedtorestartourPHPprocessorbytyping:

sudo service php5-fpm restart

Thiswillimplementthechangethatwemade.

4.ConfigureNginxtoUseourPHPProcessor
Now,wehavealloftherequiredcomponentsinstalled.Theonlyconfigurationchangewe
stillneedtodoistellNginxtouseourPHPprocessorfordynamiccontent.

Wedothisontheserverblocklevel(serverblocksaresimilartoApache'svirtualhosts).
OpenthedefaultNginxserverblockconfigurationfilebytyping:

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

5/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

sudo nano /etc/nginx/sites-available/default

Currently,withthecommentsremoved,theNginxdefaultserverblockfilelookslikethis:

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
}

Weneedtomakesomechangestothisfileforoursite.

index.phpoptionasthefirstvalueofour indexdirectiveto

Signupforournewsletter.
First,weneedtoaddan

GetthelatesttutorialsonSysAdminandopensourcetopics.
allowPHPindexfilestobeservedwhenadirectoryisrequested.

Wealsoneedtomodifythe
Enteryouremailaddress

server_namedirectivetopointtoourserver'sdomain

SignUp

nameorpublicIPaddress.

Theactualconfigurationfileincludessomecommentedoutlinesthatdefineerror
SCROLLTOTOP

processingroutines.Wewilluncommentthosetoincludethatfunctionality.

FortheactualPHPprocessing,wewillneedtouncommentaportionofanothersection.
Wewillalsoneedtoadda

try_filesdirectivetomakesureNginxdoesn'tpassbad

requeststoourPHPprocessor.

Thechangesthatyouneedtomakeareinredinthetextbelow:

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.php index.html index.htm;
server_name server_domain_name_or_IP;
location / {
https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

6/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

try_files $uri $uri/ =404;


}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

Whenyou'vemadetheabovechanges,youcansaveandclosethefile.

RestartNginxtomakethenecessarychanges:

Signupforournewsletter.

GetthelatesttutorialsonSysAdminandopensourcetopics.

sudo service nginx restart


Enteryouremailaddress

SignUp

5.CreateaPHPFiletoTestConfiguration
SCROLLTOTOP

YourLEMPstackshouldnowbecompletelysetup.Westillshouldtesttomakesurethat
Nginxcancorrectlyhand

.phpfilesofftoourPHPprocessor.

WecandothisbycreatingatestPHPfileinourdocumentroot.Openanewfilecalled

info.phpwithinyourdocumentrootinyourtexteditor:

sudo nano /usr/share/nginx/html/info.php

Wecantypethisintothenewfile.ThisisvalidPHPcodethatwillreturnformatted
informationaboutourserver:

<?php
phpinfo();
?>

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

7/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

Whenyouarefinished,saveandclosethefile.

Now,youcanvisitthispageinyourwebbrowserbyvisitingyourserver'sdomainnameor
publicIPaddressfollowedby

/info.php:

http://server_domain_name_or_IP/info.php

YoushouldseeawebpagethathasbeengeneratedbyPHPwithinformationaboutyour
server:

Signupforournewsletter.
GetthelatesttutorialsonSysAdminandopensourcetopics.

Enteryouremailaddress

SignUp

SCROLLTOTOP

Ifyouseeapagethatlookslikethis,you'vesetupPHPprocessingwithNginxsuccessfully.

Afteryoutestthis,it'sprobablybesttoremovethefileyoucreatedasitcanactuallygive
unauthorizeduserssomehintsaboutyourconfigurationthatmayhelpthemtrytobreakin.

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

8/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

Youcanalwaysregeneratethisfileifyouneeditlater.

Fornow,removethefilebytyping:

sudo rm /usr/share/nginx/html/info.php

Conclusion
YoushouldnowhaveaLEMPstackconfiguredonyourUbuntu14.04server.Thisgivesyou
averyflexiblefoundationforservingwebcontenttoyourvisitors.

ByJustinEllingwood

Author:
JustinEllingwood

Signupforournewsletter.
GetthelatesttutorialsonSysAdminandopensourcetopics.

Enteryouremailaddress

SignUp

TutorialSeries
IntroductiontoNginxandLEMPonUbuntu14.04
SCROLLTOTOP
ThistutorialserieshelpssysadminssetupanewwebserverusingtheLEMPstack,
focusingonNginxsetupwithvirtualblocks.Thiswillletyouservemultiplewebsites
fromoneDroplet.You'llstartbysettingupyourUbuntu14.04serverandendwith
multiplevirtualblockssetupforyourwebsites.AnNginxconfigurationguideis
includedattheendforreference.

InitialServerSetupwithUbuntu14.04

HowToInstallLinux,nginx,MySQL,PHP(LEMP)stackonUbuntu

HowToSetUpNginxServerBlocks(VirtualHosts)onUbuntu

April17,2014

April25,2014

14.04

April25,2014

14.04LTS

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

9/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

UnderstandingtheNginxConfigurationFileStructureand

November18,2014

ConfigurationContexts

SpinupanSSDcloudserverinunderaminute.
Simplesetup.Fullrootaccess.
Straightforwardpricing.

DEPLOYSERVER

Signupforournewsletter.

RelatedTutorials

HowToUseFilezillatoTransferandManageFilesSecurelyonyourVPS
GetthelatesttutorialsonSysAdminandopensourcetopics.
ConfigurationManagement101:WritingChefRecipes
Enteryouremailaddress

SignUp
HowToSetUpNginxServerBlocks(VirtualHosts)onUbuntu16.04

InitialServerSetupwithUbuntu16.04
SCROLLTOTOP

ConfigurationManagement101:WritingPuppetManifests

121Comments

Leaveacomment...

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

10/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

Loggedinas:

Notifymeofreplies
tomycomment

Comment

rich636856 April25,2014

StepFour:

Thelocationblockprovidedresultsinerror:
nginx:[emerg]unknowndirective"fast_cgi_split_path_info"in/etc/nginx/sitesenabled/default:56

Needtoremovetheunderscorebetweenfastandcgi:
fastcgi_split_path_info^(.+\.php)(/.+)$;

rich636856 April25,2014

StepTwoIinstalledmysql-server-5.6,whenIrunthemysql_install_dbcommandIgetthe

followingerror:

user@host:~$sudomysql_install_db
FATALERROR:Couldnotfindmy-default.cnf

Signupforournewsletter.

Ifyoucompiledfromsource,youneedtorun'makeinstall'to
copythesoftwareintothecorrectlocationreadyforoperation.
GetthelatesttutorialsonSysAdminandopensourcetopics.

Ifyouareusingabinaryrelease,youmusteitherbeatthetop
Enteryouremailaddress

SignUp

leveloftheextractedarchive,orpassthe--basediroption
pointingtothatlocation.

SCROLLTOTOP

AnyideawhatDirIshouldberunningthisfromorwhat--basediroptiontouse?

arturkohut November23,2014

Ihavethesameissuewheninstallingmysql-server-5.6onfreshinstalledubuntu14.04.

andrewdavidtanner87 April27,2014

Brillianttutorial,thanksJustin!

ReallyinformativeandI'mveryhappyyouexplainedwhateveryconfigurationmeans
exactly.

Goodwork:)

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

11/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

davidprimadi April28,2014

Hii..
howtoinstallwordpresswithnginxonubuntu14.04?
anytutorialhere?
caniusethistutorial:https://www.digitalocean.com/community/articles/how-to-installwordpress-with-nginx-on-ubuntu-12-04?

asb

MOD

April28,2014

@davidprimadi:Itshouldbemoreorlessthesameon14.04ason12.04.Letusknowhowit
goes!

davidprimadi April28,2014

it'swork!

Signupforournewsletter.
asb

MOD April28,2014
GetthelatesttutorialsonSysAdminandopensourcetopics.

Great!Gladtohearit.
Enteryouremailaddress

SignUp

brandon- April28,2014

SCROLLTOTOP

Instep5ofthe12.04LEMPinstalltutorial,theinstructionsstatetomakethefollowing
changeinthe/etc/php5/fpm/pool.d/www.conf:

change:listen=127.0.0.1:9000tolisten=/var/run/php5-fpm.sock

HoweverinStep3this14.04tutorialwearenotinstructedtodoso.Anyreasonwhy?

asb

MOD

April28,2014

@brandon:

In14.04,php5-fpmdefaultstousingthesocketfileinsteadofcommunicatingover
127.0.0.1:9000.Sothereasonyoudon'tneedtochangeitisbecauseitshouldalreadyread
"listen=/var/run/php5-fpm.sock"

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

12/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean
ajgarciaba May1,2014

Great!!It'sworks!!Congrats!!

donovan May4,2014

HiIgetthiserrorwhenItrystartngninxanyideas?

2014/05/0414:10:57[emerg]4272#0:"fastcgi_pass"directiveisduplicatein/etc/nginx/sitesenabled/default:62

netabare93 January12,2016

Pleasecheckyour/etc/nginx/sites-enabled/defaultandlocatetoline62around,

youwillfindsomethinglike

# With php5-cgi alone:


fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:

Signupforournewsletter.

fastcgi_pass unix:/var/run/php5-fpm.sock;

fastcgi_index index.php;

GetthelatesttutorialsonSysAdminandopensourcetopics.

include fastcgi_params;
Enteryouremailaddress

SignUp

Thencommentthefirstcasewithphp5-cgialonesincephp5-fpmisalreadyinstalled.
Icamewiththesameproblem.Hopethiscouldhelpyou.
SCROLLTOTOP

donovan May4,2014

nevermindgotit

maisdotsolutions May10,2014

Hi,

Excusemeformyignorance,butIhaveaproblem.IamusingUbuntu14.04andjustcreate
it.

In"StepTwo-InstallMySQLDatatoManageSite",appearsthisWarning:

14051018:00:33[Warning]Usinguniqueoptionprefixkey_bufferinsteadofkey_buffer_size
isdeprecatedandwillberemovedinafuturerelease.Pleaseusethefullnameinstead.

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

13/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

Soonafter,instep"sudomysql_install_db"appears:

InstallingMySQLsystemtables...
14051018:01:58[Warning]Usinguniqueoptionprefixkey_bufferinsteadofkey_buffer_size
isdeprecatedandwillberemovedinafuturerelease.Pleaseusethefullnameinstead.
OK
Fillinghelptables...
14051018:01:58[Warning]Usinguniqueoptionprefixkey_bufferinsteadofkey_buffer_size
isdeprecatedandwillberemovedinafuturerelease.Pleaseusethefullnameinstead.
OK
Tostartmysqldatboottimeyouhavetocopy
support-files/mysql.servertotherightplaceforyoursystem
PLEASEREMEMBERTOSETAPASSWORDFORTHEMySQLrootUSER!
Todoso,starttheserver,thenissuethefollowingcommands:
/usr/bin/mysqladmin-urootpassword'new-password'
/usr/bin/mysqladmin-uroot-hMaisSolutionspassword'new-password'
Alternativelyyoucanrun:
/usr/bin/mysql_secure_installation
whichwillalsogiveyoutheoptionofremovingthetest
databasesandanonymoususercreatedbydefault.Thisis
stronglyrecommendedforproductionservers.

Signupforournewsletter.

Seethemanualformoreinstructions.
GetthelatesttutorialsonSysAdminandopensourcetopics.
Y
oucanstarttheMySQLdaemonwith:
cd/usr;/usr/bin/mysqld_safe&
Enteryouremailaddress

YoucantesttheMySQLdaemonwithmysql-test-run.pl

SignUp

cd/usr/mysql-test;perlmysql-test-run.pl
Pleasereportanyproblemsathttp://bugs.mysql.com/
SCROLLTOTOP

Whatcanbe?Doyouhaveasolution?Thankyouverymuch!

Bestregards,
LeandroNaves

kamaln7

MOD

May12,2014

@maisdotsolutions:That'sfine,it'sjusttellingyouthat

/etc/mysql/my.cnfhasa

deprecatedoption,"key_buffer",whichwillberemovedinalaterversionofMySQL.Justto
besafe,edit

/etc/mysql/my.cnfandreplace key_bufferwith key_buffer_size:

sudo nano /etc/mysql/my.cnf

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

14/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean
adsf May12,2014

installationofmysqlproducedthefollowingerror
[Warning]Usinguniqueoptionprefixkey_bufferinsteadofkey_buffer_sizeisdeprecated
andwillberemovedinafuturerelease.Pleaseusethefullnameinstead.

whatshouldido?

adsf May12,2014

Inanothertutorialhttps://www.digitalocean.com/community/articles/how-to-install-nginx-onubuntu-14-04-lts
yousay

Wecanmakesurethatourwebserverwillrestartautomaticallywhentheserveris
rebootedbytyping:

sudoupdate-rc.dnginxdefaults

Soisthisstepneededornot?

Signupforournewsletter.

GetthelatesttutorialsonSysAdminandopensourcetopics.

kamaln7

MOD May13,2014
Enteryouremailaddress

SignUp

@asdf:

installationofmysqlproducedthefollowingerror[Warning]Usingunique
optionprefixkey_bufferinsteadofkey_buffer_sizeisdeprecatedand
SCROLLTOTOP
willberemovedinafuturerelease.Pleaseusethefullnameinstead.

Takealookatmyresponsetomaisdotsolutionsrightaboveyourcomment.

Soisthisstepneededornot?

Youdon'thavetorunit,butyoucanrunittomakesurenginxstartsonboot,whichitshould
dobydefault.

jasonmbaumgartner May20,2014

ThisisareallyniceandconciseguidetogettingupandrunningwithabasicLEMPstack.
ThereisonesuggestionIwouldliketomake,though.

Whenmakingchangestothenginxconfigurationfile,itisnotnecessarytorestartthenginx
service.Insteadofrunningthecommand"sudoservicenginxrestart",youcansimplyreload
theconfigurationwiththiscommand:

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

15/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean
nginx-sreload

It'sasmallminorpoint,butsomepeoplemayfindithelpfuliftheydon'twanttohavethe
servicestoppedevenifitistemporarily.

Greatguide!

kradllit May26,2014

AwesomeTutorial!Tnx!

servidigitalneiva June2,2014

Ifollowtheguide,butIgotophpmyadminthrowsa404,asitwouldsolve.
thanks

Signupforournewsletter.
GetthelatesttutorialsonSysAdminandopensourcetopics.
LoadMoreComments

Enteryouremailaddress

SignUp

SCROLLTOTOP

ThisworkislicensedunderaCreative
CommonsAttribution-NonCommercialShareAlike4.0InternationalLicense.

Copyright2016DigitalOceanInc.

Community

Distros&One-ClickApps

Tutorials

Questions

Projects

Terms,Privacy,&Copyright

Tags

Security

Newsletter

RSS

ReportaBug

GetPaidtoWrite

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

16/17

7/20/2016

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean

Signupforournewsletter.
GetthelatesttutorialsonSysAdminandopensourcetopics.

Enteryouremailaddress

SignUp

SCROLLTOTOP

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

17/17

You might also like