centos 7 php5.3(apache配置php环境)

大家好,今天来为大家分享centos 7 php5.3的一些知识点,和apache配置php环境的问题解析,大家要是都明白,那么可以忽略,如果不太清楚的话可以看看本篇文章,相信很大概率可以解决您的问题,接下来我们就一起来看看吧!

debian8怎么安装php7

debian8编译安装 php7

目录(?)[-]

Please reinstall the libcurl distributionCannot find OpenSSL

configure error Unable to locate gmph

Can not find recodeh anywhere under usr usrlocal usr optCannot find pspell

Please reinstall the mysql distribution

mcrypth not found Please reinstall libmcryptxml2-config not found

安装编译器

apt-get install build-essential autoconf automake libtool bison re2c获取PHP安装包

wget 安装dev包

apt-get install libxml2-dev libssl-dev libbz2-dev libjpeg-dev libpng-dev libxpm-dev libfreetype6-dev libgmp-dev libgmp3-dev libmcrypt-dev libmysqlclient15-dev libpspell-dev librecode-dev进行编译安装

./buildconf//用来生成configure脚本

./configure\

--prefix=/usr\

--with-config-file-path=/etc\

--enable-mbstring\

--enable-zip\

--enable-bcmath\

--enable-pcntl\

--enable-ftp\

--enable-exif\

--enable-calendar\

--enable-sysvmsg\

--enable-sysvsem\

--enable-sysvshm\

--enable-wddx\

--with-curl\

--with-mcrypt\

--with-iconv\

--with-gmp\

--with-pspell\

--with-gd\

--with-jpeg-dir=/usr\

--with-png-dir=/usr\

--with-zlib-dir=/usr\

--with-xpm-dir=/usr\

--with-freetype-dir=/usr\

--with-t1lib=/usr\

--enable-gd-native-ttf\

--enable-gd-jis-conv\

--with-openssl\

--with-pdo-mysql=/usr\

--with-gettext=/usr\

--with-zlib=/usr\

--with-bz2=/usr\

--with-recode=/usr\

--with-mysqli=/usr/bin/mysql_config

备注:错误1:Cannot find OpenSSL's libraries解决:

确认已安装过 openssl、libssl-dev包,还是会提示该错误;解决办法:

root@test2:~/php-5.3.27# find/-name libssl.so输出结果为:/usr/lib/x86_64-Linux-gnu/libssl.so初步判断它可能只会在/usr/lib/下寻找 libssl.so文件,于是:

ln-s/usr/lib/x86_64-linux-gnu/libssl.so/usr/lib错误2:debian Please reinstall the libcurl distribution解决:

# RetHat CentOS or Fedora使用下面安装命令yum install curl curl-devel

# Debian or Ubuntu使用下面的安装命令

apt-get install curl

apt-get install libcurl4-gnutls-dev

错误3:Unable to locate gmp.h解决:

在下载 gmp源码包,接着./configure&& make&& make install编译安装

make&&make install

报错处理

Please reinstall the libcurl distributionaptitude search libcurl4

aptitude install libcurl4-gnutls-dev

Cannot find OpenSSL’

wget openssl-1.0.2j.tar.gz

cd openssl-1.0.2j

./config

make&& make install

configure: error: Unable to locate gmp.h

sudo apt-get install libgmp-dev libgmp3-devln-s/usr/include/x86_64-linux-gnu/gmp.h/usr/include/gmp.hCan not find recode.h anywhere under/usr/usr/local/usr/opt.

apt-get install librecode-dev

Cannot find pspell

apt-get install libpspell-dev

Please reinstall the mysql distribution

apt-get install libmysqlclient15-dev

mcrypt.h not found. Please reinstall libmcrypt.

apt-get install libmcrypt-dev

xml2-config not found

apt-get install libxml2-dev

如何在CentOS 7/6.5/6.4 下安装PostgreSQL 9.3 与 phpPgAdmin

PostgreSQL是一个强大开源的对象关系类型数据库系统,它能运行于几乎所有主要的操作系统,包括Linux、Unix(AIX、BSD、HP-UX、SGI IRIX、Mac OS、Solaris、Tru64)、Windows OS。在这篇教程里,我们将学习如何在CentOS7/6.5/6.4 server中建立PostgreSQL。

1.安装PostgreSQL

首先根据你的服务器架构添加PostgreSQL库:

对CentOS 6.x 32bit:

rpm-Uvh 1.noarch.rpm

对CentOS 6.x 64bit:

rpm-Uvh

对CentOS 7 64bit:

rpm-Uvh

对于其它的发行版,可查看以下链接并建立库:

