Skip to content

Instantly share code, notes, and snippets.

@thondery
thondery / install-php72-osx.md
Created January 23, 2018 15:09 — forked from vukanac/install-php72-osx.md
How to install php72 on Mac OS X with homebrew.

Skip this:

brew tap homebrew/dupes
brew tap homebrew/versions

As:

Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
@thondery
thondery / centos_install_postgresql.md
Last active January 4, 2018 09:20
Installing PostgreSQL on CentOS

CentOS 安装 PostgreSQL 9.6

1. 添加RPM

$ yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm

2. 安装 PostgreSQL

@thondery
thondery / centos_install_mysql.md
Last active January 4, 2018 08:03
Installing MySQL5.7 on CentOS

CentOS 安装 MySQL5.7

1. 添加 MySQL Yum源

$ wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
$ rpm -Uvh mysql57-community-release-el6-11.noarch.rpm

2. 安装 MySQL

@thondery
thondery / centos_install_graphicsmagick.md
Last active January 4, 2018 04:31
Installing GraphicsMagick on CentOS

CentOS 安装 GraphicsMagick

1. 安装依赖

$ yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel

2. 编译安装 GraphicsMagick

@thondery
thondery / centos_install_redis.md
Last active January 3, 2018 13:56
Installing Redis on CentOS

CentOS安装配置Redis

1. 安装编译工具

$ yum install -y gcc tcl

2. 编译安装

@thondery
thondery / ssh-key-manager.md
Last active January 3, 2018 08:12
ssh key manager

ssh key 配置管理

1. 生成公钥和私钥文件

$ ssh-keygen -t rsa -f ~/.ssh/github

2. 配置SSH

@thondery
thondery / centos_ssh_access.md
Last active January 3, 2018 07:28
CentOS ssh No password login

CentOS配置SSH无密码访问

1. 生成无SSH密码访问的公钥和私钥文件

$ ssh-keygen -t rsa -f ~/.ssh/HK508 # 一路回车

2. 配置SSH

@thondery
thondery / centos_configure_iptables.md
Last active January 3, 2018 06:36
Configure Iptables on CentOS

CentOS系统配置iptables防火墙

1. 检查iptables服务状态

检查 iptables 防火墙是否开启

$ service iptables status
iptables: Firewall is not running.
@thondery
thondery / centos_install_mongo.md
Last active January 3, 2018 06:44
Installing MongoDB on CentOS 6.x

CentOS系统安装MongoDB3.x

1. 配置包管理系统

创建一个/etc/yum.repos.d/mongodb-org-3.6.repo文件,以便可以直接使用yum来安装MongoDB。

[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/
@thondery
thondery / python27_on_centos65.md
Created January 3, 2018 00:30 — forked from dalegaspi/python27_on_centos65.md
Installing Python 2.7 on CentOS 6.5

Installing Python 2.7 on Centos 6.5

Centos 6.* comes with Python 2.6, but we can't just replace it with v2.7 because it's used by the OS internally (apparently) so you will need to install v2.7 (or 3.x, for that matter) along with it. Fortunately, CentOS made this quite painless with their Software Collections Repository

sudo yum update # update yum
sudo yum install centos-release-scl # install SCL 
sudo yum install python27 # install Python 2.7

To use it, you essentially spawn another shell (or script) while enabling the newer version of Python: