- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
1.首先要安装pcre
(1)yum install pcre
(2)或者下载源安装:ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.10.tar.gz
#tar zxvf pcre2-10.10.tar.gz
#cd pcre2-10.10
#./configure
#make
#make install
2.再次安装zlib用于数据压缩
(1)yum install zlib
(2)或者下载源安装:wget http://www.landui.com/zlib-1.2.8.tar.gz
#tar -zxvf zlib-1.2.8.tar.gz
#cd zlib-1.2.8
#./configure --prefix=/usr/local/share/zlib 制定安装路径
#make 编译
#make install 安装
3.最后安装nginx,首先要下载更新nginx源
(1)安装nginx源:
rpm -ivh http://www.landui.com/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum install nginx
(2)或者手动输入:
touch /etc/yum.repos.d/nginx.repo
vi /etc/yum.repos.d/nginx.repo输入下面内容:
[nginx]
name=nginx repo
baseurl=http://www.landui.com/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
保存后使之立即生效:yum makecache
安装:yum install nginx
默认安装路径:/etc/nginx
4.还没完,接下来安装php
(1)yum install php php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt
(2)如果要让nginx认识php那么要有中间人php-fpm的介绍:
yum install php-fpm
service php-fpm start
chkconfig php-fpm on
5.重启下nginx现在可以建立php站点了,注意在站点的配置文件中需要把
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;修改为:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
售前咨询
售后咨询
备案咨询
二维码
TOP