At line 1 changed one line |
Every linux distro is slightly different. This guide is intended to cover the basics and show you around some of the ways you can configure and work with CrushFTP. |
Every linux distro is slightly different. This guide is intended to cover the basics and show you around some of the ways you can configure and work with CrushFTP. You can try the single line in Linux for an automated download and install...may work on most distros.\\ |
{{{ |
wget -O - https://www.crushftp.com/crush11wiki/attach/Linux%20Install/configure.sh | bash |
}}} |
At line 7 changed one line |
First, make sure Java is installed properly. By default most linux distros come with an open source version of Java that may not work with CrushFTP. Make sure its an official OpenJDK java, or other suitable JVM. |
CrushFTP11 requires Java 17+ to run. First, check if there is a Java/OpenJDK 17+ runtime available on the host, by default most linux distros come with an open source version of Java that may not work with CrushFTP. If there is none, download the latest OpenJDK tarball for your OS platform ( AMD64 or ARM) from [https://jdk.java.net/archive/|https://jdk.java.net/archive/], untar it into the CrushFTP11 installation folder then rename the resulting jdk-21 folder to Java |
At line 12 added one line |
|
At line 13 changed 3 lines |
If it mentions GNU, it is not the right one. |
|
To run Java, you may need to specify the full path to the java binary. Something possibly like /usr/java/jre1.5.0_11/bin/java. Its going to depend on where you installed it. |
If it is the wrong version\\ |
{{{ |
wget https://download.java.net/java/GA/jdk21.0.1/415e3f918a1f4062a0074a2794853d0d/12/GPL/openjdk-21.0.1_linux-aarch64_bin.tar.gz |
tar -xvf openjdk-21.0.1_linux-aarch64_bin.tar.gz |
/bin/rm openjdk-21.0.1_linux-aarch64_bin.tar.gz |
mv jdk-21* /var/opt/CrushFTP11/Java |
}}} |
Then check if the init script detected it, run from within the CrushFTP11 installation the |
{{{ |
./crushftp_init.sh info |
}}} |
command.\\ |
At line 31 added 2 lines |
Extract CrushFTP folder ideally into /var/opt/ so it's an easier approach if you have issues finding it over time. |
|
At line 40 added 8 lines |
__Install / Uninstall CrushFTP__ |
|
There is a script provided to give you the automated process supported on most Linux distro's of installing and uninstalling CrushFTP. The script is crushftp_init.sh. |
|
{{{./crushftp_init.sh install |
./crushftp_init.sh uninstall}}} |
|
|
At line 29 changed one line |
To make your user for doing this, use a command like this: |
To make your user for doing this, use a command like this (avoid special characters in the comamnd line password creation): |
At line 57 added 4 lines |
or |
{{{ |
./Java/bin/java -jar CrushFTP.jar -a "crushadmin" "password" |
}}} |
At line 45 changed one line |
[QuickStart (QuickTime)|http://www.crushftp.com/movies/quickstart_headless_i.mov] | [QuickStart (Flash)|http://www.crushftp.com/movies/quickstart_headless_i.flv] |
[Install Video|http://www.crushftp.com/videos/linux_install.mp4] | [Quick Start Video|http://www.crushftp.com/videos/quick_start.mp4]\\ |
At line 47 removed 3 lines |
|
[User Setup (QuickTime)|http://www.crushftp.com/movies/quickstart_user_i.mov] | [User Setup (Flash)|http://www.crushftp.com/movies/quickstart_user_i.flv] |
|
At line 55 changed one line |
sudo nohup java -Dcrushftp.version=5 -jar CrushFTP.jar -d& |
sudo nohup java -jar CrushFTP.jar -d& |
At line 119 added 81 lines |
__Running as non-root (not recommanded)__ |
\\ |
\\ |
|
This method details how to run from rc.local on a systemd init based Linux flavor. Running as a non-root user won't allow binding to ports below 1024, will need to use NAT or port rewrite rules in iptables to be able to server on IANA defined well known ports. |
\\ |
\\ |
Running crush in user mode as "crushftp" system user, by adding below lines into rc.local (generic method)\\ |
\\ |
{{{ |
su - crushftp -c '/var/opt/CrushFTP11/crushftp_init.sh start' |
exit 0 |
}}} |
\\ |
This may be required in case daemon mode doesn't output to nohup.out, in this case modify the init script as |
\\ |
{{{ |
$NOHUP $JAVA -Ddir=$CRUSH_DIR -Xmx384M -jar plugins/lib/CrushFTPJarProxy.jar -d 2>>nohup.out & |
|
}}} |
\\ |
\\ |
Running in user mode on systemd RHEL 7/8 family Linux\\ |
\\ |
First in crushftp_init.sh will need to set the user as "crushftp" ( or whatever non-root user) then allow rc-local.service to be able to run ( needed for compatibility mode, non root user) |
\\ |
{{{ |
touch /etc/systemd/system/rc-local.service |
vi /etc/systemd/system/rc-local.service |
}}} |
\\ |
paste into below |
\\ |
{{{ |
[Unit] |
Description=/etc/rc.local Compatibility |
ConditionPathExists=/etc/rc.local |
|
[Service] |
Type=forking |
ExecStart=/etc/rc.local start |
TimeoutSec=0 |
StandardOutput=tty |
RemainAfterExit=yes |
SysVStartPriority=99 |
|
[Install] |
WantedBy=multi-user.target |
|
}}} |
\\ |
|
then edit /etc/rc.local |
\\ |
{{{ |
vi /etc/rc.local |
}}} |
\\ |
add in |
\\ |
{{{ |
su crushftp /var/opt/CrushFTP11/crushftp_init.sh start |
exit 0 |
}}} |
\\ |
then make it executable |
\\ |
{{{ |
chmod +x /etc/rc.local |
}}} |
\\ |
then install the rc.local service |
\\ |
{{{ |
systemctl enable rc-local.service |
}}} |
\\ |
reboot, check if OK |
\\ |
\\ |
\\ |