Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
sh
configure.sh 0.9 kB 10 22-May-2024 06:33 Ben Spink

This page (revision-49) was last changed on 16-Apr-2024 14:42 by Ada Csaba

This page was created on 05-Dec-2023 05:32 by Ben Spink

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed 2 lines
Linux Instructions
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 4 changed 2 lines
Java
First, make sure Java is installed properly. By default most linux distros come with a free version of Java that won't work with CrushFTP. Make sure its an official Sun java, or other suitable JVM.
__Java__
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 7 changed 6 lines
java -version
If it mentions GNU, its 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.
Starting CrushFTP
The key here is making sure you are in the CrushFTP directory (so its the working directory), and using the "-d" option to start in daemon mode. If you are not in the right directory when you start CrushFTP, it will start generating a new prefs.xml file and users folder from the new location where you started it.
sudo java -jar CrushFTP.jar -d
{{{java -version}}}
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.\\
----
Extract CrushFTP folder ideally into /var/opt/ so it's an easier approach if you have issues finding it over time.
__Start / Stop CrushFTP__
There is a script provided to give you the basics of starting and stopping CrushFTP. It might be overkill for your situation, but you are welcome to use it and modify it for your needs. The script is crushftp_init.sh. Its included with your download of CrushFTP already. You must edit the script the first time you use it to set the correct path in it.
{{{./crushftp_init.sh start
./crushftp_init.sh stop}}}
__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}}}
__Generating an Admin User__
While you technically can do everything with CrushFTP from the command line and editing text XML files, its much easier to use a web browser to do this. You just need to have an admin user created first.
To make your user for doing this, use a command like this (avoid special characters in the comamnd line password creation):
{{{
java -jar CrushFTP.jar -a "crushadmin" "password"
}}}
or
{{{
./Java/bin/java -jar CrushFTP.jar -a "crushadmin" "password"
}}}
This will make a new user, and write it to the default location:
{{''users/MainUsers/crushadmin/''}}
You can now login to the administration console using a web browser. The default ports are:
{{{http://your_ip:8080/
https://your_ip:443/}}}
[Install Video|http://www.crushftp.com/videos/linux_install.mp4] | [Quick Start Video|http://www.crushftp.com/videos/quick_start.mp4]\\
__Alternate Start /Stop CrushFTP Methods__
At line 77 added 2 lines
{{{
At line 80 added 3 lines
}}}
At line 84 added 2 lines
{{{
At line 17 changed 7 lines
Alternate Method
There is a script provided to give you the basics of starting and stopping CrushFTP. It might be overkill for your situation, but you are welcome to use it and modify it for your needs. The script is "crushftp_init.sh". Be sure to get the paths correct when using it.
Generating an Admin User
While you technically can do everything with CrushFTP from the command line and editing text XML files, its much easier to use a GUI to do this. You can use remote administration with CrushFTP in order to remote control a headless server. This lets you have a full GUI controlling the headless linux installations of CrushFTP.
To make your user for doing this, use a command like this: java -jar CrushFTP.jar -a "username" "password" This will make a new user, and write it to the default location...users/lookup_21/username/.
You can then login using this username from a ftp client, or via the remote admin interface of CrushFTP. See my video on setting up a remote admin connection. The basics are opening CrushFTP, clicking manage servers button in the upper right. Add a new item, click on it and set the URL to match the credentials of the user you just made. Click apply, then click OK to close the manage servers window. Finally, select your server from the drop down and wait as CrushFTP connects to your server and gives you a remote admin interface to the GUI of the headless server.
Stopping CrushFTP
}}}
At line 25 changed one line
You can also do it from a script. Let me explain. CrushFTP supports the "SITE QUIT" command if it has been enabled in the User Manager under the Admin tab for a user. So you can have a scripted command that simply logs into the server, issues SITE QUIT, then logs out. The server will then gracefully quit saving any unsaved data to disk before exiting.
You can also do it from a script. CrushFTP supports the "SITE QUIT" command if it has been enabled in the User Manager under the Admin tab for a user. So you can have a scripted command that simply logs into the server, issues SITE QUIT, then logs out. The server will then gracefully quit saving any unsaved data to disk before exiting.
At line 95 added 2 lines
{{{
At line 98 added 2 lines
}}}
At line 29 changed 3 lines
open 127.0.0.1 quote user admin quote pass password quote site quit quote quit
Provided a user named "admin" exist, and they have permission to execute that command, CrushFTP will terminate once the user logs out.
Generating a Password With CrushFTP from the Command Line
{{{
open 127.0.0.1
quote user crushadmin
quote pass password
quote site quit
quote quit
}}}
Provided a user named "crushadmin" exist, and they have permission to execute that command, CrushFTP will terminate once the user logs out.
__Generating a Password With CrushFTP from the Command Line__
At line 33 changed one line
java -jar CrushFTP.jar -p thePassword DES
{{{
java -jar CrushFTP.jar -p DES thePassword
}}}
__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
\\
\\
\\
Version Date Modified Size Author Changes ... Change note
49 16-Apr-2024 14:42 6.402 kB Ada Csaba to previous
48 16-Apr-2024 14:41 6.437 kB Ada Csaba to previous | to last
47 16-Apr-2024 14:40 6.425 kB Ada Csaba to previous | to last
46 29-Feb-2024 03:33 7.337 kB Ben Spink to previous | to last
45 29-Feb-2024 03:11 7.295 kB Ben Spink to previous | to last
44 27-Feb-2024 03:14 7.284 kB Ben Spink to previous | to last
43 05-Dec-2023 05:32 7.284 kB Ada Csaba to previous | to last
42 05-Dec-2023 05:32 7.454 kB Ada Csaba to previous | to last
41 05-Dec-2023 05:32 6.845 kB krivacsz to previous | to last
« This page (revision-49) was last changed on 16-Apr-2024 14:42 by Ada Csaba
G’day (anonymous guest)
CrushFTP11 | What's New

Referenced by
LeftMenu

JSPWiki