最近配置了几台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服务器 | 评论(341) | 引用(0) | 阅读(274726)
강남룸싸롱 Email Homepage
2026-6-17 21:20
For a Amateur, We're entirely studying internet to get reports that is with help people. Thanks a ton.
sei
2026-6-17 21:23
This seems amazing to see this kind of educational as well as distinctive content articles in your web sites.  Google Ads Agency London
seu Email
2026-6-17 21:28
Many thanks with regard to supplying current improvements concerning the issue, We anticipate study much more.  slot depo 5k  Appreciate it intended for placing a really good document! I stumbled upon your blog perfect for the desires. Its full of superb in addition to very helpful threads. Sustain the favorable do the job!  link macaudewa
raza
2026-6-20 15:06
KOITOTO adalah layanan premium situs toto togel dan bandar togel online terpopuler tahun 2026 yang menghadirkan pengalaman bermain terbaik serta menjamin keamanan dan kenyamanan maksimal di setiap permainan  koitoto
seo
2026-6-22 20:35
I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.  togel online  I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.  togel online
seo
2026-6-22 20:36
I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.  situs toto  I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.  dax69 login
seo
2026-6-22 20:36
I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.  bandar slot  I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.  slot gacor
aza Email
2026-6-27 15:25
I have been impressed after read this because of some quality work and informative thoughts. I just want to say thanks for the writer and wish you all the best for coming! Your exuberance is refreshing.  situs toto
asd Email Homepage
2026-6-27 20:28
Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers.  coloksgp
DFGFDG Email
2026-6-27 22:19
I like your post. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed...  wede303
DFGDFG Email
2026-6-27 22:25
This is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info:  koitoto
RAZA Email
2026-6-28 20:38
I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work...  slot gacor
asd Email Homepage
2026-6-29 19:10
Thank you so much as you have been willing to share information with us. We will forever admire all you have done here because you have made my work as easy as ABC.  성피모
성인 피시방 매매 Email Homepage
2026-6-30 14:35
I just want to let you know that I just check out your site and I find it very interesting and informative..  성인 피시방 매매
Faaaaahhhhh
2026-6-30 17:04
Fantastic submit, Many thanks regarding revealing This kind of information. Fantasticly composed write-up, only if almost all people supplied the identical amount of articles when you, the net would have been a greater spot. You should keep writing!  koki toto
성인피시 Email Homepage
2026-7-1 15:31
Great job here on. I read a lot of blog posts, but I never heard a topic like this. I Love this topic you made about the blogger's bucket list. Very resourceful.  성인피시
asdAsd Email Homepage
2026-7-1 18:30
the country's quite terrific web page. the country's realy info along with a very wonderful activity. i need this approach.  피씨365
성인피시 Email Homepage
2026-7-2 14:03
Excellent website! I adore how it is easy on my eyes it is. I am questioning how I might be notified whenever a new post has been made. Looking for more new updates. Have a great day!  성인피시
AK 게임 Email Homepage
2026-7-8 15:25
it's truly wonderful weblog. it's realy educational along with a this type of great work. i really like this particular.  AK 게임
se
2026-7-12 19:54
Really! Everything that a opener it blog post was for my situation. A great deal enjoyed, bookmarked, As i can’t look ahead to alot more!  Search mega.nz
分页: 17/18 第一页 上页 12 13 14 15 16 17 18 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]