最近配置了几台Web服务器,将安装笔记贴出来吧。没时间像以前那样,将文章写的那样系统了,请见谅。详细配置,可以看以前的旧文章:

  http://blog.zyan.cc/nginx_php_v6

  1、安装Nginx:
mkdir -p /Data/tgz
cd /Data/tgz
yum install wget
yum install pcre
yum install openssl*
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 make
yum -y install gd gd2 gd-devel gd2-devel
/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
ulimit -SHn 65535
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.32.tar.gz
tar zxvf pcre-8.32.tar.gz
cd pcre-8.32
./configure --prefix=/Data/apps/pcre
make && make install
cd ../

wget http://nginx.org/download/nginx-1.5.2.tar.gz
tar zxvf nginx-1.5.2.tar.gz
cd nginx-1.5.2
./configure --user=www --group=www --prefix=/Data/apps/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/Data/tgz/pcre-8.32 --with-http_realip_module --with-http_image_filter_module
make
make install
cd ../


  2、安装 MySQL:
wget http://downloads.mysql.com/archives/mysql-5.6/mysql-5.6.10-linux-glibc2.5-x86_64.tar.gz
tar zxvf mysql-5.6.10-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.6.10-linux-glibc2.5-x86_64 /Data/apps/mysql
/usr/sbin/groupadd mysql
/usr/sbin/useradd -g mysql mysql
mkdir -p /Data/data/mysql/data
yum install libaio
/Data/apps/mysql/scripts/mysql_install_db --basedir=/Data/apps/mysql --datadir=/Data/data/mysql/data --user=mysql

sed -i "s#/usr/local/mysql#/Data/apps/mysql#g" /Data/apps/mysql/bin/mysqld_safe


  3、安装PHP依赖库
mkdir -p /Data/apps/libs/
wget http://www.ijg.org/files/jpegsrc.v9.tar.gz    
tar zxvf jpegsrc.v9.tar.gz
cd jpeg-9/
./configure --prefix=/Data/apps/libs --enable-shared --enable-static --prefix=/Data/apps/libs
make
make install
cd ../

wget http://prdownloads.sourceforge.net/libpng/libpng-1.6.2.tar.gz
tar zxvf libpng-1.6.2.tar.gz
cd libpng-1.6.2/
./configure --prefix=/Data/apps/libs
make
make install
cd ../

wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.gz
tar zxvf freetype-2.4.12.tar.gz
cd freetype-2.4.12/
./configure --prefix=/Data/apps/libs
make
make install
cd ../


wget "http://downloads.sourceforge.net/mhash/mhash-0.9.9.9.tar.gz?big_mirror=0"
wget "http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?big_mirror=0"
wget "http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.8.tar.gz?big_mirror=0"


tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure --prefix=/Data/apps/libs
make
make install
cd libltdl/
./configure --prefix=/Data/apps/libs --enable-ltdl-install
make
make install
cd ../../


tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure --prefix=/Data/apps/libs
make
make install
cd ../


vi /etc/ld.so.conf

添加:
/Data/apps/libs/lib

然后:
ldconfig


tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
export LDFLAGS="-L/Data/apps/libs/lib -L/usr/lib"
export CFLAGS="-I/Data/apps/libs/include -I/usr/include"
touch malloc.h
./configure --prefix=/Data/apps/libs --with-libmcrypt-prefix=/Data/apps/libs
make
make install
cd ../


  4、编译安装PHP 5.5
wget http://www.php.net/get/php-5.5.1.tar.gz/from/tw2.php.net/mirror
tar zxvf php-5.5.1.tar.gz
cd php-5.5.1/
export LIBS="-lm -ltermcap -lresolv"
export DYLD_LIBRARY_PATH="/Data/apps/mysql/lib/:/lib/:/usr/lib/:/usr/local/lib:/lib64/:/usr/lib64/:/usr/local/lib64"
export LD_LIBRARY_PATH="/Data/apps/mysql/lib/:/lib/:/usr/lib/:/usr/local/lib:/lib64/:/usr/lib64/:/usr/local/lib64"
./configure --prefix=/Data/apps/php --with-config-file-path=/Data/apps/php/etc --with-mysql=/Data/apps/mysql --with-mysqli=/Data/apps/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir=/Data/apps/libs --with-jpeg-dir=/Data/apps/libs --with-png-dir=/Data/apps/libs --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt=/Data/apps/libs --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-opcache --with-pdo-mysql --enable-maintainer-zts
make
make install
cp php.ini-development /Data/apps/php/etc/php.ini
cd ../


ln -s /Data/apps/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
mv /Data/apps/php/etc/php-fpm.conf.default /Data/apps/php/etc/php-fpm.conf


  5、编译安装PHP扩展
wget http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
tar zxvf autoconf-latest.tar.gz
cd autoconf-2.69/
./configure --prefix=/Data/apps/libs
make
make install
cd ../