使用以下命令来更新库:

yum update

使用以下命令来安装PostgreSQL:

yum install postgresql93-server postgresql93-contrib

使用以下命令来初始化PostgreSQL数据库:

在CentOS 6.x系统中:

service postgresql-9.3 initdb

在CentOS 7系统中:

/usr/pgsql-9.3/bin/postgresql93-setup initdb

然后启动PostgreSQL服务并使之开机自启:

在CentOS 6.x系统中:

service postgresql-9.3 start

chkconfig postgresql-9.3 on

在CentOS 7系统中:

systemctl enable postgresql-9.3

systemctl start postgresql-9.3

2.调整Iptables/Firewall

接下来调整防火墙出站规则:

在CentOS 6.x系统中:

vi/etc/sysconfig/iptables

并添加以下行

-A INPUT-m state--state NEW-m tcp-p tcp--dport 5432-j ACCEPT

-A INPUT-m state--state NEW-m tcp-p tcp--dport 80-j ACCEPT

退出并保存文件。重启iptables服务:

service iptables restart

在CentOS系统中:

firewall-cmd--permanent–add-port=5432/tcp

firewall-cmd--permanent–add-port=80/tcp

firewall-cmd--reload

3.访问PostgreSQL常用的命令提示符

默认情况下数据库名和用户名都是postgres。切换至用户以执行相关操作:

su– postgres

输入以下命令登陆:

psql

会有以下样例输出:

psql(9.3.5)

Type"help" for help.

Postgres=#

可通过输入\q退出postgresql返回命令终端:

4.设置用户密码

登陆至postgres命令提示符界面

su– postgres

psql

然后使用命令设置密码

postgres=#\password postgres

Enter new password:

Enter it again:

postgres=#\q

输入命令以建立PostgreSQL系统管理工具

postgres=# CREATE EXTENSION adminpack;

CREATE EXTENSION

5.创建用户和数据库

例如:用户名:senthil密码:centos数据库名:mydb

转到postgres用户

su– postgres

创建用户senthil

$ createuser senthil

创建数据库

$ createdb mydb

现在登陆至psql提示符界面,为用户senthil设置密码及授权对数据库mydb的访问:

$ psql

psql(9.3.5)

Type"help" for help.

postgres=# alter user senthil with encrypted password'centos';

ALTER ROLE

postgres=# grant all privileges on database mydb to senthil;

GRANT

postgres=#

6.删除用户和数据库

首先转到postgres界面

su– postgres

输入命令

$ dropdb<database-name>

删除用户名可输入

$ dropuser<user-name>

7.配置PostgreSQL-MD5认证

MD5认证需要客户端提供一个MD5-encrypted密码以便身份验证。你需要编辑/var/lib/pgsql/9.3/data/pg_hba.conf文件:

vi/var/lib/pgsql/9.3/data/pg_hba.conf

添加或修改的行如下:

[...]

# TYPE DATABASE USER ADDRESS METHOD

#"local" is for Unix domain socket connections only

local all all md5

# IPv4 local connections:

host all all 127.0.0.1/32 md5

host all all 192.168.1.0/24 md5

# IPv6 local connections:

host all all::1/128 md5

[...]

重启postgresql服务以应用更改

在CentOS 6.x系统中

service postgresql-9.3 restart

在CentOS 7系统中

systemctl restart postgresql-9.3

8.配置PostgreSQL-Configure TCP/IP

默认情况下,TCP/IP连接是不可行的,所以其他计算机用户不能连接到postgresql。编辑文件/var/lib/pgsql/9.3/data/postgresql.conf可以允许连接:

vi/var/lib/pgsql/9.3/data/postgresql.conf

找到下面的行:

[...]

#listen_addresses='localhost’

[...]

#port= 5432

[...]

把两行都取消并设置为你的postgresql服务器IP地址或设置为“*”监听所有客户端。如下所示:

listen_addresses='*'

port= 5432

重启以应用更改

在CentOS6.x系统中:

/etc/init.d/postgresql-9.3 restart

在CentOS7系统中:

systemctl restart postgresql-9.3

9.使用phpPgAdmin管理PostgreSQL

phpPgAdmin是使用PHP编写的基于web的管理工具,用于管理PostgreSQL。它只适用与PostgreSQL RPM库。

如果你没有添加PostgreSQL库,你可以添加EPEL库。

可根据下面的链接在CentOS 6.x中建立EPEL库

CentOS 7的话参考下面的链接

使用命令更新库

yum update

现在输入命令安装phpPgAdmin:

yum install phpPgAdmin httpd

