设为首页 收藏本站
查看: 701|回复: 0

[经验分享] nginx结合apache

[复制链接]

尚未签到

发表于 2018-11-11 12:23:06 | 显示全部楼层 |阅读模式
  mkdir -pv /home/{software,data0,data1}
  ln -s /home/software /
  ln -s /home/data0 /
  ln -s /home/data1 /
  cd /software
  wget http://blog.s135.com/soft/linux/nginx_php/nginx/nginx-0.8.46.tar.gz
  wget http://blog.s135.com/soft/linux/nginx_php/php/php-5.2.14.tar.gz
  wget http://blog.s135.com/soft/linux/nginx_php/phpfpm/php-5.2.14-fpm-0.5.14.diff.gz
  wget http://blog.s135.com/soft/linux/nginx_php/mysql/mysql-5.5.3-m3.tar.gz
  wget http://blog.s135.com/soft/linux/nginx_php/libiconv/libiconv-1.13.1.tar.gz
  wget http://blog.s135.com/soft/linux/nginx_php/mcrypt/libmcrypt-2.5.8.tar.gz
  wget http://blog.s135.com/soft/linux/nginx_php/mcrypt/mcrypt-2.6.8.tar.gz
  wget http://blog.s135.com/soft/linux/nginx_php/memcache/memcache-2.2.5.tgz
  wget http://blog.s135.com/soft/linux/nginx_php/mhash/mhash-0.9.9.9.tar.gz
  wget http://blog.s135.com/soft/linux/nginx_php/pcre/pcre-8.10.tar.gz
  wget http://blog.s135.com/soft/linux/nginx_php/eaccelerator/eaccelerator-0.9.6.1.tar.bz2
  wget http://blog.s135.com/soft/linux/nginx_php/pdo/PDO_MYSQL-1.0.2.tgz
  wget http://blog.s135.com/soft/linux/nginx_php/imagick/ImageMagick.tar.gz
  wget http://blog.s135.com/soft/linux/nginx_php/imagick/imagick-2.3.0.tgz
  wget http://www.monkey.org/~provos/libevent-1.3.tar.gz
  wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
  wget http://www.teslacore.it/projects/amfext/amfext-0.9.zip
  wget http://labs.renren.com/apache-mirror/httpd/httpd-2.2.16.tar.bz2
  tar zxvf libiconv-1.13.1.tar.gz
  cd libiconv-1.13.1/
  ./configure --prefix=/usr/local
  make
  make install
  cd ../
  tar zxvf libmcrypt-2.5.8.tar.gz
  cd libmcrypt-2.5.8/
  ./configure
  make
  make install
  ldconfig
  cd libltdl/
  ./configure --enable-ltdl-install
  make
  make install
  cd ../../
  tar zxvf mhash-0.9.9.9.tar.gz
  cd mhash-0.9.9.9/
  ./configure
  make
  make install
  cd ../
  ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
  ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
  ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
  ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
  ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
  ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
  ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
  ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
  ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
  ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
  tar zxvf mcrypt-2.6.8.tar.gz
  cd mcrypt-2.6.8/
  ldconfig
  ./configure
  make
  make install
  cd ../
  groupadd mysql
  useradd -g mysql mysql
  tar zxvf mysql-5.5.3-m3.tar.gz
  cd mysql-5.5.3-m3/
  ./configure --prefix=/usr/local/gserver/mysql/ --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=partition,innobase,myisammrg
  make && make install
  chmod +w /usr/local/gserver/mysql
  chown -R mysql:mysql /usr/local/gserver/mysql
  cd ../
  mkdir -p /data0/mysql/3306/data/
  mkdir -p /data0/mysql/3306/binlog/
  mkdir -p /data0/mysql/3306/relaylog/
  chown -R mysql:mysql /data0/mysql/
  /usr/local/gserver/mysql/bin/mysql_install_db --basedir=/usr/local/gserver/mysql --datadir=/data0/mysql/3306/data --user=mysql(end)
  vim /data0/mysql/3306/my.cnf
  vim /data0/mysql/3306/mysql
  chmod +x /data0/mysql/3306/mysql
  /data0/mysql/3306/mysql start
  /usr/local/gserver/mysql/bin/mysql -u root -p -S /tmp/mysql.sock

  GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost'>
  GRANT ALL PRIVILEGES ON *.* TO 'admin'@'127.0.0.1'>
  grant all privileges on *.* to 'admin'@'%'>  tar xvf httpd-2.2.16.tar.bz2
  cd httpd-2.2.16
  ./configure --prefix=/usr/local/gserver/apache2 --enable-mods-shared=most --enable-so --enable-cache --enable-disk-cache --enable-mem-cache --enable-rewrite --enable-ssl
  make
  make install
  echo "export PATH=\$PATH:/usr/local/apache2/bin" >> /etc/profile
  echo "/usr/local/apache2/bin/apachectl start" >> /etc/rc.local
  cd /software
  tar zxvf php-5.2.14.tar.gz
  cd php-5.2.14/
  ./configure --prefix=/usr/local/gserver/php --with-config-file-path=/usr/local/gserver/php/etc --with-mysql=/usr/local/gserver/mysql --with-mysqli=/usr/local/gserver/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex  --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --with-apxs2=/usr/local/gserver/apache2/bin/apxs --without-sqlite --without-pdo-sqlite
  make clean
  make ZEND_EXTRA_LIBS='-liconv'
  make install
  cp php.ini-dist /usr/local/gserver/php/etc/php.ini
  cd ../
  tar zxvf memcache-2.2.5.tgz
  cd memcache-2.2.5/
  /usr/local/gserver/php/bin/phpize
  ./configure --with-php-config=/usr/local/gserver/php/bin/php-config
  make
  make install
  cd ../
  tar xvfz  libevent-1.3.tar.gz
  cd libevent-1.3
  ./configure --prefix=/usr
  make
  make install
  cd ..
  tar xvf memcached-1.4.5.tar.gz
  cd memcached-1.4.5
  ./configure --with-libevent=/usr
  make
  make install
  /usr/local/bin/memcached -d -m 128 -u root -l 127.0.0.1 -p 11211 -c 512 -P /tmp/memcached.pid
  cd ..
  tar zxvf PDO_MYSQL-1.0.2.tgz
  cd PDO_MYSQL-1.0.2/
  /usr/local/gserver/php/bin/phpize
  ./configure --with-php-config=/usr/local/gserver/php/bin/php-config --with-pdo-mysql=/usr/local/gserver/mysql
  make
  make install
  cd ../
  tar zxvf ImageMagick.tar.gz
  cd ImageMagick-6.5.1-2/
  ./configure
  make
  make install
  cd ../
  tar zxvf imagick-2.3.0.tgz
  cd imagick-2.3.0/
  /usr/local/gserver/php/bin/phpize
  ./configure --with-php-config=/usr/local/gserver/php/bin/php-config
  make
  make install
  cd ../
  cd /software
  unzip amfext-0.9.zip
  cd amfext-0.9
  /usr/local/gserver/php/bin/phpize
  ./configure --enable-amf --with-php-config=/usr/local/gserver/php/bin/php-config
  make && make install
  cd ..
  groupadd www
  useradd -g www www
  mkdir -p /data0/htdocs
  chmod +w /data0/htdocs
  chown -R www:www /data0/htdocs
  tar zxvf pcre-8.10.tar.gz
  cd pcre-8.10/
  ./configure
  make
  make install
  cd ../
  tar zxvf nginx-0.8.46.tar.gz
  cd nginx-0.8.46/
  ./configure --user=www --group=www --prefix=/usr/local/gserver/nginx --with-http_stub_status_module --with-http_ssl_module
  make
  make install
  cd ../
  mkdir -p /data1/logs
  chmod +w /data1/logs
  chown -R www:www /data1/logs
  vi /usr/local/gserver/nginx/conf/nginx.conf
  vi /usr/local/gserver/nginx/conf/fcgi.conf
  ulimit -SHn 65535
  /usr/local/gserver/nginx/sbin/nginx
  echo "/usr/local/gserver/nginx/sbin/nginx" >> /etc/rc.local
  echo "/data0/mysql/3306/mysql start" >> /etc/rc.local
  echo "/usr/local/bin/memcached -d -m 128 -u root -l 127.0.0.1 -p 11211 -c 512 -P /tmp/memcached.pid" >> /etc/rc.local


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.iyunv.com/thread-633684-1-1.html 上篇帖子: nginx的读写分离 下篇帖子: Nginx系列大纲
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表