CentOS教程之CentOS编译装置Nginx1.5.2+PHP5.5.1+MySQL5.6.10
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!比来设置装备摆设了几台Web办事器,将装置笔记贴出来吧。1、装置Nginx:
mkdir-p/Data/tgz
cd/Data/tgz
yuminstallwget
yuminstallpcre
yuminstallopenssl*
yum-yinstallgccgcc-c++autoconflibjpeglibjpeg-devellibpnglibpng-develfreetypefreetype-devellibxml2libxml2-develzlibzlib-develglibcglibc-develglib2glib2-develbzip2bzip2-develncursesncurses-develcurlcurl-devele2fsprogse2fsprogs-develkrb5krb5-devellibidnlibidn-developensslopenssl-developenldapopenldap-develnss_ldapopenldap-clientsopenldap-serversmake
yum-yinstallgdgd2gd-develgd2-devel
/usr/sbin/groupaddwww
/usr/sbin/useradd-gwwwwww
ulimit-SHn65535
wgetftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.32.tar.gz
tarzxvfpcre-8.32.tar.gz
cdpcre-8.32
./configure--prefix=/Data/apps/pcre
make&&makeinstall
cd../
wgethttp://nginx.org/download/nginx-1.5.2.tar.gz
tarzxvfnginx-1.5.2.tar.gz
cdnginx-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
makeinstall
cd../
2、装置MySQL:
wgethttp://downloads.mysql.com/archives/mysql-5.6/mysql-5.6.10-linux-glibc2.5-x86_64.tar.gz
tarzxvfmysql-5.6.10-linux-glibc2.5-x86_64.tar.gz
mvmysql-5.6.10-linux-glibc2.5-x86_64/Data/apps/mysql
/usr/sbin/groupaddmysql
/usr/sbin/useradd-gmysqlmysql
mkdir-p/Data/data/mysql/data
yuminstalllibaio
/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/
wgethttp://www.ckuyun.com/files/jpegsrc.v9.tar.gz
tarzxvfjpegsrc.v9.tar.gz
cdjpeg-9/
./configure--prefix=/Data/apps/libs--enable-shared--enable-static--prefix=/Data/apps/libs
make
makeinstall
cd../
wgethttp://prdownloads.sourceforge.net/libpng/libpng-1.6.2.tar.gz
tarzxvflibpng-1.6.2.tar.gz
cdlibpng-1.6.2/
./configure--prefix=/Data/apps/libs
make
makeinstall
cd../
wgethttp://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.gz
tarzxvffreetype-2.4.12.tar.gz
cdfreetype-2.4.12/
./configure--prefix=/Data/apps/libs
make
makeinstall
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"
tarzxvflibmcrypt-2.5.8.tar.gz
cdlibmcrypt-2.5.8/
./configure--prefix=/Data/apps/libs
make
makeinstall
cdlibltdl/
./configure--prefix=/Data/apps/libs--enable-ltdl-install
make
makeinstall
cd../../
tarzxvfmhash-0.9.9.9.tar.gz
cdmhash-0.9.9.9/
./configure--prefix=/Data/apps/libs
make
makeinstall
cd../
vi/etc/ld.so.conf
添加:
/Data/apps/libs/lib
然后:
ldconfig
tarzxvfmcrypt-2.6.8.tar.gz
cdmcrypt-2.6.8/
exportLDFLAGS="-L/Data/apps/libs/lib-L/usr/lib"
exportCFLAGS="-I/Data/apps/libs/include-I/usr/include"
touchmalloc.h
./configure--prefix=/Data/apps/libs--with-libmcrypt-prefix=/Data/apps/libs
make
makeinstall
cd../
4、编译装置PHP5.5
wgethttp://www.php.net/get/php-5.5.1.tar.gz/from/tw2.php.net/mirror
tarzxvfphp-5.5.1.tar.gz
cdphp-5.5.1/
exportLIBS="-lm-ltermcap-lresolv"
exportDYLD_LIBRARY_PATH="/Data/apps/mysql/lib/:/lib/:/usr/lib/:/usr/local/lib:/lib64/:/usr/lib64/:/usr/local/lib64"
exportLD_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
make
makeinstall
cpphp.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扩大
wgethttp://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
tarzxvfautoconf-latest.tar.gz
cdautoconf-2.69/
./configure--prefix=/Data/apps/libs
make
makeinstall
cd../
wgethttp://pecl.php.net/get/memcache-2.2.7.tgz
tarzxvfmemcache-2.2.7.tgz
cdmemcache-2.2.7/
exportPHP_AUTOCONF="/Data/apps/libs/bin/autoconf"
exportPHP_AUTOHEADER="/Data/apps/libs/bin/autoheader"
/Data/apps/php/bin/phpize
./configure--with-php-config=/Data/apps/php/bin/php-config
make
makeinstall
cd../
翻开/Data/apps/php/etc/php.ini查找;extension_dir="ext"
在厥后增长一行:
extension="memcache.so"
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!
CentOS教程之CentOS编译装置Nginx1.5.2+PHP5.5.1+MySQL5.6.10
如果你有庞大而复杂的测试条件,尽量把它剪裁得越小越好。可能你会遇到这种情况,对于一个问题会出现不同内容回答,这时你需要通过实践来验证。 不同于Windows?系统需要花钱购买,因为Linux的核心是免费的,自由使用的,核心源代码是开放的。 和私有操作系统不同,各个Linux的发行版本的技术支持时间都较短,这对于Linux初学者是往往不够的。 为什么要学Linux呢?每个人都有不同的看法,下面我说说自己的感想吧。? 硬盘安装及光盘安装,清楚了解安装Linux应注意的有关问题,如安装Linux应在最后一个分区内,至少分二个分区。 感谢老师和同学们在学习上对我的帮助。 Linux操作系统这个名词记得在很早以前就听过,但当时并不知道具体是什么样的操作系统,只知道是一个与嵌入式密切相关的操作系统。 任何人都可以根据自己的喜好来定制适合自己的操作系统,Linux?是抢占式多任务多用户操作系统.
页:
[1]