Php Server environment setup and oracle support-php Tutorial

Source: Internet
Author: User
Tags openldap
Php Server environment setup and oracle support

  1. Rpm-ivh http://nginx.org/packages/centos/6/noarch/rpms/nginx-release-centos-6-0.el6.ngx.noarch.rpm

Install the epel Source:

  1. (64-bit system) rpm-ivh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
  2. (32-bit system) rpm-ivh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm

Install remi Source:

  1. Rpm-ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Enable remi, edit the source settings vim/etc/yum. repos. d/remi. repo, and modify enable = 1 to install the basic package:

  1. Yum-y install gcc-c ++ autoconf libjpeg-devel libpng-devel freetype-devel libxml2 libxml2-devel zlib-devel glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses- devel curl-devel cipher e2fsprogs-devel krb5 krb5-devel libidn-devel openssl-devel openldap-devel nss_ldap openldap-clients openldap-servers libmcrypt-devel pcre-devel

Install php + mysql, complete the configuration of the php server, and set up the php environment: yum-y install nginx mysql-server php-fpm php-cli php-pdo php-mysql php-mcrypt php-mbstring php-gd php-tidy php-xml php-xmlrpc php- pear php-pecl-memcache php-eaccelerator

Modify/etc/php-fpm.conf users and groups to nginx (apache --> nginx) modify/var/lib/php/session (enable php to save session), web user group to nginx

  1. Chown-r nginx: nginx/var/lib/php/session (create if no session exists)
  2. Chown-r nginx: nginx/home/htdocs/(web directory)
  3. Chmod-r 775/home/htdocs/(permissions can be modified in the same group to facilitate ftp configuration. ftp should be added to the nginx group. if higher security settings are required, therefore, the read-only directory should not be granted to nginx, and the php Group can write permission)

Set auto-start

  1. Chkconfig nginx on
  2. Chkconfig php-fpm on
  3. Chkconfig mysqld on

Installing oci8 supports downloading oracle-instantclient-basic and oracle-instantclient-devel

Installation: rpm-ivh oracle-instantclient11.2-basic

Download the oci8 class library:

  1. Pear download pecl/oci8
  2. Tar xvzf oci8
  3. Cd oci8
  4. Ln-s/usr/include/oracle/11.2/client/usr/lib/oracle/11.2/client/lib/include
  5. Phpize
  6. ./Configure -- with-oci8 = shared, instantclient,/usr/lib/oracle/11.2/client/lib/
  7. Make all install

After compilation, vim/etc/php. d/oci8.ini is added to extension = oci8.so.

Php configuration Total configuration:/etc/php. ini startup configuration:/etc/php. d/(directory),/etc/php-zts.d/(directory)

Nginx configuration:/etc/nginx. conf configuration:/etc/nginx/conf. d/(directory)

Php-fpm configuration Total configuration:/etc/php-fpm.conf sub-configuration:/etc/php-fpm.d/(directory) php Server environment build configuration (apache and iis two methods) php Server environment construction method: Configure php Server environment in ubuntu php and mysql server configuration description php obtains server information Class php obtains server information alternative method php obtains server information a piece of code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.