最近配置了几台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服务器 | 评论(292) | 引用(0) | 阅读(239229)
Jamie
2023-3-17 04:02
Look around and you'll see that electricians anna maria has all the major projects.
Kelly Homepage
2023-5-3 15:39
I think that electrical services bradenton. Be sure to check them out.
토토사이트추천 Email Homepage
2023-6-21 16:19
I think you also want your blog to be seen by more people. I plan to write your articles and blog on my blog. I hope you can take a look at my blog, please give me your advice. https://totowho.com
검증사이트 Email Homepage
2023-7-17 11:50
How could such an excellent person write such an excellent post? Your unique perspective and profound knowledge are truly admirable. I am really glad to see this post. 검증사이트
slotxo
2023-7-19 23:32
Hello, today we have an online web game to present. Games that are easy to play, get money fast, can withdraw real money Must be on this website only, please clickPG SLOT สล็อตออนไลน์ สล็อต สล็อต เว็บตรง
View private instagram Email Homepage
2023-9-2 16:58
Thanks for sharing this post.If you know how to use view  Private Instagram stories feature users sharing photos and videos with a chosen audience; not all followers like regular stories. Only a specific group can see private stories, enhancing privacy. Users posting private stories can select who views them, from a subset of followers to particular people.https://nowewyrazy.uw.edu.pl/profil/instagram_private
AlexJuvion Email
2023-9-11 18:05
Designing a mobile e-commerce app requires careful consideration of user experience, functionality, and aesthetics.

Alex,
Our dissertation help service encompasses every aspect of the dissertation process, from proposal development to final submission, providing a holistic approach to your research project.
먹튀신고 Email Homepage
2023-9-20 14:16
This is a great site for me. I came here during a difficult time and it was a deep comfort to me. I will be very grateful and visit again for comfort.먹튀신고
토토사이트추천 Homepage
2023-10-19 09:10
I absolutely enjoyed every bit of it. It's a great site and it's good to share. I wanted to thank you. Good job! You guys write a great blog and have some great content. Keep up the good work토토사이트추천
slot
2023-11-2 21:51
Come play PG SLOT, the best direct slots website, direct slots website, must be this website only. Give you more than anyone else Deposits and withdrawals, no minimum!!สล็อต สล็อต เว็บตรงสล็อต XOSLOTXO
dhrehdwk
2023-12-15 00:43
Individuals taking m超级食品巴西坚果的好处和副作用ブラジルナットの効能と副作用Brazil nutsedications, especially blood thinners or medications for blood pressure,
dhrehdwk
2023-12-15 00:43
should consult with a healthcare professional before consuming aronia berries as they may interact with these medications.브라질넛효능
dhrehdwk
2023-12-15 00:43
While uncommon, some individuals may be allergic to aronia berries. If you have known allergies to berries, it's essential to be cautious and monitor for any adverse reactions.테프효능超级食物画眉草的好处和副作用テープの効能と副作用Teff
dhrehdwk
2023-12-15 00:43
The high fiber content in aronia berries may trigger symptoms in individuals with irritable콜라비효능超级食品大头菜的好处和副作用コラビの効能と副作用kohlrabi
dhrehdwk
2023-12-15 00:43
bowel syndrome (IBS). It's advisable for those with IBS to monitor their intake.피칸효능超级食物山核桃的好处和副作用ピーカンの効能と副作用Pecan
dhrehdwk
2023-12-15 00:43
Although aronia berries may have potential benefits for blood sugar control, individuals with diabetes should 캐슈넛효능超级食品腰果的好处和副作用カシューナットの効能と副作用Cashew Nuts
dhrehdwk
2023-12-15 00:44
monitor their blood sugar levels closely when incorporating them into their diet.비름나물효능苋菜的功效与副作用藻類の効能と副作用Amaranth herb
dhrehdwk
2023-12-15 00:44
Smoothies and Juices: Blend aronia berries into smoothies or juices for a refreshing and nutrient-packed beverage.고추냉이효능辣根的好处和副作用わさびの効能と副作用horseradish
dhrehdwk
2023-12-15 00:44
Jams and Sauces: Use aronia berries to make jams, sauces, or compotes to enhance the flavor of various dishes.알로에효능超级食品芦荟的好处和副作用アロエの効能と副作用Aloe
分页: 9/15 第一页 上页 4 5 6 7 8 9 10 11 12 13 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]