最近配置了几台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) | 阅读(252243)
ansha979 Email Homepage
2020-5-7 12:22
Some of our Ahmedabad Call girls are trained to serve only the influential class. Their training involves learning behavioural techniques used by people who belong to the privileged class. You can contact our executives to take these ladies to their companions.  Ahemadabad escorts Jodhpur escort service
ansha979 Email Homepage
2020-5-7 12:22
I am here to help you make the right decision, any time you want to meet a good and genuine VIP Jodhpur escort. They know very well how to live a life happily. This thought is also applicable in the world of escorts, where you can have great ecstasy.  Ajmer escort serviceKishangarh escort service
ansha979 Email Homepage
2020-5-7 12:22
Fabulous place if Which You Can Write just a tiny mo Re with this exceptional dilemma, but I had been questioning? I would be incredibly happy in the event you could elaborate further. Thanks!Pushkar Escort serviceNasirabad escort serviceBeawar escort service
Computer Science Research Paper Services Email Homepage
2020-5-11 16:44
Computer science coursework writing service students have an advantage since they are able to seek computer science research paper services and computer science case study writing services.
Data Science training in Chennai Email Homepage
2020-5-21 15:20
Your valuable key points got my high appreciation. Keep up the good service. Thanks a bunch!Python Training in Chennai| Data Science Training in Chennai | AWS Training in Chennai|
Information Systems Writing Services Homepage
2020-5-26 14:58
Business information systems research paper services have become very popular for students studying business & information technology coursework services as they engage the best online Information Systems Writing Services.https://www.meldaresearch.com/information-systems-writing-services/
Cultural Studies Research Paper Services Email Homepage
2020-6-12 12:21
There are many cultural studies paper writing services and Cultural Studies Research Paper Services to choose from for those stuck with their cultural studies coursework writing services and research papers on cultural diversity. Cultural Studies Reseach Paper Services
Cultural Studies Research Paper Services Email Homepage
2020-6-12 12:23
Buy descriptive essay help online seekers has been on the rise lately since most learners need Description Essay Writing Servicesdescriptive essay writing help and descriptive essay services.
Philosophy Essay Writing Services Email Homepage
2020-8-12 15:56
Philosophy coursework writing services have become very popular for those studying philosophy research writing services as they engage the best online Philosophy Essay Writing Services.https://researchpapers247.com/philosophy-essay-writing-services/
Human Resource Essay Services Email Homepage
2020-10-13 13:24
Human resource coursework writing services are very common nowadays since there are very many students in need of Human Resource Essay Servicesand human resource research writing services.
minion Email
2020-11-7 14:18
The News and Announcements you share are very up to date. I would love to read this news.directions
Social Sciences Research Writing Email Homepage
2020-12-15 17:42
Social science paper writing service seekers have been on the rise lately since most learners need Social Sciences Research Writing Services, science paper writing services and social science coursework writing services.
Social Sciences Research Writing Email Homepage
2021-1-4 16:35
Social science paper writing service seekers have been on the rise lately since most learners need Social Sciences Research Writing Services, science paper writing services and social science coursework writing services. Social Science Research Writing Services
Elli Gibson Email
2021-8-9 12:31
You often find new and innovative solutions to a problem here in internet but a few have sense. Continue giving us future ideas. Great day!  สูตรบาคาร่าออนไลน์ ฟรี
chihy Email
2021-10-21 16:15
Nice Information thanks for sharing. May you bring this more in future. basketball legends
minion89
2022-5-9 17:50
Thank you for sharing your knowledge; it is quite beneficial to me and many others. I'll be back to read your fresh blogs on a regular basis. Please keep up the good work!poppy playtime
por1122 Email
2022-6-19 16:33
MegaSlot เเตกจริง ไม่โป๊ะเหมือน ช่อง7 เกมสล็อตออนไลน์ Megaslot เล่นเเล้วได้เงินจริง แตกเร็วรายได้เสริมไว้ฆ่าเวลา โอน ฝาก ถอนได้ง่ายๆ ไม่มีโกง megaslot
JEFFYS Email Homepage
2022-6-27 06:48
pg slot โบนัส ที่ดีที่สุด ให้ทุกคนที่เป็น สมาชิกกับเราได้ลุ่นโบนัสพิเศษ สล็อต เริ่มหมุน มุนกงล้อได้ลุ้นรับโบนัส พิเศษได้แล้ววันนี้
pikopeki Email Homepage
2022-7-13 17:42
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.PayPal Bellen Nederland
assignmenthelps Email Homepage
2022-7-19 17:21
Is it increasingly difficult for you to meet the regular deadlines of jobs and case study, assignments, and you're unsure how you'll complete your case study? Don't be concerned; assignment help service can assist you.  They are fully aware of the requirements of producing the most insightful academic work. Case Study Writing ServiceAssignment help service
分页: 7/15 第一页 上页 2 3 4 5 6 7 8 9 10 11 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]