欢迎来到天天文库
浏览记录
ID:5580215
大小:32.03 KB
页数:9页
时间:2017-12-19
《阿里云服务器lnmp编译提示教程》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、iOpenv-网站建设方案与网站优化策略http://www.iopenv.com阿里云服务器LNMP编译提示教程目录一、环境初始化1二、源码包1三、编译11、nginx12、mysql43、php54、nginx反响代理php9四、管理9一、环境初始化打开/etc/yum.conf然后找到这行:exclude=kernel*修改为:exclude=yum-yinstallgccgcc-c++makecmakeautoconflibjpeglibjpeg-devellibpnglibpng-deve
2、lfreetypefreetype-devellibxml2libxml2-develzlibzlib-develglibcglibc-develglib2glib2-develbzip2bzip2-develncursesncurses-develcurlcurl-devele2fsprogse2fsprogs-develkrb5krb5-devellibidnlibidn-developensslopenssl-developenldapopenldap-develnss_ldapopenlda
3、p-clientsopenldap-servers二、源码包wgetpcre*wgetnginx*wgetphp*wgetmysql*tarzxfpcre*iOpenv-网站建设方案与网站优化策略http://www.iopenv.comiOpenv-网站建设方案与网站优化策略http://www.iopenv.comtarzxfnginx*tarzxfphp*tarzxfmysql*三、编译1、nginxcdpcre*./configuremake&&makeinstallcdnginx*./co
4、nfigure--with-http_ssl_module--with-http_stub_status_modulemake&&makeinstallvi/etc/init.d/nginx插入以下代码:#!/bin/sh##nginx–thisscriptstartsandstopsthenginxdaemon##chkconfig:-8515#description:NginxisanHTTP(S)server,HTTP(S)reverse#proxyandIMAP/POP3proxyserv
5、er#processname:nginx#config:/usr/local/nginx/conf/nginx.conf#pidfile:/usr/local/nginx/logs/nginx.pid#Sourcefunctionlibrary../etc/rc.d/init.d/functions#Sourcenetworkingconfiguration../etc/sysconfig/network#Checkthatnetworkingisup.["$NETWORKING"="no"]&&e
6、xit0nginx="/usr/local/nginx/sbin/nginx"prog=$(basename$nginx)NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"iOpenv-网站建设方案与网站优化策略http://www.iopenv.comiOpenv-网站建设方案与网站优化策略http://www.iopenv.comlockfile=/var/lock/subsys/nginxstart(){[-x$nginx]
7、
8、exit5[-f
9、$NGINX_CONF_FILE]
10、
11、exit6echo-n$"Starting$prog:"daemon$nginx-c$NGINX_CONF_FILEretval=$?echo[$retval-eq0]&&touch$lockfilereturn$retval}stop(){echo-n$"Stopping$prog:"killproc$prog-QUITretval=$?echo[$retval-eq0]&&rm-f$lockfilereturn$retval}restart(){config
12、test
13、
14、return$?stopstart}reload(){configtest
15、
16、return$?echo-n$”Reloading$prog:”killproc$nginx-HUPRETVAL=$?echo}force_reload(){restart}configtest(){$nginx-t-c$NGINX_CONF_FILE}iOpenv-网站建设方案与网站优化策略http://www.iopenv.comiOpenv-网站建设方案与网站优化策略htt
此文档下载收益归作者所有