注意phpPgAdmin区分大小写,要准确使用上面所示的大小写!

默认你可以使用访问phpPgAdmin。若要远程访问需要继续:

编辑文件/etc/httpd/conf.d/phpPgAdmin.conf

vi/etc/httpd/conf.d/phpPgAdmin.conf

修改如下加粗的部分:

[...]

Alias/phpPgAdmin/usr/share/phpPgAdmin

<Location/phpPgAdmin>

<IfModule mod_authz_core.c>

# Apache 2.4

Require all granted

#Require host example.com

</IfModule>

<IfModule!mod_authz_core.c>

# Apache 2.2

Order deny,allow

Allow from all

# Allow from.example.com

</IfModule>

</Location>

启动或重启Apache服务

在CentOS 6.x系统中

service httpd start

chkconfig httpd on

在CentOS 7系统中

systemctl enable httpd

systemctl start httpd

现在打开浏览器并转到。终于看到下面的界面了!

使用你之前创建的用户登录,我的是用户senthil密码CentOS。

你可能会遇到:Login failed。

这是因为SELLinux可能限制用户连接到PostgreSQL,只需输入以下命令更改即可:

setsebool-P httpd_can_network_connect_db 1

现在你应该能正常登录了。

linux下phpstudy怎么安装php环境变量

linux下phpstudy环境的安装

phpStudy Linux版&Win版同步上线支持Apache/Nginx/Tengine/Lighttpd/IIS7/8/6

phpStudy for Linux支持Apache/Nginx/Tengine/Lighttpd,

支持php5.2/5.3/5.4/5.5切换

已经在centos-6.5,debian-7.4.,ubuntu-13.10测试成功。

下载版:http//lamp.phpstudy.net/phpstudy.bin

完整版:http//lamp.phpstudy.net/phpstudy-all.bin

安装:

wget-c http//lamp.phpstudy.net/phpstudy.bin

chmod+x phpstudy.bin#权限设置

./phpstudy.bin#运行安装

用时十到几十分钟不等,安装时间取决于电脑的下载速度和配置。

也可以事先下载好完整,安装时无需下载。

安装完成

如何切换php版:

假如你先安装的apache+php5.3

想切换成nginx+php5.4

你就再走一次./phpstudy.bin

但是你会发现有一行是否安装mysql提示选不安装

这样只需要编译nginx+php5.4

从而节省时间,这样只需要几分钟即可。

项目地址:

使用说明:

服务进程管理:phpstudy(start|stop|restart|uninstall)

站点主机管理:phpstudy(add|del|list)

ftpd用户管理:phpstudy ftp(add|del|list)

=phpstudy WIN版下载==================

『软件简介』

该程序包集成最新的Apache+Nginx+LightTPD+PHP+MySQL+phpMyAdmin+Zend Optimizer+Zend Loader,一次性安装,无须配置即可使用,是非常方便、好用的PHP调试环境。该程序绿色小巧简易迷你仅有35M,有专门的控制面板。总之学习PHP只需一个包。

对学习PHP的新手来说,WINDOWS下环境配置是一件很困难的事;对老手来说也是一件烦琐的事。因此无论你是新手还是老手,该程序包都是一个不错的选择。

1、全面适合 Win2000/XP/2003/win7/win8/win2008操作系统,支持Apache、IIS、Nginx和LightTPD。

2、该程序包集成以下软件,括号内为phpstudy下对应的目录。

php 5.6a3(php56n)

php 5.5.10(php55)

php 5.5.10-nts(php55n)

php 5.4.26(php54)

php 5.4.26-nts(php54n)

php 5.3.28(php53)

php 5.3.28-nts(php53n)

php 5.2.17(php52)

Apache 2.4.7(Apache)

Nginx 1.5.11(nginx)

LightTPD 1.4.32(Lighttpd)

MySQL 5.5.36(MySQL)

MySQL-Front 5.3(SQL-Front)

phpMyAdmin 3.5.8.2(phpMyAdmin)

pear 1.9.4(pear)

OpenSSL 1.0.1e&0.9.8y

ZendOptimizer 3.3.3(php5.2有)

Zend Loader 5.5.0(php5.3有)

Zend Loader 6.0.0(php5.4有)

wincache 1.3.5(fastcgi有)

php_opcache 7.0.3(ZendOpcache扩展)

xdebug 2.2.3.1

Zend Debugger 6.2(php5.3/4 fastcgi有)

xcache 3.1.0

eAccelerator 1.0&0.9.6

php_sqlsrv(MSSQL扩展)

php_pdo_sqlsrv(PDO-MSSQL扩展)

