FreeBSD 7 - DrFTPD Plus Install
From DrFTPD
Contents |
[edit]
Introduction
- 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
[edit]
Setup Environment - As Root
You had better know your root password :)
su
[edit]
Create A DrFTPD User Account
[edit]
Create The Account
pw useradd -n drftpd -s tcsh -w random -m
[edit]
Set Home Dir Perms
cd /home chown -R drftpd:drftpd drftpd chmod -R 700 drftpd
[edit]
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)
[edit]
Install Required Ports
[edit]
Update The Ports Tree
portsnap fetch portsnap extract portsnap update
[edit]
Update All Installed Ports
cd /usr/ports/ports-mgmt/portmaster/ make install rehash portmaster -av
[edit]
Install Required Ports
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
[edit]
Create Mtab File
[edit]
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
[edit]
Install DrFTPD+ 2.0 As DrFTPD User
Install in the home directory of drftpd as the user
su - drftpd
[edit]
Install DrFTPD+ 2.0
[edit]
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 $1}' | sha256
3c93a5029197a0f3411e65e9393364c3385e050dd2d6e2d529c28714debec7e6
[edit]
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
[edit]
Install DrFTPD 2.0 Dependencies
[edit]
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
[edit]
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
[edit]
Compile DrFTPD+ 2.0
cd drftpd ant ant compile-jfreechart ant compile-jsx ant compile-xstream cd ../
[edit]
Install Required Libraries
[edit]
Install libFileSystem.so
[edit]
Fix The Build Script
sed -i '' "s/linux/freebsd/g" drftpd/src/se/mog/io/jni.sh
[edit]
Compile libFileSystem.so
cd drftpd/src/se/mog/io/ ./jni.sh cd ../../../../../
[edit]
Install libFileSystem.so
cp drftpd/src/se/mog/io/libFileSystem.so drftpd/lib/
[edit]
Install Java Wrapper Files
[edit]
Extract Source Code
tar zxvf drftpd/extsources/wrapper_3.1.2_src.tar.gz -C drftpd/extsources/
[edit]
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
[edit]
Build Java Wrapper
cd drftpd/extsources/wrapper_3.1.2_src/ ./build.sh cd ../../../
[edit]
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
[edit]
Basic Configuration
[edit]
Rename Config Files
[edit]
Rename drftpd/ Config Files
cd drftpd
foreach i (`ls *conf.dist`)
mv $i `echo $i|sed 's/\..\{4\}$//'`
end
cd ..
[edit]
Rename drftpd/conf Config Files
cd drftpd/conf
foreach i (`ls *conf.dist`)
mv $i `echo $i|sed 's/\..\{4\}$//'`
end
cd ../../
[edit]
Create Logs Folder
mkdir drftpd/logs
[edit]
Generate SSL Key
cd drftpd ./genkey.sh cd ../
[edit]
Ensure DrFTPD+ 2.0 Starts
[edit]
Start DrFTPD+ 2.0
drftpd/master.sh start drftpd/slave.sh start sleep 3 drftpd/master.sh status drftpd/slave.sh status
