This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FreeBSD ports (portmaster) and packages (pkgng) management | |
# ports | |
portsnap fetch extract | |
# portmaster | |
# You must upgrade the ports-mgmt/pkg port first. | |
make -C /usr/ports/ports-mgmt/pkg build deinstall install clean | |
pkg -v | |
# If you are upgrading from the old package format, first run: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @see https://people.debian.org/~schultmc/locales.html | |
# @see http://badyblog.com/ustanovka-utf-8-rusifikaciya-konsoli-v-debian/ | |
# perl: warning: Please check that your locale settings: | |
# locale: Cannot set LC_ALL to default locale: No such file or directory | |
locale | |
sudo dpkg-reconfigure locales | |
#138. en_US.UTF-8 UTF-8 | |
#349. ru_RU.UTF-8 UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Install binary package | |
# pkg search bash | |
bash-4.3.42 | |
# pkg install bash | |
# which bash | |
/usr/local/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------ | |
# CentOS | |
# @see https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-centos-7 | |
# ------------------------ | |
sudo yum install git bc | |
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
sudo systemctl stop nginx | |
netstat -na | grep ':80.*LISTEN' | |
firewall-cmd --add-port=443/tcp | |
cd /opt/letsencrypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------ | |
# debian | |
# ------------------------ | |
apt-cache policy proftpd-basic | |
apt-get install proftpd | |
proftpd --version | |
proftpd -vv | |
nano /etc/proftpd/proftpd.conf | |
Include /etc/proftpd/conf.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @see http://sphinxsearch.com/downloads/release/ | |
# redhats: yum remove sphinx | |
# debians: apt-get remove sphinxsearch | |
cd /usr/local/src | |
wget -c http://sphinxsearch.com/files/sphinx-2.2.10-release.tar.gz | |
tar xzvf sphinx-2.2.10-release.tar.gz | |
cd sphinx-2.2.10-release | |
./configure | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BTW yum has last Redis too, remi repository at least. | |
$ sudo -i | |
$ yum list redis | |
$ redis.x86_64 2.6.13-1.el6.remi remi | |
But today we want compile redis from source (see http://redis.io/download) | |
$ yum install make gcc tcl | |
$ cd /usr/local/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.mercurial-scm.org/ | |
# https://www.mercurial-scm.org/wiki/UnixInstall#System-wide_installation | |
# rooted version :) | |
sudo -i | |
yum list mercurial | |
#Loaded plugins: priorities, update-motd, upgrade-helper | |
#Error: No matching Packages to list | |
yum groupinstall "Development Tools" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- List of schemas | |
\dn | |
-- list all tables | |
\dt | |
-- list only tables with "public" schema | |
\dt public.* | |
-- database size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\z | |
-- Full access | |
GRANT ALL privileges ON DATABASE db TO admin_user; | |
GRANT ALL ON schema public TO admin_user; | |
GRANT ALL ON ALL TABLES IN SCHEMA public TO admin_user; | |
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO admin_user; | |
-- Read-only access | |
CREATE ROLE readonly; |
OlderNewer