php编译 1.1) 依赖包安装 yum install -y systemd-devel libxml2-devel sqlite-devel libcurl-devel libpng-devel yum -y install openssl-devel openssl-libs yum -y localinstall oniguruma-6.8.2-2.el7.x86_64.rpm oniguruma-devel-6.8.2-2.el7.x86_64.rpm ##remi epel elrepo yum仓库 oniguruma 二个rpm包来自 epel 仓库。 1.2) configure ./configure --prefix=/usr/local/php \ --with-config-file-path=/usr/local/php/etc --enable-mysqlnd \ --with-pdo-mysql --with-mysqli --with-openssl \ dir=/usr/local/ssl --with-openssl --enable-gd \ --with-zlib-dir --with-curl --with-pear \ --enable-inline-optimization --enable-soap \ --enable-sockets --enable-mbstring \ --enable-fpm --with-fpm-user=mysql \ --with-fpm-group=mysql --with-fpm-systemd \ --with-apxs2=/usr/local/apache2/bin/apxs make && make install ## php-fpm 如果与nginx配合,他是一个单独的服务 systemctl start php-fpm ## php作为一个模块在httpd之内 1.3) 配置php 和 httpd.conf vi httpd.conf AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps 267 268 DirectoryIndex index.html index.php 269 json yaml 必须严格缩进 ## 比较二个文件,特别是配置文件。 diff httpd.conf httpd.conf.bak 1.4) 测试 [root@mydnsserver htdocs]# pwd /usr/local/apache2/htdocs [root@mydnsserver htdocs]# cat index.php [root@mydnsserver htdocs]# cat test2.php 1.5) 安装 phpmyadmin ## 注意版本匹配关系 php版本 vs phpmyadmin 版本。 phpmyadmin 是用来连接mysql数据库的。 其他连接数据库的工具 phpmyadmin mysql mysqlshell mysqlsh-xxxx.rpm navicat SQLyog ## Github下载地址:https://github.com/webyog/sqlyog-community/wiki/Downloads ## 上述二个,通过ssh隧道连接的功能,比较有特点,好用。 pgAdmin DBeaver HeidiSQL