TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Bash Script to Install a Webserver and PHP on a Clean OS

62 点作者 __app_dev__超过 5 年前

12 条评论

digitalsushi超过 5 年前
I think this submission is great. Not necessarily because of the script itself, but because of the openness and confidence of sharing it in a public forum.<p>In this public forum, we all have some degree of visibility and an association with our professional selves. It is an easy movement to provide a competing viewpoint on the value of a new script. Many of us have highly integrated systems that can provide the same result in a line or two of very terse configuration, often with the requirement of much hidden tooling. Others simply will have feelings about specific implementations, or languages.<p>So I want to just thank you for being brave and sharing this with us, because seeing how someone else is doing it is one of the fastest ways to learn, to remember, and to grow. I did look at your script and I think it&#x27;s quite obvious you put yourself into the script, and that it was written out of a passion for technology as it was of a need. Kudos.
评论 #22108071 未加载
iDemonix超过 5 年前
This reads like an advertisement for learning Ansible, where you could achieve the same in a few lines.
评论 #22110105 未加载
评论 #22106879 未加载
__app_dev__超过 5 年前
Works on the lowest cost VM&#x27;s on AWS ($3.50 USD per month) and the site still runs fast with low memory.<p>To run download then call the script: wget <a href="https:&#x2F;&#x2F;www.fastsitephp.com&#x2F;downloads&#x2F;create-fast-site.sh" rel="nofollow">https:&#x2F;&#x2F;www.fastsitephp.com&#x2F;downloads&#x2F;create-fast-site.sh</a> sudo bash create-fast-site.sh<p>Additional Docs in multiple langugages are here: <a href="https:&#x2F;&#x2F;www.fastsitephp.com&#x2F;en&#x2F;documents&#x2F;install-php-on-linux" rel="nofollow">https:&#x2F;&#x2F;www.fastsitephp.com&#x2F;en&#x2F;documents&#x2F;install-php-on-linu...</a>
评论 #22106509 未加载
strzibny超过 5 年前
Old fashioned, but it gets the job done. In fact, I also still use Bash for deploying my side-projects on cheap virtual servers.<p>I am even writing a new book on web application deployment[0] and I deliberately chose to explain things with just Bash. By &quot;dropping&quot; to Bash this way you can see how things gets actually done.<p>You can always choose a higher level tool like Ansible later on (and at some point you will).<p>[0] <a href="https:&#x2F;&#x2F;deploymentformakers.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;deploymentformakers.com&#x2F;</a>
antoncohen超过 5 年前
Along those lines, Chef&#x27;s install.sh is the most impressive install shell script I&#x27;ve seen:<p><a href="https:&#x2F;&#x2F;omnitruck.chef.io&#x2F;install.sh" rel="nofollow">https:&#x2F;&#x2F;omnitruck.chef.io&#x2F;install.sh</a><p>It works with pure sh, not just bash. It works on Red Hat, Debian, Solaris, AIX, and macOS. It works even if curl and wget aren&#x27;t installed.
评论 #22109782 未加载
评论 #22107404 未加载
评论 #22106960 未加载
bilekas超过 5 年前
I think everyone who has ever setup a webserver or simular has built up a bilble of scripts like these! :D
评论 #22108172 未加载
nreece超过 5 年前
I used to rely on bash scripts, but now just use WordOps[1] for PHP&#x2F;MySQL and performant Nginx for it as well as Nodejs or ASP.NET Core.<p>Its made things easier to setup, configure and manage, with added performance.<p>[1] <a href="https:&#x2F;&#x2F;wordops.net" rel="nofollow">https:&#x2F;&#x2F;wordops.net</a>
评论 #22110620 未加载
AtomicOrbital超过 5 年前
cool script ... really digging this approach of cutting out the middleman and roll your own devops code without the baggage of Ansible or such ... in my current startup I initially wrote our server side from scratch then need some way to deploy from laptop onto our remote vps servers so I started simple and wrote a set of bash script to deploy our git repo, recompile the project up on vps ... since its grown into an uber script with can start from a freshly minted virgin vps box and finish with our entire site running on a set of containers with the webhook running auto kicking off a recompile&#x2F;deploy ... oh and it spins up all the ancillary servers like mongo, nginx, haproxy as well as a devops container to orchestrate the machinations as the system gurgles along post launch<p>now I&#x27;m liking this side of the shop ... devops demands a much wider girth of problem solving skills which is an evergreen role with tons of freedom and challenges
评论 #22110017 未加载
sarcasmatwork超过 5 年前
Why not just use Ansible for something like this?
评论 #22106819 未加载
评论 #22103992 未加载
评论 #22104816 未加载
lhuser123超过 5 年前
Cool script. Everything in one place.
评论 #22110187 未加载
GrumpyNl超过 5 年前
Bit old fashioned, but i still use xampp, up and running with in a minute.
smcleod超过 5 年前
After doing this sort of thing (except using mostly Ruby or Python apps) for years, then evolved to running a bunch of lightweight containerised services about 6 or so years ago and these days I mostly opt for deploying using Google Cloud Run, far less hassle, less maintenance, a significantly reduced (security) footprint and absolutely minimal cost, someone else recently wrote a good intro blogpost about their experiences with it: <a href="https:&#x2F;&#x2F;alexolivier.me&#x2F;posts&#x2F;deploy-container-stateless-cheap-google-cloud-run-serverless" rel="nofollow">https:&#x2F;&#x2F;alexolivier.me&#x2F;posts&#x2F;deploy-container-stateless-chea...</a>