-
Notifications
You must be signed in to change notification settings - Fork 21
FreeBSD 7 DrFTPD Plus Install
zc0nf edited this page Mar 20, 2023
·
14 revisions
- NOTE: This install guide is about 80% done, everything in here has been tested.
- This guide will get DrFTPD+ 2.0 installed and running on FreeBSD 7.x with Diablo jdk16
- This guide will probably work on other versions of Java, FreeBSD, DrFTPD.
- The software will be installed in the home directory of the 'drftpd' user
- It will still need to be configured, but the hard bit is getting it installed in the first place!
- If you have any questions or make any contributions feel free to contact me via email or on irc.
Enjoy
You had better know your root password :)
su
Create The Account
pw useradd -n drftpd -s tcsh -w random -m
Set Home Dir Perms
cd /home
chown -R drftpd:drftpd drftpd
chmod -R 700 drftpd
Set DrFTPD User Shell Environment
Drop to the user drftpd and edit the tcsh shell environment file
su - drftpd
edit ~/.cshrc
exit
Ensure you have the following two shell environment variables and ant_home added to your path
setenv ANT_HOME /usr/local/share/java/apache-ant
setenv JAVA_HOME /usr/local/diablo-jdk1.6.0
set path = (~/bin ~/sbin /sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $ANT_HOME/bin)
Update The Ports Tree
portsnap fetch
portsnap extract
portsnap update
cd /usr/ports/ports-mgmt/portmaster/
make install
rehash
portmaster -av
Have fun with the java port
cd /usr/ports/archivers/unzip && make install
cd /usr/ports/security/md5deep && make install
cd /usr/ports/devel/subversion && make install
cd /usr/ports/java/diablo-jdk16 && make install
cd /usr/ports/devel/apache-ant && make install
Generate /etc/mtab file
kldload linprocfs
mount -t linprocfs linprocfs /compat/linux/proc
cat /compat/linux/proc/mtab > /etc/mtab
umount /compat/linux/proc
kldunload linprocfs
Install in the home directory of drftpd as the user
su - drftpd
Checkout DrFTPD+ 2.0 From SVN
svn checkout http://drftpd.svn.sourceforge.net/svnroot/drftpd/plus/2.0/branches/+STABLE+
mv +STABLE+ drftpd
md5deep -r -e drftpd/ | grep -v '.svn' | awk '{print }' | sha256
3c93a5029197a0f3411e65e9393364c3385e050dd2d6e2d529c28714debec7e6
Remove Unneeded Files
rm drftpd/CHANGELOG.txt
rm drftpd/LICENSE.txt
rm drftpd/MAJORCHANGES.txt
rm drftpd/UPGRADING.txt
rm drftpd/genkey.bat
rm drftpd/master.bat
rm drftpd/slave.bat
rm drftpd/bin/InstallMaster.bat
rm drftpd/bin/InstallSlave.bat
rm drftpd/bin/UninstallMaster.bat
rm drftpd/bin/UninstallSlave.bat
Download DrFTPD 2.0 Dependencies
fetch http://downloads.sourceforge.net/project/drftpd/drftpd-dependencies/2.0/drftpd-2.0-deps.zip
unzip -d drftpd drftpd-2.0-deps.zip
sha256 drftpd-2.0-deps.zip
SHA256 (drftpd-2.0-deps.zip) = fe7cce502e176e0e795c994831e7731657a3744d60076102df909887c0be2427
Remove Unneeded Files
rm drftpd/lib/FileSystem.dll
rm drftpd/lib/libFileSystem.so
rm drftpd/lib/libwrapper.so
rm drftpd/lib/wrapper.jar
rm drftpd/lib/wrapper.dll
rm drftpd/bin/wrapper
rm drftpd/bin/wrapper.exe
Compile DrFTPD+ 2.0
cd drftpd
ant
ant compile-jfreechart
ant compile-jsx
ant compile-xstream
cd ../
Fix The Build Script
sed -i '' "s/linux/freebsd/g" drftpd/src/se/mog/io/jni.sh
Compile libFileSystem.so
cd drftpd/src/se/mog/io/
./jni.sh
cd ../../../../../
Install libFileSystem.so
cp drftpd/src/se/mog/io/libFileSystem.so drftpd/lib/
Extract Source Code
tar zxvf drftpd/extsources/wrapper_3.1.2_src.tar.gz -C drftpd/extsources/
Fix Source File
sed -i '' "s/1.2/1.5/g" drftpd/extsources/wrapper_3.1.2_src/build.xml
sed -i '' "s/enum/yourface/g" drftpd/extsources/wrapper_3.1.2_src/src/java/org/tanukisoftware/wrapper/test/AbstractActionApp.java
Build Java Wrapper
cd drftpd/extsources/wrapper_3.1.2_src/
./build.sh
cd ../../../
Install Wrapper Files
cp drftpd/extsources/wrapper_3.1.2_src/bin/wrapper drftpd/bin/
cp drftpd/extsources/wrapper_3.1.2_src/lib/libwrapper.so drftpd/lib
cp drftpd/extsources/wrapper_3.1.2_src/lib/wrapper.jar drftpd/lib
Rename drftpd/ Config Files
cd drftpd
foreach i (ls *conf.dist)
mv $i echo $i|sed 's/\..\{4\}$//'
end
cd ..
Rename drftpd/conf Config Files
cd drftpd/conf
foreach i (ls *conf.dist)
mv $i echo $i|sed 's/\..\{4\}$//'
end
cd ../../
mkdir drftpd/logs
cd drftpd
./genkey.sh
cd ../
drftpd/master.sh start
drftpd/slave.sh start
sleep 3`
drftpd/master.sh status
drftpd/slave.sh status