Skip to content

Instantly share code, notes, and snippets.

@liubin
Created September 15, 2014 10:36
Show Gist options
  • Save liubin/ff9211fb49c14fcaab5e to your computer and use it in GitHub Desktop.
Save liubin/ff9211fb49c14fcaab5e to your computer and use it in GitHub Desktop.
Install Nginx(1.6.1)/PHP(5.6.0)/PHP-FPM/Redis(2.8.13)/MariaDB(10.1) on CentOS 7 ref: http://qiita.com/liubin/items/1386ba4f0bbd64d14cc5
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
yum --enablerepo=remi,remi-php56 install nginx php-fpm php-common
yum --enablerepo=remi,remi-php56 install php-opcache php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-pecl-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml
yum --enablerepo=remi,remi-php56 install php-redis
service php-fpm start
service nginx start
service redis start
setenforce 0
yum install MariaDB-server MariaDB-client
/etc/init.d/mysql start
# iptables --line -vnL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 48563 67M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
2 21 1434 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
3 101K 8704K INPUT_direct all -- * * 0.0.0.0/0 0.0.0.0/0
4 101K 8704K INPUT_ZONES_SOURCE all -- * * 0.0.0.0/0 0.0.0.0/0
5 101K 8704K INPUT_ZONES all -- * * 0.0.0.0/0 0.0.0.0/0
6 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
7 101K 8704K REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
iptables -I INPUT 7 -i em4 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -I INPUT 7 -i em4 -p tcp --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment