Original description Crossroads is an open source load balance and fail over utility for TCP based services. It is a daemon running in user space, and features extensive configurability, polling of back ends using ‘wakeup calls’, detailed status reporting, ‘hooks’ […]
Linux
zoneminder
https://wiki.zoneminder.com/Ubuntu_Server_14.04_64-bit_with_Zoneminder_1.30.0_the_easy_way # when already have mysql do: sudo systemctl start mysql sudo apt-get install zoneminder sudo chmod +r /etc/zm/zm.conf sudo chmod g+rw /etc/php/7.0/apache2/php.ini # edit /etc/php/7.0/apache2/php.ini date.timezone = Europe/Bucharest # create mysql user zmuser/zmpass and mysql schema zm # grant […]
gitweb on apache
projects web page will be: https://192.168.1.8/gitweb/ # Create a git project (e.g. testproject.git): # mkdir -p /opt/GITRepositories/testproject.git # cd /opt/GITRepositories/testproject.git # git init –bare –shared # cp -v /opt/GITRepositories/test.git/hooks/post-update.sample /opt/GITRepositories/test.git/hooks/post-update # now https://192.168.1.8/testproject.git is ready for cloning: # git […]
Ufw (uncomplicated firewall)
documentation https://help.ubuntu.com/lts/serverguide/firewall.html http://manpages.ubuntu.com/manpages/xenial/en/man8/ufw.8.html http://manpages.ubuntu.com/manpages/xenial/en/man8/ufw-framework.8.html important files /etc/ufw/user.rules Uncomplicated Firewall # https://help.ubuntu.com/community/UFW sudo ufw show added sudo ufw status verbose sudo ufw show listening sudo ufw limit ssh sudo ufw allow 80 sudo ufw allow 443 sudo ufw allow 32400 sudo […]
APT (Advanced Package Tool)
checking that python3-pip package is installed dpkg –get-selections python3-pip search packages by name using REGEX see http://newbiedoc.sourceforge.net/tutorials/apt-get-intro/info.html apt-cache search libapr apt-cache search ‘php.sql’ apt-cache search apache.\perl apt-cache search elvis|vim list the contents of a (not-installed) package see https://unix.stackexchange.com/questions/6311/how-to-find-out-which-not-installed-package-a-file-belongs-to apt-file list […]
ssh, http and https multiplexing
This is about how to have the ssh and http(s) server share the same port (e.g. 80 or 443 port). This is really cool :). # Used sources: # http://yalis.fr/cms/index.php/post/2014/02/22/Multiplex-SSH-and-HTTPS-on-a-single-port # http://blog.cppse.nl/apache-proxytunnel-ssh-tunnel # http://serverfault.com/questions/355271/ssh-over-https-with-proxytunnel-and-nginx # http://tyy.host-ed.me/pluxml/article4/port-443-for-https-ssh-and-ssh-over-ssl-and-more # http://ipset.netfilter.org/iptables.man.html # http://ipset.netfilter.org/iptables-extensions.man.html […]
gitweb on nginx
nginx configuration # Let Nginx handle static files # location ~ ^..git/objects/([0-9a-f]+/[0-9a-f]+|pack/pack-[0-9a-f]+.(pack|idx)) { location ~ ^/[^/].git/objects/([0-9a-f]+/[0-9a-f]+|pack/pack-[0-9a-f]+.(pack|idx)) { auth_basic “strong authentication”; auth_basic_user_file /****/apps/etc/basic.auth.strong.passwords.txt; root /****/GITRepoUbuntu/; } # Pass Git Smart HTTP requests to git-http-backend. Require Auth for everything. # see man […]
Linux various commands
show only first line found: grep “search this” nohup.out | sed -n ‘1p’ # show only last line found: grep “search this” nohup.out | sed -n ‘$p’ # copy to current path the file /home/gigi/systemctl-services.txt # from adrhc.go.ro (remote […]
Ubuntu and Oracle
see also https://wiki.centos.org/HowTos/Oracle12onCentos7 # see also https://adrhc.go.ro/wordpress/centos-and-oracle/ # Follow this (works with Ubuntu 16.04 too): # http://www.techienote.com/install-oracle-12c-on-ubuntu/ # systemd oracle.service (working when only one db is automatically started with /etc/oratab) [Unit] Description=Oracle 12c After=local-fs.target Wants=local-fs.target [Service] Type=forking User=oracle Group=oinstall […]
Docker
How To Install Docker on Ubuntu 19.04 Kitematic which provide a GUI to the users avoid typing sudo whenever you run the docker command sudo usermod -aG docker ${USER} # check service status sudo systemctl status docker # pull and […]
Systemd and systemctl
see https://www.freedesktop.org/wiki/Software/systemd/TipsAndTricks/ systemctl -> shows all active units systemctl list-units –type=service -> shows all active services (–all to see loaded but inactive services too) systemctl list-units –type=swap -> shows swap unit configurations # show cgroup tree systemd-cgls # services […]
CentOS
CentOS https://www.centos.org/docs/5/html/ https://wiki.centos.org/ https://wiki.centos.org/HowTos/Oracle12onCentos7 https://docs.oracle.com/database/121/index.html CentOS version cat /etc/centos-release hostnamectl rpm –query centos-release CentOS setup # pciutils (for running lspci) # xorg-x11-server-utils (for running xrandr) yum install -y nano mlocate wget zip unzip xorg-x11-drv-vesa pciutils xorg-x11-server-utils wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # –nogpgcheck […]
RedHat
Red Hat http://developers.redhat.com/blog/2016/03/31/no-cost-rhel-developer-subscription-now-available/ http://developers.redhat.com/products/rhel/get-started/#tab-vmware https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ show OS version lsb_release -a Red Hat setup https://linuxconfig.org/rhel-7-solution-to-there-are-no-enabled-repos-message mkdir /media/rhel7-repo-iso # VMware: make sure Device Status checkbox named Connected is checked! mount /dev/cdrom /media/rhel7-repo-iso/ # or mount the iso file: mount -o loop /root/rhel-server-7.1-x86_64-dvd.iso […]