wget http://pecl.php.net/get/memcache-2.2.7.tgz
tar zxvf memcache-2.2.7.tgz
cd memcache-2.2.7/
export PHP_AUTOCONF="/Data/apps/libs/bin/autoconf"
export PHP_AUTOHEADER="/Data/apps/libs/bin/autoheader"
/Data/apps/php/bin/phpize
./configure --with-php-config=/Data/apps/php/bin/php-config
make
make install
cd ../


  打开 /Data/apps/php/etc/php.ini 查找 ; extension_dir = "ext"
  在其后增加一行:
extension = "memcache.so"


Tags: , , , ,



技术大类 » Web服务器 | 评论(295) | 引用(0) | 阅读(252244)
天外飞仙
2015-5-22 11:40
配置 不上 ,redhat 5.4 这个方案不行 坑多,只能重新找别的东西安装了
张哥粉丝
2015-7-8 16:52
第二步:安装mysql 走到/Data/apps/mysql/scripts/mysql_install_db --basedir=/Data/apps/mysql --datadir=/Data/data/mysql/data --user=mysql这句话是否省略了什么,执行不了 ,请哥明示
宾县信息网 Homepage
2016-2-22 17:52
一直紧随老大,希望6.0的尽快出来,我的个人博客 http://k.bx8.co 多谢
应用公园 Email Homepage
2016-2-25 18:51
应用公园-全球领先的手机app制作平台! 在线app设计就到应用公园,无需技术基础就可制作app软件。支持iphone app安卓app同步生成。
132
2016-4-25 21:54
shockshockstupidzanthumbdow13213123123n
请更新
2016-6-7 21:23
博客的知识好像已经有点过时了 能否 更新下新技术?
1231231231
2016-6-10 00:01
这个版本的mysql 怎么启动
大坏蛋
2016-11-23 15:13
11
DAI Email
2019-3-13 12:37
This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see somethingkissmanga
Online Nursing Writing Services Email Homepage
2019-12-16 13:46
Acquiring Nursing Paper Writing Services doesn’t have to drain your finances since Legitimate Custom Nursing Writing Services charges fairly and ensure clients receive high quality Custom College Nursing Research Paper written from scratch. https://www.meldaresearch.com/nursing-writing-service/
Best Book Review Writing Services Homepage
2019-12-18 20:44
Sociology Writing Services Online Email Homepage
2020-3-11 16:04
Criminology Coursework Writing Services has become a significant challenge owing to the complexity of these Sociology Assignment Writing Services and in other cases lack of time and knowledge needed to complete Sociology Research Paper Writing Services.
Sociology Writing Services Online Email Homepage
2020-3-19 13:37
Criminology Coursework Writing Services has become a significant challenge owing to the complexity of these Sociology Assignment Writing Services and in other cases lack of time and knowledge needed to complete Sociology Research Paper Writing Services.
kaleanna
2020-5-4 15:08
The information you share is very helpful, I know it's difficult because I searched it krunker
ansha979 Email Homepage
2020-5-7 12:20
You can choose to visit our Udaipur Call girls or reserve them online and call them at your location. As an authorized agency, we guarantee the security of all the details that our clients share with us. Therefore, you should not be concerned while revealing your identity or sharing your contact details with us. Udaipur escorts
ansha979 Email Homepage
2020-5-7 12:20
Jaipur Call Girl brings to you a wide variety of escort profiles. We hire sophisticated and attractive girls and educate them to converse well with clients who belong to high society. While most of our girls can be hired for an extended stay, some choose to work only for a specified number of hours in a day.  Jaipur escort service
ansha979 Email Homepage
2020-5-7 12:21
All of our Goa Call girls have a stylish appearance combined with great intellect and excellent communication skills. It is their intelligence that helps them establish interesting points of view on all general topics. Our girls also have immense knowledge about Goa and its past. Goa escorts
ansha979 Email Homepage
2020-5-7 12:21
Some several independent Hyderabad Call girls show enthusiasm for joining our agency. However, before hiring girls, we interviewed them to see if they have the talent necessary to please clients. Every girl chosen by is well behaved and courteous. All of our girls have a friendly nature and are respectful to customers.  Hyderabad escorts
ansha979 Email Homepage
2020-5-7 12:21
If you are a tourist in Dehradun, don't miss the only opportunity to spend time with our Dehradun Call girls. By choosing our girls as partners, you can eliminate your loneliness that you can feel like a tourist in an unknown city. Our girls will make sure to give you satisfaction to leave you with an experience that will always remain with you in your memories. Dehradun Call GirlsRishikesh escort service
ansha979 Email Homepage
2020-5-7 12:21
This really is informative article that's superb. Place that's surely brilliant. I'd like to because of this study thanks that could be enlightening; I actually get talking this location that is impressive.Mussoorie escort serviceHaridwar escort serviceNainital escort serviceHaldwani escort service
分页: 6/15 第一页 上页 1 2 3 4 5 6 7 8 9 10 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]