1<!DOCTYPE HTML> 2 3<!-- 4Strata by HTML5 UP 5html5up.net | @n33co 6Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 7--> 8<html> 9 <head> 10 <title>Setting up Laravel on Dreamhost VPS. · bluesoul [dot] net</title> 11 <meta charset="utf-8" /> 12 <meta name="viewport" content="width=device-width, initial-scale=1" /> 13 <meta name="author" content="bluesoul"> 14 <meta name="description" content="A blog about information security and systems administration and management."> 15 <meta http-equiv="content-language" content="en-us" /> 16 17 <meta name="generator" content="Hugo 0.17" /> 18 19 <!--[if lte IE 8]>
19<script src='{{ .Site.BaseURL }}js/ie/html5shiv.js'></script>
19<![endif]--> 20 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" type="text/css"> 21 <link href='https://d33wubrfki0l68.cloudfront.net/css/4f1a07caa1cedb8bec8e7d12c5f2bfece251e377/css/main.css' rel='stylesheet'/> 22 <!--[if lte IE 8]><link rel='stylesheet' href='{{ .Site.BaseURL }}/css/ie8.css' /><![endif]--> 23 24 25 </head> 26 27 <body id="top"> 28 <!-- Header --> 29<header id="header"> 30 <a href="/" class="image avatar"><img src="https://d33wubrfki0l68.cloudfront.net/8571b84e5a298c8bf45a097ade57d8b0c0916182/80688/images/avatar.jpg" alt="" /></a> 31 32 <h1>I’m a CTO, former sysadmin and occasional malware researcher and rabbit-hole spelunker. I’m not here to sell anything.</h1> 33 34 35 36 <nav id="sidebar"> 37 <ul> 38 39 <li><a href="/">Home</a></li> 40 41 <li><a href="/about">About</a></li> 42 43 <li><a href="/practical-malware-analysis-starter-kit">Practical Malware Analysis Starter Kit</a></li> 44 45 <li><a href="/post/">Blog</a></li> 46 47 </ul> 48 </nav> 49 50</header> 51 52 53 <!-- Main --> 54 <div id="main"> 55 56 <span> 57 <h1>Setting up Laravel on Dreamhost VPS.</h1> 58 59 60<i class="fa fa-calendar"></i> 61<time datetime="2018-01-02 12:59:12 -0700 -0700">2018-01-02</time> 62 63 64 65 66 67 68 </span> 69 70 <p> 71 72 73<p>I inevitably google these things in advance so here’s my chance to pay it forward. The good news is it’s incredibly easy.</p> 74 75<h2 id="set-up-php-7-1-as-the-command-line-binary">Set up PHP 7.1 as the command-line binary:</h2> 76 77<ol> 78<li>Create a fully-hosted, choosing your VPS as the destination server. By default it’s going to set the web directory to <code>/home/username/{domain}</code> and you’ll want to append <code>/public</code> to the end of that. Use (or create) a user with <strong>shell</strong> access, the default is SFTP only. Make sure you set the PHP version to 7.0 or 7.1 if you’re using Laravel 5.3 or later. I’m using 7.1 for these examples.</li> 79<li>That’ll take 5 or 10 minutes to get set up, and then it’ll email you with the address to use to SSH in.</li> 80<li>If you do a <code>php -v</code> you’ll notice that 5.6 is the default binary used (at the time of this writing). Change it to 7.1 by doing the following:<br /> 81<code>export PATH=/usr/local/php71/bin:$PATH</code><br /> 82<code>. ~/.bash_profile</code><br /></li> 83</ol> 84 85<p>Now your <code>php -v</code> should show 7.1.</p> 86 87<h2 id="enable-phar">Enable PHAR:</h2> 88 89<ol> 90<li><code>nano ~/.php/7.1/phprc</code><br /></li> 91<li>Add the following 2 lines and save:<br /></li> 92</ol> 93 94<pre><code>extension = phar.so 95suhosin.executor.include.whitelist = phar 96</code></pre> 97 98<h2 id="install-composer">Install Composer:</h2> 99 100<ol> 101<li><code>mkdir -p ~/.php/composer</code></li> 102<li><code>cd ~/.php/composer/</code></li> 103<li><code>curl -sS https://getcomposer.org/installer | php</code></li> 104<li><code>mv composer.phar composer</code></li> 105<li><code>chmod +x composer</code></li> 106<li><code>export PATH=~/.php/composer:$PATH</code></li> 107</ol> 108 109<h2 id="install-laravel">Install Laravel:</h2> 110 111<ol> 112<li><code>rm ~/{domain}/*</code> (Composer won’t install anything to a non-empty directory.)</li> 113<li><code>cd ~</code></li> 114<li><code>composer create-project --prefer-dist laravel/laravel {domain}</code></li> 115</ol> 116 117<p>Composer will then do its thing and after a little while, you’ll be finished. Check your website and you should see the Laravel splash screen.</p> 118 119 </p> 120 121 <div id="disqus_thread"></div>
122<script type="text/javascript"> 123 var disqus_shortname = 'bluesoul-net'; 124 var disqus_identifier = '\/post\/setting-up-laravel-on-dreamhost-vps\/'; 125 var disqus_title = 'Setting up Laravel on Dreamhost VPS.'; 126 var disqus_url = '\/post\/setting-up-laravel-on-dreamhost-vps\/'; 127 128 (function() { 129 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; 130 dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; 131 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); 132 })(); 133</script>
133 134<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> 135<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> 136 137 </div> 138 139 <!-- Footer --> 140<footer id="footer"> 141 <ul class="icons"> 142 143 144 145 <li><a href="//twitter.com/bluesouldotme" target="_blank" class="icon fa-twitter"><span class="label">Twitter</span></a></li> 146 147 148 <li><a href="//github.com/pxdnbluesoul" target="_blank" class="icon fa-github"><span class="label">Github</span></a></li> 149 150 151 152 153 154 <li><a href="/#contact-form" class="icon fa-envelope-o"><span class="label">Email</span></a></li> 155 156 </ul> 157 158 <ul class="copyright"> 159 160 <li>© bluesoul.net</li> 161 162 <li>Design: <a href="//html5up.net">HTML5 UP</a></li> 163 164 <li>Images: Bluesoul Photography</li> 165 166 </ul> 167</footer> 168 169<!-- Scripts -->
170<script src='https://d33wubrfki0l68.cloudfront.net/bundles/c7517b1a1d09568af32dfaaedffe600aa1f03235.js'></script>
170 171 172 173 174 175 176 </body> 177</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.