Fedora-28-LAMP-Apache-Mairadb-php

# apache php7
#关闭或开启selinux,可自行判断
dnf -y install httpd mariadb
dnf -y install php php-pear php-devel php-fpm php-mysqli php-gd php-cgi php-curl php-mbstring php-bcmath php-redis php-memcached php-memcache php-apc git
dnf -y install mariadb mariadb-server
dnf -y install zsh htop iftop axel jq lsof vim make gcc unzip memcached redis mlocate fail2ban mod_ssl
updatedb

#vim
cat >>~/.vimrc<<EOF
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
:colorscheme desert
:set ts=2
:set expandtab
:%retab!
EOF

#sysctl
cat >/etc/sysctl.conf<<EOF
net.ipv4.icmp_echo_ignore_all = 1
net.ipv4.tcp_congestion_control = bbr
net.core.default_qdisc = fq
EOF

#firewalld
systemctl start firewalld
systemctl enable firewalld
firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=http
firewall-cmd --add-service=https --permanent
firewall-cmd --add-service=https

#php
sed -i "s/expose_php\ =\ On/expose_php\ =\ Off/g"  /etc/php.ini
sed -i "s/upload_max_filesize\ =\ 2M/upload_max_filesize\ =\ 200M/g" /etc/php.ini
sed -i "s/post_max_size\ =\ 8M/post_max_size\ =\ 200M/g" /etc/php.ini
sed -i "s/max_execution_time\ =\ 30/max_execution_time\ =\ 300/g" /etc/php.ini
sed -i "s/max_input_time\ =\ 60/max_input_time\ =\ 300/g" /etc/php.ini
sed -i "s/memory_limit\ =\ 128M/memory_limit\ =\ 1280M/g" /etc/php.ini

#system
systemctl enable php-fpm;
systemctl start php-fpm;
systemctl enable http;
systemctl restart http;
systemctl start mariadb;
systemctl enable mariadb;