若天明 发表于 2015-1-14 20:25:07

带来一篇CentOS7 编译装置LNMP

欢迎大家来到仓酷云论坛!LNMP(Linux-Nginx-Mysql-PHP),本文在CentOS7.0上编译LNMP试试鲜,全文基础上都是接纳手动编译安排...依附yum帮我装置了GCC和automake..写这个器材耗时有点久了...尼玛太花工夫啦,Linux运维交换群:344177552次要软件版本:
nginx-1.6.0php-5.3.5mysql-5.5.6yum源设置(实在没甚么修改)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything编译工具装置
#yuminstallgcc-c++automakeautoconfbzip2zlib库(供应数据紧缩用的函式库):
#tarzxfzlib-1.2.8.tar.gz#cdzlib-1.2.8#./configure--prefix=/software/sharelib#make&&makeinstallpcre库(rewrite的撑持)
#tarzxfpcre-8.35.tar.gz#cdpcre-8.35#./configure--prefix=/software/pcre--enable-utf8--enable-unicode-properties#make&&makeinstallOpenSSL库(https的撑持)
#tarzxfopenssl-1.0.1h.tar.gz#cdopenssl-1.0.1h#./config--prefix=/software/openssl#make&&makeinstallTCMalloc工具(谷歌内存办理套件)
#tarzxflibunwind-1.1.tar.gz#cdlibunwind-1.1#CFLAGS=-fPIC./configure--prefix=/software/谷歌-libunwind#makeCFLAGS=-fPIC&&makeCFLAGS=-fPICinstall#tarzxfgperftools-2.2.tar.gz#cdgperftools-2.2#LDFLAGS="-L/software/谷歌-libunwind/lib"CPPFLAGS="-I/software/谷歌-libunwind/include"./configure--prefix=/software/谷歌-perftools#make&&makeinstall###路径加到静态链接库####echo"/software/谷歌-libunwind/lib/">>/etc/ld.so.conf#echo"/software/谷歌-perftools/lib/">>/etc/ld.so.conf#echo"/software/sharelib/lib/">>/etc/ld.so.conf&&ldconfigNginx(不注释)
#groupadd-g1500nginx#useradd-M-u1500-gnginx-s/sbin/nologinnginx#mkdir/var/tmp/nginx#chownnginx:nginx/var/tmp/nginx/#tarzxfnginx-1.6.0.tar.gz#cdnginx-1.6.0#sed-is/CFLAGS="$CFLAGS-g"/#CFLAGS="$CFLAGS-g"/auto/cc/gcc#sed-i"s#/usr/local#/software/谷歌-perftools#"auto/lib/谷歌-perftools/conf##设置参数有点长###./configure--prefix=/software/nginx--user=nginx--group=nginx--with-http_stub_status_module--with-http_ssl_module--with-http_realip_module--with-http_gzip_static_module--with-debug--http-client-body-temp-path=/var/tmp/nginx/client--http-proxy-temp-path=/var/tmp/nginx/proxy--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi--http-scgi-temp-path=/var/tmp/nginx/scgi--with-pcre=/root/lnmp/pcre-8.35--with-openssl=/root/lnmp/openssl-1.0.1h--with-zlib=/root/lnmp/zlib-1.2.8--with-谷歌_perftools_module#make&&makeinstall#mkdir/tmp/tcmalloc#chmod0777/tmp/tcmalloc/###这文件在附件里####cp../nginx.conf/software/nginx/conf/#cp../fcgi.conf/software/nginx/conf/#chmod755/etc/init.d/nginx#mkdir/data/{logs,www.ipython.me}#/software/nginx/sbin/nginx#iptables-F#iptables-AINPUT-ptcp--dport22-jACCEPT#iptables-AINPUT-ptcp--dport80-jACCEPT#psaux|grepnginxroot612910.00.031120896?Ss15:360:00nginx:masterprocess/software/nginx/sbin/nginx-c/software/nginx/conf/nginx.confnginx612930.00.1315601612?S15:360:00nginx:workerprocessncurses库(字符终端处置库)
#tarjxfncurses-5.9.tar.bz2#cdncurses-5.9#./configure--prefix=/software/ncurses--with-shared--without-debug#make&&makeinstallMysql(数据库)
#/usr/sbin/groupaddmysql#/usr/sbin/useradd-s/sbin/nologin-gmysqlmysql#tarzxfmysql-5.5.6-rc.tar.gz#cdmysql-5.5.6-rc#./configure--prefix=/software/mysql/--enable-assembler--with-extra-charsets=complex--enable-thread-safe-client--with-big-tables--with-readline--with-ssl--with-embedded-server--enable-local-infile--with-plugins=partition,innobase,myisammrg--with-named-curses-libs=/software/ncurses/lib/libncurses.so.5#make&&makeinstall#mkdir/data/mysql/{binlog,relaylog}-p#chown-Rmysql:mysql/data/mysql#/software/mysql/bin/mysql_install_db--basedir=/software/mysql/--datadir=/data/mysql/--user=mysql###这文件在附件里####cp../my.cnf/etc/my.cnf#cp../mysqld/etc/init.d/mysqld#chmod755/etc/init.d/mysqld#systemctlenablemysqld#systemctlstartmysqld#psaux|grepmysqldroot554750.10.11153481696?S16:070:00/bin/sh/software/mysql/bin/mysqld_safe--datadir=/data/mysql--pid-file=/data/mysql/mysql.pidmysql563422.711.91918248120680?Sl16:070:01/software/mysql/libexec/mysqld--basedir=/software/mysql--datadir=/data/mysql--plugin-dir=/software/mysql/lib/mysql/plugin--user=mysql--log-error=/data/mysql/mysql_error.log--open-files-limit=10240--pid-file=/data/mysql/mysql.pid--socket=/tmp/mysql.sock--port=3306libiconv库(字符编码转换)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything0libxml库(XML库)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything1libpng库(图片库)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything2jpeg库(图片库)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything3freetype(字库)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything4libmcrypt库(加密算法)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything5mhash库(加密)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything6curl库(URL传输)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything7gd库(画图)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything8libtool(库编译撑持)
#cat/etc/yum.repos.d/1.reponame=1baseurl=file:///mediaenabled=1gpgcheck=0#mount/dev/cdrom/media&&yumcleanallmount:/dev/sr0iswrite-protected,mountingread-onlyLoadedplugins:fastestmirrorCleaningrepos:1Cleaningupeverything9将mysql的库文件到场静态同享
#yuminstallgcc-c++automakeautoconfbzip20PHP(一种言语吧)
#yuminstallgcc-c++automakeautoconfbzip21好了...看图

