我们要使用yum来安装php-fpm和比较新版本的php,nginx,mysql-server的话, 首先得给yum添加几个源,CentOS默认的源里面软件比较旧,有些软件、库还没有。 EPEL源: Extra Packages for Enterprise Linux (or EPEL)或者叫企业版 Linux 附加软件包, 是一个由特
我们要使用yum来安装php-fpm和比较新版本的php,nginx,mysql-server的话, 首先得给yum添加几个源,CentOS默认的源里面软件比较旧,有些软件、库还没有。
EPEL源:
Extra Packages for Enterprise Linux (or EPEL)或者叫企业版 Linux 附加软件包, 是一个由特别兴趣小组创建、维护并管理的,针对 红帽企业版 Linux(RHEL)及其衍生发行版 (比如 CentOS、 Scientific Linux)的一个高质量附加软件包项目。
EPEL 的软件包通常不会与企业版 Linux 官方源中的软件包发生冲突,或者互相替换文件。 EPEL 与 Fedora 项目基本一致,包含完整的构建系统、升级管理器、镜像管理器等等。
EPEL源官方网站:https://fedoraproject.org/wiki/EPEL
添加EPEL源:
32位CentOS,在命令行运行下面命令:
rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
64位CentOS,在命令行运行下面命令:
rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
EPEL源只能作为CentOS官方源的补充,里面还都是一些系统基础的软件包, 我们要安装的php,php-fpm,mysql等软件里面还是没有,所以接下来添加另一个软件源Remi。
Remi源中的软件几乎都是最新稳定版。或许您会怀疑稳定不?放心吧, 这些都是Linux骨灰级的玩家编译好放进源里的,他们对于系统环境和软件编译参数的熟悉程度毋庸置疑。
Remi官方网站:http://rpms.famillecollet.com/
添加Remi源,不管32位还是64位的系统,运行下面命令:
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Remi源默认是没有启用的,我们来启用Remi源,修改 /etc/yum.repos.d/remi.repo
文件,把文件内的 enabled=0
改为 enabled=1
,注意:改文件内有2个 enabled=0
我们修改[remi]
下面的,不要修改[remi-test]下面的。
到这里yum源的配置结束,下面安装软件就简单了。安装时候有询问y/n的时候都是y
安装php,php-fpm以及php扩展:
yum install php php-fpm php-bcmatch php-gd php-mbstring php-mcrypt php-mysql
安装mysql:
yum install mysql-server
安装nginx:
yum install nginx
OK,一切搞定,下面把所有涉及到的配置文件列一下(下面配置文件默认均已自动创建,不用我们自己创建):
Mysql配置文件my.cnf路径:/etc/my.cnf
Nginx配置文件nginx.conf路径:/etc/nginx/nginx.conf
PHP配置文件php.ini路径: /etc/php.ini
php-fpm配置文件php-fpm.conf路径:/etc/php-fpm.conf

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Linux new version
SublimeText3 Linux latest version

Notepad++7.3.1
Easy-to-use and free code editor

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
