Created
September 15, 2014 10:36
-
-
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
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
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm |
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
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm |
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
[nginx] | |
name=nginx repo | |
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ | |
gpgcheck=0 | |
enabled=1 |
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
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 |
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
service php-fpm start | |
service nginx start | |
service redis start |
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
setenforce 0 |
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
yum install MariaDB-server MariaDB-client |
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
/etc/init.d/mysql start |
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
# 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 |
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
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