php伺服器環境搭建與oracle支援

來源:互聯網
上載者:User
  1. rpm -ivh http://nginx.org/packages/centos/6/noarch/rpms/nginx-release-centos-6-0.el6.ngx.noarch.rpm
複製代碼

安裝epel源:

  1. (64位系統) rpm -ivh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
  2. (32位系統) rpm -ivh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
複製代碼

安裝remi源:

  1. rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
複製代碼

開啟remi,編輯源設定vim /etc/yum.repos.d/remi.repo修改 enable=1安裝基礎包:

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

安裝php+mysql,完成php伺服器的配置,php環境搭建: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

修改/etc/php-fpm.conf 的使用者和組為nginx(apache-->nginx)修改/var/lib/php/session(使php能儲存session),web使用者組為nginx

  1. chown -r nginx:nginx /var/lib/php/session(不存在則需要建立)
  2. chown -r nginx:nginx /home/htdocs/(web目錄)
  3. chmod -r 775 /home/htdocs/ (同組可修改許可權,方便配置ftp,ftp應該加入到nginx組,如果需要更高的安全設定,則不應當將唯讀目錄賦予nginx,php組可寫入權限)
複製代碼

設定自啟動

  1. chkconfig nginx on
  2. chkconfig php-fpm on
  3. chkconfig mysqld on
複製代碼

安裝oci8支援下載oracle-instantclient-basic,oracle-instantclient-devel

安裝:rpm -ivh oracle-instantclient11.2-basic

下載oci8類庫:

  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
複製代碼

編譯完成後vim /etc/php.d/oci8.ini加入extension=oci8.so

php的配置總配置:/etc/php.ini啟動配置:/etc/php.d/(目錄),/etc/php-zts.d/(目錄)

nginx的配置總配置:/etc/nginx/nginx.conf分配置:/etc/nginx/conf.d/(目錄)

php-fpm的配置總配置:/etc/php-fpm.conf分配置:/etc/php-fpm.d/(目錄)php 伺服器環境搭建配置(apache與iis兩種方法)php伺服器環境搭建方法ubuntu下配置php伺服器環境php與mysql伺服器配置說明php擷取伺服器資訊的類php擷取伺服器端資訊的另類方法php擷取伺服器資訊的一段代碼

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.