当前位置:首页 > 技术记录 > 正文内容

yum php mysql nginx

ogfogf5年前 (2021-07-08)技术记录2309

systemctl stop firewalld.service #停止firewall 

  systemctl disable firewalld.service #禁止firewall开机启动


yum install epel-release


yum update


 rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm




yum install -y php php-devel php-fpm php-mysql php-common php-devel php-gd  php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt libmcrypt-devel mod_ssl mod_perl  curl curl-devel nginx  mariadb mariadb-server php-redis


/usr/share/nginx/html


systemctl start nginx.service #启动nginx 

systemctl stop nginx.service #停止 

systemctl restart nginx.service #重启 

systemctl enable nginx.service #设置开机启动


systemctl start php-fpm.service #启动php-fpm 

systemctl enable php-fpm.service #设置开机启动



yum install mariadb mariadb-server #询问是否要安装,输入Y即可自动安装,直到安装完成 

  systemctl start mariadb.service #启动MariaDB 

  systemctl stop mariadb.service #停止MariaDB 

  systemctl restart mariadb.service #重启MariaDB 

  systemctl enable mariadb.service #设置开机启动



mysqladmin -u root password '123456789'; #设置数据库密码



  location / {  

           root   /usr/share/nginx/html;  

           index  index.html index.htm index.php;  

       }  


location ~ \.php$ {  

           root           html;  

           fastcgi_pass   127.0.0.1:9000;  

           fastcgi_index  index.php;  

           fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;  

           include        fastcgi_params;  

       }


扫描二维码推送至手机访问。

版权声明:本文由技术建站文档发布,如需转载请注明出处。

分享给朋友:

相关文章

PHP hash_hmac sha256 遇到的坑 解决PHP与JAVA sha256结果不一致

$str = "POST\n/api/tenants/5950/rest/channels/20/messages\n1489490514142\n705bfbd388d2bf852813f...

linux 安装 ffmpeg

linux 安装 ffmpeg

https://blog.csdn.net/u013416034/article/details/130649958windows上安装,直接下载压缩包解压。linux安装,找了半天各种技术文章,说最...

linux查看端口常用命令

netstat命令参数:  -t : 指明显示TCP端口  -u : 指明显示UDP端口  -l : 仅显示监听套接字(所谓套接字就是使应用程序能够读写与收发通讯协议(protocol)与资料的程序)...

Linux关闭防火墙命令

一、下面是red hat/CentOs7关闭防火墙的命令!1:查看防火状态systemctl status firewalldservice iptables status2:暂时关闭防火墙syste...

如何判断页面是通过返回按钮进入

window.addEventListener('pageshow', function (event) {        if(event.p...

PHP读取word docx文档内容及处理图片

PHP读取word文档里的文字及图片,并保存一、composer安装phpWordcomposer require phpoffice/phpword传送门:https://pac...