FreeBSD based distro for virtual hosting platform and appliance
This is not a commercial project. Development activity is highly dependent on the level of investment, as development requires for hosting, test/development equipment, infrastructure for updates/CI/CD, and support. Please Support Us if you are not indifferent to the development of this project.
Install ClonOS and dependencies
portsnap fetch extract
pkg update -f pkg install -y lang/python311 lang/php84 net/libvncserver security/gnutls sqlite3 shells/bash npm-node20 www/nginx \ sysutils/cbsd security/ca_root_nss www/node security/sudo net/beanstalkd git devel/pkgconf tmux py311-numpy www/php84-session \ archivers/php84-zip databases/php84-sqlite3 databases/php84-pdo_sqlite security/php84-filter www/php84-opcache lang/go
git clone https://github.com/clonos/clonos-ports-wip.git /root/clonos-ports
echo 'OVERLAYS=/root/clonos-ports' >> /etc/make.conf
env BATCH=no make -C /root/clonos-ports/www/clonos install
Follow post-message instruction
You must merge or copy working configuration files.
echo 'kern.racct.enable="1"' >> /boot/loader.confand reboot host.
env workdir=/usr/jails /usr/local/cbsd/sudoexec/initenv
more about CBSD initialization: https://www.bsdstore.ru/en/installing_cbsd.html#initenv
sysrc cbsdd_enable=YES service cbsdd status || service cbsdd start
sysrc beanstalkd_flags="-l 127.0.0.1 -p 11300" sysrc beanstalkd_enable=YES service beanstalkd restart
… events.mechanism = kqueue …Or copy:
cp /usr/local/etc/php-fpm.conf.clonos.sample /usr/local/etc/php-fpm.conf
… listen = /tmp/php-fpm.sock … listen.backlog = -1 … listen.owner = www listen.group = www listen.mode = 0660 …Or copy:
cp /usr/local/etc/php-fpm.d/www-php-fpm.conf.clonos.sample /usr/local/etc/php-fpm.d/www.conf
pw groupmod cbsd -M www
Defaults env_keep += "workdir DIALOG NOCOLOR CBSD_RNODE" Cmnd_Alias WEB_CMD = /usr/local/bin/cbsd www ALL=(ALL) NOPASSWD:SETENV: WEB_CMDAnd make sure the file permissions are safe:
chown root:wheel /usr/local/etc/sudoers.d/10_www chmod 0440 /usr/local/etc/sudoers.d/10_wwwOr copy:
install -o root -g wheel -m 0440 /usr/local/etc/sudoers_10_www.clonos.sample /usr/local/etc/sudoers.d/10_www
service clonos-ws enable service clonos-ws restart
service clonos-node-ws enable service clonos-node-ws restart
… memory_limit = 256M … post_max_size = 12G … upload_tmp_dir = /tmp … upload_max_filesize = 16G … opcache.enable=1Or copy:
cp /usr/local/etc/php.ini.clonos.sample /usr/local/etc/php.ini
user www; load_module /usr/local/libexec/nginx/ngx_stream_module.so; events { use kqueue; } http { include /usr/local/etc/nginx/mime.types; default_type application/octet-stream; client_max_body_size 1m; include /usr/local/etc/nginx/sites-enabled/*.conf; } stream { include /usr/local/etc/nginx/conf.stream.d/*.conf; include /usr/local/etc/nginx/streams-enabled/*; }Or copy:
cp /usr/local/etc/nginx/nginx.conf.clonos.sample /usr/local/etc/nginx/nginx.conf
sysrc nginx_enable="YES" sysrc php_fpm_enable="YES" sysrc supervisord_enable="YES" sysrc clonos_vnc2wss_enable="YES" sysrc kld_list+="vmm if_tuntap if_bridge nmdm"
service nginx restart service php_fpm restart service kld restart
Configure CBSD:
1) Install and compile vncterm module:
cbsd module mode=install vncterm make -C /usr/local/cbsd/modules/vncterm.d
2) Install additional ConvectIX scripts module:
cbsd module mode=install convectix
3) Install Puppet module
cbsd module mode=install puppet
4) Install ClonOS database module:
cbsd module mode=install clonosdb
5) Copy queue config file:
cp -a /usr/local/cbsd/modules/cbsd_queue.d/etc-sample/cbsd_queue.conf ~cbsd/etc/
6) Add additional module name into ~cbsd/etc/modules, e.g. complete ~cbsd/etc/modules.conf must have pkg.d bsdconf.d zfsinstall.d puppet.d convectix.d cbsd_queue.d vncterm.d clonosdb.d:
cat > ~cbsd/etc/modules.conf <<EOF pkg.d bsdconf.d zfsinstall.d puppet.d convectix.d cbsd_queue.d vncterm.d clonosdb.d EOFOr copy:
cp /usr/local/etc/cbsd-modules.conf.clonos.sample ~cbsd/etc/modules.conf
7) Re-run CBSD initenv to init modules:
cbsd initenv
8) Init web user database:
cbsd clonosdb
9) Configure and run CBSD RACCT stats daemon:
sysrc cbsd_statsd_hoster_enable=YES sysrc cbsd_statsd_jail_enable=YES sysrc cbsd_statsd_bhyve_enable=YES service cbsd-statsd-hoster restart service cbsd-statsd-jail restart service cbsd-statsd-bhyve restart
10) Create symlink from python3 to valid python bin:
ln -sf /usr/local/bin/python3.11 /usr/local/bin/python3
Open ClonOS UI in your web browser.
Default login: 'admin' Default password: 'admin'
Enjoy the ClonOS !