php_mongo 1.4.5(MongoDB扩展)

php_dbase 5.1.0(dbase扩展)

php_dbx 1.1.2(dbx扩展)

php_ibm_db2 1.9.5(ibm_db2扩展)

php_apc 3.1.13(php_apc扩展)

php_memcache 3.0.8

phpStudy Ftp server(FTPServ)

SendMail 3.2(sendmail)

VC++ 2008运行库

3、MySQL数据库默认用户名:root,密码root,安装后请重新设置密码。

4、本程序纯绿色,支持22种组合一键切换,支持系统服务和非服务两种启动方式,自由切换。改变安装路径或拷贝到别的电脑上也可正常运行;即便是运行完再更改路径也能运行,真正做到无须配置。重写控制面板更加有效直观地进行控制程序的启停。

5、自带FTP服务器,支持多用户,无需再安装FTP服务器。自带网站挂马监视器,随时记录文件的修改情况,让挂马文件无处可逃。

6、本程序完美支持II7,IIS8和IIS6。应网友的要求制作Nginx版和Lighttpd版。Nginx版为phpfind,Lighttpd版为phpLight。

推荐:学习JSP用JspStudy。

『软件简介』

JspStudy集成JDK+tomcat+Apache+mysql,JSP环境配置一键启动。无需修改任何配置即可迅速搭建支持JSP的服务器运行环境。

纯绿色解压即可,支持系统服务和非服务两种启动方式,自由切换。控制面板更加有效直观地进行控制程序的启停。

JspStudy将复杂的JSP环境配置简单化。

『特别注意』

1.为了减少出错安装路径不得有汉字,如有防火墙开启,会提示是否信任httpd、mysqld运行,请选择全部允许。

2.此为apache+php方案,需要Nginx+php方案的请到www.phpStudy.net下载phpfind,Lighttpd+PHP方案下载phpLight。

3.重装系统后或相关服务丢失时,只需要点一下『运行模式-应用』即可。

4.可通过菜单『卸载相关服务』进行卸载相关服务。

5.在『启动』、『停止』、『重启』三个启停按钮上右键可以有选择地进行启停,左键将控制全部的启停。

6.菜单『phpStudy设置』可以进行php,apche,mysql的相关设置。菜单『站点域名设置』可以进行站点及域名的添加。

7.本程序分为安装版和非安装版,无论是安装还是免安装,最后的效果完全一致。

8.端口问题无法启动时,请使用菜单『环境端口检测』进行端口检测,尝试启动。

26种组合一键切换apache+php

php扩展管理超级方便

nginx+php

IIS7/8/6+php

mysql备份还原导入导出

站点域名设置

端口检测

博客不再更新,请到官方网站下载:

下载地址解压版:

下载地址安装版:

其他版本:

软件简单说明各版本的区别大小下载

phpStudy26种组合,超全大合集Apache+Nginx+LightTPD+IIS

php5.2 php5.3 php5.4 php5.5 php5.6

MySQL phpMyAdmin MySQL-Front

26种组合自由切换,是下面5个版本的合集

同时支持apache/nginx/Lighttpd和IIS7/8/636M解压版

安装版

phpStudy

Lite

新手用,经典wamp组合Apache+php5.3+php5.4+MySQL(wamp集成包)

没有上面合集复杂的多版本设置,简单适合新手。16M解压版

phpStudy

for IIS

IIS服务器专用IIS+php5.2+php5.3+php 5.4+MySQL

php一键安装包 for IIS7/8/6(IIS服务器专用)21M解压版

phpStudy

for Linux

Linux服务器专用(lamp)Apache+Nginx+LightTPD+MySQL

php5.2+php5.3+php5.4+php5.5一键安装包

支持centos,ubuntu,debian等Linux系统,12种组合80M安装版

phpfindnginx+php组合(wnmp)Nginx+php5.3+php5.4+MySQL(wnmp集成包)

nginx+php组合,适合喜欢用nginx的朋友16M解压版

phpLightlighttpd+php组合(wlmp)Lighttpd+php5.3+php5.5+MySQL(wlmp集成包)17M解压版

phpStudy

(php5.2)

apache+php5.2珍藏版Apache2.2+php5.2.17+MySQL5.1

php5.2经典组合值得收藏,仅有11M,无需运行库11M解压版

JspStudyJSP环境一键安装包JDK+tomcat+Apache+mysql+php

纯绿色解压即可,不添加环境变量,不修改注册表52M解压版

下载地址:

php5.3+php5.4合集下载: http//www.phpstudy.net/phpstudy/phpStudy.zip

阅读剩余
THE END