本文出自“IT辰逸”博客,请务必保存此出处http://itchenyi.blog.51cto.com/4745638/1437686
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!

莫相离 发表于 2015-1-16 17:54:31

带来一篇CentOS7 编译装置LNMP

Linux简单,占内存少,特别是对于程序开发人员来说很方便,如果说windows的成功在于其方便用户的窗口管理界面。

谁可相欹 发表于 2015-1-21 07:15:36

上课传授的不仅仅是知识,更重要的是一些道理,包括一些做人的道理,讲课时也抓住重点,循序渐进,让同学理解很快;更可贵的是不以你过去的成绩看问题.

灵魂腐蚀 发表于 2015-1-30 11:08:21

其中不乏很多IT精英的心血。我们学透以后更可以做成自己的OS!?

飘灵儿 发表于 2015-2-6 11:08:54

我感觉linux的学习,学习编程~!~!就去学习C语言编程!!

只想知道 发表于 2015-2-16 05:49:51

有疑问前,知识学习前,先用搜索。

第二个灵魂 发表于 2015-3-5 01:44:52

在学习linux的工程中,linux学习方法有很多种,这里是小编的学习心得,给大家拿出来分享一下。

老尸 发表于 2015-3-11 22:44:29

当然你不需搭建所有服务,可以慢慢来。自己多动手,不要非等着别人帮你解决问题。

简单生活 发表于 2015-3-19 17:08:59

工具书对于学习者而言是相当重要的。一本错误观念的工具书却会让新手整个误入歧途。目前国内关于Linux的书籍有很多不过精品的不多。

分手快乐 发表于 2015-3-30 13:26:32

学习Linux,应该怎样学,主要学些什么,一位Linux热心学习者,一段学习Linux的风云经验,历时十二个小时的思考总结,近十位网络Linux学习者权威肯定,为您学习Linux指明方向。
页: [1]
查看完整版本: 带来一篇CentOS7 编译装置LNMP