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

yum php mysql nginx

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

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;  

       }


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

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

分享给朋友:

相关文章

采集品牌chinaapp数据

1至3个 $pregstr = "/<div class\=\"Various\" id\=\"voteList_shida\">([\s...

贴吧遇到的坑

发帖频率 在同一个吧,频率不会有太大限制,我看到一个账号连续发了30个帖子。发帖频率,不同吧,同一个号间隔最好大于5分钟。...

CentOS 7关闭firewalld启用iptables 开放端口

CentOS 7关闭firewalld启用iptables 开放端口

在CentOS7中,有很多CentOS 6中的常用服务发生了变化。其中iptables是其中比较大的一个。防火墙iptables被firewalld取代。本文将介绍,如果采用systemctl关闭fi...

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

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

腾讯云 linux nginx 配置 ssl

首先在腾讯云购买一台服务器 (Linux),域名绑定IP,这篇文章以我的域名 banwago.com 为例。申请 DV SSL 证书,一天左右会颁发下来,假设你用的客户端是 windows,下载证书,...

linux下mysql忘记密码怎么办

前言今天在服务器安装mysql之后,登录发现密码错误,但是我没有设置密码呀,最后百度之后得知,mysql在5.7版本之后会自动创建一个初始密码。报错如下:[root@mytestlnx02 ...