FreeBSD based distro for virtual hosting platform and appliance
2020-10 upd: we reached the first fundraising goal and rented a server in Hetzner for development! Thank you for donating !
ClonOS in pkg packages
Daniel Shafer prepared a Jenkins task to build ClonOS pkg package repo (at the moment FreeBSD 12 only)
To enable repository, just put the following lines in /usr/local/etc/pkg/repos/clonos-pkg.ircdriven.net.conf:
ClonOS-pkg.ircdriven.net: { url: "https://pkg.ircdriven.net/packages/12amd64-clonos/", mirror_type: "none", enabled: yes }
Update pkg metafile and install it:
pkg update -f pkg install clonos
Install ClonOS and dependencies
portsnap fetch extract
pkg install -y net/libvncserver security/gnutls databases/sqlite3 shells/bash www/npm \ www/nginx sysutils/cbsd security/ca_root_nss www/node security/sudo databases/sqlite3 net/beanstalkd devel/git devel/pkgconf www/nginx \ lang/php80 archivers/php80-zlib databases/php80-pdo databases/php80-pdo_sqlite databases/php80-sqlite3 textproc/php80-ctype \ www/php80-opcache www/php80-session 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 /usr/ports/www/clonos install
Follow post-message instruction
You must merge or copy working configuration files
kern.racct.enable="1"into /boot/loader.conf and 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" 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: cp /usr/local/etc/sudoers_10_www.clonos.sample /usr/local/etc/sudoers.d/10_www
[unix_http_server] file=/var/run/supervisor.sock chmod=0777 chown=nobody:nobody [supervisorctl] serverurl=unix:///var/run/supervisor.sock [supervisord] logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisor/supervisord.pid nodaemon=false minfds=1024 minprocs=200 umask=022 strip_ansi=false [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [include] files=/usr/local/etc/supervisor.d/*.confOr copy: cp /usr/local/etc/supervisord.conf.clonos.sample /usr/local/etc/supervisord.conf
environment=PATH=[.skipp..],cbsd_workdir="/usr/jails" ^^^^^^^^^^
.. 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"
service nginx restart service php-fpm restart service supervisord restart
1) ~cbsd/etc/modules.conf must have: pkg.d bsdconf.d zfsinstall.d puppet.d convectix.d cbsd_queue.d vncterm.dOr copy: cp /usr/local/etc/cbsd-modules.conf.clonos.sample ~cbsd/etc/modules.conf
2) Re-run CBSD initenv to init modules: cbsd initenv 3) Init web user database: sh /usr/local/cbsd/modules/forms.d/clonos_database/initforms.sh 4) 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
Default login: 'admin', default password: 'admin'