link
yum install openssh-server wget
yum -y update
yum repolist
rpm -ihv http:
yum install yum-priorities
vi /etc/yum.repos.d/epel.repo
vi /etc/yum.repos.d/nginx.repo
priority=10
yum install mysql mysql-server
chkconfig --levels
235
mysqld on
/usr/bin/mysql_secure_installation
service mysqld start
yum install nginx
chkconfig --levels
235
nginx on
yum remove httpd
service nginx start
CentOS/RHEL 7.x:
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
CentOS/RHEL 6.x:
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum install php56w php56w-opcache php56w-gd php56w-imap php56w-pdo php56w-mysql php56w-xml php56w-common php56w-process php56w-mbstring php56w-cli php56w-ldap php56w-devel php56w-fpm php56w-mssql php56w-magickwand php56w-mcrypt php56w-odbc php56w-pear php56w-shout php56w-snmp php56w-soap php56w-tidy php56w-xmlrpc
vi /etc/php.ini
files.upload_max_filesize = 100M
post_max_size = 100M
cgi.fix_pathinfo = 0
chkconfig --levels
235
php-fpm on
/etc/init.d/php-fpm start
yum install htop
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.
default
vi /etc/nginx/nginx.conf
client_max_body_size 100m;
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name _;
location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}