- Rpm-ivh http://nginx.org/packages/centos/6/noarch/rpms/nginx-release-centos-6-0.el6.ngx.noarch.rpm
Install the epel Source:
- (64-bit system) rpm-ivh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
- (32-bit system) rpm-ivh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
Install remi Source:
- 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:
- 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
- Chown-r nginx: nginx/var/lib/php/session (create if no session exists)
- Chown-r nginx: nginx/home/htdocs/(web directory)
- 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
- Chkconfig nginx on
- Chkconfig php-fpm on
- 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:
- Pear download pecl/oci8
- Tar xvzf oci8
- Cd oci8
- Ln-s/usr/include/oracle/11.2/client/usr/lib/oracle/11.2/client/lib/include
- Phpize
- ./Configure -- with-oci8 = shared, instantclient,/usr/lib/oracle/11.2/client/lib/
- 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 |