There isn't an obvious security issue with the script, but it is best practice to create the user & run it with sudo.
A Flarum Installation Guide For Dummies And The Truly Clueless
De we need to install the lamp stack first?
- Edited
ron_jeremy Click on One-click Apps and select LAMP on 14.04.
I suggest using LAMP on 16.04 now.
TorchPE
I use this script by @webeindustry
https://raw.githubusercontent.com/webeindustry/flarumvpsinstallscript/patch-1/script
Example install from fresh Ubuntu.
sudo apt-get install wget
wget https://raw.githubusercontent.com/webeindustry/flarumvpsinstallscript/patch-1/script
sudo chmod +x script
sudo ./script
This is the xteenth time I have suggested this. Hence why it's important to use this forums search feature and google.
0E800 When I wrote that script, it was intended to be a harsh "get it working and flee" type of script.
That is, after running it once you probably should not run it again. It definitely doesn't know how to clean up after itself should you want to remove a site and there's no way to set up a site without installing everything it doesn't need.. etc. Of course prior to this, a install script did not exist.
@webeindustry improved on it, but the whole structure is poor (my fault again)
I consider the flarum management script to be replacement for it and allows for many other things to happen (installing, removing, ssl on-demand, etc) as well as separating functions (you don't need to install everything after the first time, so no reason to re-run that part). It's also much easier to add extra features and support for other OS's.
0E800 This is the xteenth time I have suggested this. Hence why it's important to use this forums search feature and google.
True, but things do become out-dated, even if currently functional ?
[deleted]
Aesahaettr unfortunately you can no longer just upload and unzip
[deleted]
Sapioit nope ??
I suggest vultr, you get exactly what is available at Digital Ocean at half the price. The $5/month plan gives you 1gb ram
Please note : I am in the no way related to vultr, just making my recommendations.
- Edited
Anyone like a more advanced gist for server setup?
I have a more up-to-date one here, but misses the steps of setting up passwordless auth for a sudo user
Chope Ubuntu 16.04 LTS.
Interesting, I just now spun up a instance of Ubuntu 16.04 LTS on DO and ran it, it works fine?
./flarum_management -if ipaddr
As for The 'sudo service nginx restart' returns nothing.
- it's not supposed to.
It kills the current nginx and starts it anew. You can see this with ps -fC nginx
user@ubuntu-1gb-sfo2-01:~$ ps -fC nginx
UID PID PPID C STIME TTY TIME CMD
root 13958 1 0 14:00 ? 00:00:00 nginx: master process /usr/sbin/
www-data 13959 13958 0 14:00 ? 00:00:00 nginx: worker process
user@ubuntu-1gb-sfo2-01:~$ sudo service nginx restart
user@ubuntu-1gb-sfo2-01:~$ ps -fC nginx
UID PID PPID C STIME TTY TIME CMD
root 13980 1 0 14:00 ? 00:00:00 nginx: master process /usr/sbin/
www-data 13981 13980 0 14:00 ? 00:00:00 nginx: worker process
After running, the kernel killed the master and worker (13958 and 13959) and started new ones assigned to 13980 and 13981.
In any case, you are free to:
By doing either of the above, we will be able to keep this thread on topic ?
ok, I am just worried why it wasn't showing 'server restarting ...' like other versions.
I am curious since it's now showing anything, how will you know when you have an error as a result of bad server configuration?
- Edited
Chope I am curious since it's now showing anything, how will you know when you have an error
A successful restart yields no message but a error certainly will.
My script runs with set -e
, so any unexpected failures will cause the script to immediately stop.
Additionally, every call to nginx to reload or restart calls either nginx -t
or service nginx configtest
. If that runs successfully, it will then restart it.
This helps prevent downtime by checking for issues prior to loading the config.
why it wasn't showing 'server restarting
It would not be hard to echo out such a statement, however there are cases where it is needed to restart it more then once during the install (automatically configuring ssl is a good example)
I'll try tutorial. This is more understandable as compared to that being placed in the installation page.