This guide was written for Ubuntu 18.04 with CloneDeploy 1.4.0 and Mono 5.18.0.268. There may be variances with other versions.
Pre-Requisites
- A DHCP Server
- Assign your server a static IP
Install Web Application
sudo su
apt -y install gnupg ca-certificates apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list apt update apt-get -y install mono-devel libapache2-mod-mono apache2 udpcast liblz4-tool mkisofs
wget "https://sourceforge.net/projects/clonedeploy/files/CloneDeploy 1.4.0/clonedeploy-1.4.0.tar.gz" tar xvzf clonedeploy-1.4.0.tar.gz cd clonedeploy cp clonedeploy.conf /etc/apache2/sites-available/ mkdir /var/www/html/clonedeploy cp -r frontend /var/www/html/clonedeploy cp -r api /var/www/html/clonedeploy cp -r tftpboot /
ln -s ../../images /tftpboot/proxy/bios/images ln -s ../../images /tftpboot/proxy/efi32/images ln -s ../../images /tftpboot/proxy/efi64/images ln -s ../../kernels /tftpboot/proxy/bios/kernels ln -s ../../kernels /tftpboot/proxy/efi32/kernels ln -s ../../kernels /tftpboot/proxy/efi64/kernels
mkdir -p /cd_dp/images mkdir /cd_dp/resources mkdir /var/www/.mono mkdir /etc/mono/registry chown -R www-data:www-data /tftpboot /cd_dp /var/www/html/clonedeploy /var/www/.mono /etc/mono/registry chmod 1777 /tmp
sysctl fs.inotify.max_user_instances=1024 echo fs.inotify.max_user_instances=1024 >> /etc/sysctl.conf a2ensite clonedeploy service apache2 restart
Install Database
Change cduser and mypass to something else.
apt-get -y install mysql-server
mysql
create database clonedeploy; CREATE USER 'cduser'@'localhost' IDENTIFIED BY 'mypass'; GRANT ALL PRIVILEGES ON clonedeploy.* TO 'cduser'@'localhost'; quit
mysql clonedeploy < cd.sql -v
Open /var/www/html/clonedeploy/api/Web.config with a text editor and change the following values:
xx_marker1_xx to your cduser database password you created earlier
On that same line change Uid=root to Uid=cduser
xx_marker2_xx to some random characters(a-z and numeric only), probably should be a minimum of 8
Install Samba Server
apt-get -y install samba
addgroup cdsharewriters useradd cd_share_ro useradd cd_share_rw -G cdsharewriters adduser www-data cdsharewriters
The following two commands will prompt you to create passwords for the smb share for a read only user and a read write user. Remember these passwords, you will need them again during the Web Interface Initial Setup.
smbpasswd -a cd_share_ro
smbpasswd -a cd_share_rw
echo "[cd_share] path = /cd_dp valid users = @cdsharewriters, cd_share_ro create mask = 02775 directory mask = 02775 guest ok = no writable = yes browsable = yes read list = @cdsharewriters, cd_share_ro write list = @cdsharewriters force create mode = 02775 force directory mode = 02775 force group = +cdsharewriters" >> /etc/samba/smb.conf
chown -R www-data:cdsharewriters /cd_dp chmod -R 2775 /cd_dp service smbd restart
Install TFTP Server
apt-get -y install tftpd-hpa
echo "TFTP_USERNAME=\"root\" TFTP_DIRECTORY=\"/tftpboot\" TFTP_ADDRESS=\"0.0.0.0:69\" TFTP_OPTIONS=\"-s -m /tftpboot/remap\"" > /etc/default/tftpd-hpa
service tftpd-hpa restart service apache2 restart
Post Install Setup
- Open the CloneDeploy Web Interface
http://server-ip/clonedeploy
- Login with
clonedeploy / password
- Upon login you will be greeted with the Initial Setup Page
- Fill out the fields and click Finalize Setup
- Enjoy!
Fix ISO/USB Generation Bug
A bug in 1.4.0 has already been discovered that prevents the iso / usb generation from working properly. To fix:
Download http://files.clonedeploy.org/CloneDeploy-Services.dll
and place it in /var/www/html/clonedeploy/api/bin/ , overwriting the original.
Next Step