• 首页
    • English
    • 中文
  • 关于我们
  • 服务项目
    • 谷歌SEO服务
    • WordPress建站服务
    • 谷歌ADS/SEM代运营
  • 项目案例
    • 医疗
    • 建材
    • 机械加工
    • 照明
    • 电商
    • 电脑硬件
  • 博客
    • 服务器运维
      • aliyun
      • 服务器安装
      • 宝塔面板
      • 虚拟化
      • 阿里云
      • Centos
      • linux
      • nginx
    • 电子商务
    • 免费资源
    • PHP
      • Magento
      • WordPress
    • 大数据采集
    • Python
    • Javascript
    • SEO
    • 未分类
  • 联系我们
What's Hot

机械模具加工公司网站设计案例

24 10 月, 2023

快速原型公司案例

24 10 月, 2023

陶瓷加工网站案例

24 10 月, 2023
Facebook Twitter Instagram
  • 中文
  • English
Facebook Twitter Instagram
VPSEO VPSEO
  • 首页
    • English
    • 中文
  • 关于我们
  • 服务项目
    • 谷歌SEO服务
    • WordPress建站服务
    • 谷歌ADS/SEM代运营
  • 项目案例
    • 医疗
    • 建材
    • 机械加工
    • 照明
    • 电商
    • 电脑硬件
  • 博客
    • 服务器运维
      • aliyun
      • 服务器安装
      • 宝塔面板
      • 虚拟化
      • 阿里云
      • Centos
      • linux
      • nginx
    • 电子商务
    • 免费资源
    • PHP
      • Magento
      • WordPress
    • 大数据采集
    • Python
    • Javascript
    • SEO
    • 未分类
  • 联系我们
VPSEO VPSEO
Home»服务器安装»Centos7  下 一键安装 nginx, MariaDB 10.3, php7.0 – LNMP安装脚本
服务器安装

Centos7  下 一键安装 nginx, MariaDB 10.3, php7.0 – LNMP安装脚本

chrispengcnBy chrispengcn7 8 月, 2021没有评论2 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email

Centos7  下 一键安装 nginx, MariaDB 10.3, php7.0 脚本

vi /var/local/src/installlnmp.sh

 

  1. yum -y update
  2. yum -y install wget zip unzip gzip
  3. cd /usr/local/src
  4. rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  5. rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
  6. yum -y install php70w-common php70w-fpm php70w-opcache php70w-gd php70w-mysqlnd php70w-mbstring php70w-pecl-redis php70w-pecl-memcached php70w-devel
  7. systemctl enable php-fpm
  8. systemctl start php-fpm
  9. yum -y install gcc gcc-c++ autoconf automake zlib zlib-devel pcre-devel openssl openssl-devel
  10. yum -y install nginx
  11. wget http://nginx.org/download/nginx-1.15.7.tar.gz
  12. tar zxvf nginx-1.15.7.tar.gz
  13. cd nginx-1.15.7.tar.gz
  14. ./configure --with-poll_module
  15. --with-http_stub_status_module --with-http_ssl_module
  16. --with-http_geoip_module --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie' --with-http_addition_module
  17. make
  18. make install
  19. systemctl enable nginx
  20. systemctl start nginx
  21. cd /etc/nginx/conf.d/
  22. wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
  23. wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
  24. gzip -d GeoIP.dat.gz
  25. gzip -d GeoLiteCity.dat.gz
  26. echo "[mariadb]" >> /etc/yum.repos.d/MariaDB.repo
  27. echo "name = MariaDB" >> /etc/yum.repos.d/MariaDB.repo
  28. echo "baseurl = http://yum.mariadb.org/10.1/centos7-amd64" >> /etc/yum.repos.d/MariaDB.repo
  29. echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB" >> /etc/yum.repos.d/MariaDB.repo
  30. echo "gpgcheck=1" >> /etc/yum.repos.d/MariaDB.repo
  31. yum -y update
  32. yum -y install mariadb mariadb-server
  33. systemctl enable mariadb
  34. systemctl start mariadb
  35. mysql_secure_installation
  36. ### php-fpm session ###
  37. mkdir /var/lib/php/session
  38. mkdir /var/lib/php/wsdlcache
  39. chmod -R 777 /var/lib/php
  40. chown -R apache:apache /var/lib/php
  41.  
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
chrispengcn
  • Website

Related Posts

Centos系统下安装Centos-WebPanel(CWP)

12 1 月, 2022

Varnish 5.1 & WordPress 带来内存级加速

9 1 月, 2022

Ventoy.net 最牛逼的装机U盘软件

26 12 月, 2021

How to install latest version of OpenSSL on CentOS?

7 8 月, 2021
Add A Comment

Leave A Reply Cancel Reply

*

code

导航
  • 首页
  • 关于我们
  • 服务项目
  • 项目案例
  • 博客文章
  • 联系我们
博客
  • 服务器运维
  • 服务器安装
  • nginx
  • PHP
  • WordPress
  • Python
  • Javascript
  • SEO
  • 电子商务
  • 大数据采集
  • 宝塔面板
  • 数据库
  • 电子商务
  • 虚拟化
  • 阿里云
导航
  • 首页
  • 关于我们
  • 谷歌SEO服务
  • 谷歌ADS/SEM代运营
  • WordPress建站服务
  • 项目案例
  • 博客
  • 联系我们
最新文章
  • 机械模具加工公司网站设计案例
  • 快速原型公司案例
  • 陶瓷加工网站案例
  • CNC数控加工日文网站案例
  • 触摸一体机数字标牌厂家网站案例
关于我们
关于我们

广州纬来科技有限公司
联系地址:广东省广州市番禺区富华中路富源二街18号合和大厦809

QQ : 13602156
Email : 13926026058@139.com
Contact: +86 13926026058

Facebook Twitter YouTube LinkedIn
© 2025 广州纬来科技有限公司 粤ICP备2023105857号-2
  • 首页
  • 关于我们
  • 谷歌SEO服务
  • 谷歌ADS/SEM代运营
  • WordPress建站服务
  • 项目案例
  • 博客
  • 联系我们

Type above and press Enter to search. Press Esc to cancel.