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
# ------------------------ | |
# SSH: | |
# ------------------------ | |
#http://wiki.centos.org/HowTos/Network/SecuringSSH | |
#https://www.linode.com/docs/security/securing-your-server/ | |
sudo nano /etc/ssh/sshd_config | |
Port 20202 | |
PermitRootLogin no | |
#PermitRootLogin without-password |
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
#------------------------------- | |
# Debian 10 | |
# https://linux4one.com/how-to-install-ruby-on-debian-10/ | |
#------------------------------- | |
sudo apt update | |
sudo apt install git libreadline-dev zlib1g-dev libreadline-dev libncurses5-dev autoconf bison libssl-dev build-essential libyaml-dev libffi-dev libssl-dev libreadline-dev zlib1g-dev libgdbm-dev | |
cd | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc |
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
# 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
# df - report file system disk space usage | |
df -h | |
df -i | |
df -hl | |
df -hl | sort -n | |
# du - disk used - estimate file space usage | |
alias du1='du . -hs' | |
alias du10='du . -k | sort -n -r | head -n 10' |
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
# ------------------------------------------------------- | |
# STEP 1: install requirements | |
# ------------------------------------------------------- | |
# CentOS / RHEL / Amazon EC2 AMI: | |
# @see https://webtatic.com/packages/php70/ | |
sudo yum install php70w php70w-devel | |
sudo yum groupinstall "Development Tools" | |
sudo yum install libmemcached libmemcached-devel zlib zlib-devel | |
# ------------------------------------------------------- | |
# Debian |
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 |
OlderNewer