建站服务器
一、安装nginx
1.安装依赖包:
yuminstallopensslopenssl-develpcregeoipperl-develperlperl-extutils-embedgeoip-devellibatomiclibatomic_ops-devel2.安装zlib
tar-xfzlib-1.2.11.tar.gzcdzlib-1.2.11./configuremakemakeinstall3.添加用户
addusernginx-s/sbin/nologin4.编译安装nginx
tar-xfnginx-1.10.3.tar.gzcdnginx-1.10.3./configure\\\\--prefix=/usr/local/nginx\\\\--pid-path=/usr/local/nginx\\\\--user=nginx\\\\--group=nginx\\\\--with-threads\\\\--with-file-aio\\\\--with-http_ssl_module\\\\--with-http_v2_module\\\\--with-http_addition_module\\\\--with-http_sub_module\\\\--with-http_dav_module\\\\--with-http_flv_module\\\\--with-http_mp4_module\\\\--with-http_perl_module\\\\--with-http_geoip_module\\\\--with-http_gunzip_module\\\\--with-http_auth_request_module\\\\--with-mail\\\\--with-http_gzip_static_module\\\\--with-http_auth_request_module\\\\--with-http_random_index_module\\\\--with-http_secure_link_module\\\\--with-http_degradation_module\\\\--with-http_slice_module\\\\--with-http_stub_status_module\\\\--with-http_perl_module\\\\--with-zlib=/tmp/soft/zlib-1.2.11\\\\--with-stream\\\\--with-stream_ssl_module\\\\--with-pcre\\\\--with-libatomicmakemakeinstall5.添加脚本
cd/etc/init.d/vimnginx#!/bin/bash#nginxstartupscriptforthenginxhttpserver#itisv.0.0.2version.#chkconfig:-8515#description:nginxisahigh-performancewebandproxyserver.#ithasalotoffeatures,butit\\\'snotforeveryone.#processname:nginx#pidfile:/usr/local/nginx/logs/nginx.pid#config:/usr/local/nginx/conf/nginx.confnginxd=/usr/local/nginx/sbin/nginxnginx_config=/usr/local/nginx/conf/nginx.confnginx_pid=/usr/local/nginx/logs/nginx.pidretval=0prog=nginx#sourcefunctionlibrary../etc/rc.d/init.d/functions#sourcenetworkingconfiguration../etc/sysconfig/network#checkthatnetworkingisup.[${networking}=no]&&exit0[-x$nginxd]||exit0#startnginxdaemonsfunctions.start(){if[-e$nginx_pid];thenechonginxalreadyrunning....exit1fiecho-n$starting$prog:daemon$nginxd-c${nginx_config}retval=$?echo[$retval=0]&&touch/var/lock/subsys/nginxreturn$retval}#stopnginxdaemonsfunctions.stop(){echo-n$stopping$prog:killproc$nginxdretval=$?echo[$retval=0]&&rm-f/var/lock/subsys/nginx/usr/local/nginx/logs/nginx.pid}#reloadnginxservicefunctions.reload(){echo-n$reloading$prog:#kill-hup`cat${nginx_pid}`killproc$nginxd-hupretval=$?echo}#seehowwewerecalled.case$1instart)start;;stop)stop;;reload)reload;;restart)stopstart;;status)status$progretval=$?;;*)echo$usage:$prog{start|stop|restart|reload|status|help}exit1esacexit$retval重新装载:
systemctldaemon-reload启动nginx
systemctlstartnginx.service二、安装php
1.安装依赖包
yum-yinstallmakeapr*autoconfautomakecurl-develgccgcc-c zlib-developensslopenssl-develpcre-develgdkernelkeyutilspatchperlkernel-headersmpfrcppglibclibgomplibstdc -develpplcloog-pplkeyutils-libs-devellibcom_err-devellibsepol-devellibselinux-develkrb5-develzlib-devellibxpm*freetypelibjpeg*libpng*php-commonphp-gdncurses*libtool*libxml2libxml2-develpatch2.安装libmcrypt
tar-xflibmcrypt-2.5.8.tar.gzcdlibmcrypt-2.5.8./configuremakemakeinstall3.安装libxml2
tar-xflibxml2-2.8.0.tar.gzcdlibxml2-2.8.0./configure--prefix=/usr/local/libxml2makemakeinstall4.安装libpng
tar-xflibpng-1.5.28.tar.xzcdlibpng-1.5.28./configure--prefix=/usr/local/libpngmakemakeinstall5.安装jpeg9
tar-xfjpegsrc.v9b.tar.gzcdjpeg-9b/./configure--prefix=/usr/local/jpeg9--enable-sharedmakemakeinstall6.安装gettext
tar-xfgettext-0.19.8.tar.xzcdgettext-0.19.8./configuremakemakeinstall7.安装libpng
tar-xflibgd-2.2.4.tar.xzcdlibgd-2.2.4./configure--prefix=/usr/local/libgd--with-zlib--with-png=/usr/local/libpng--with-jpeg=/usr/local/jpeg9makemakeinstall8.安装freetype
wgethttp://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.gztar-xffreetype-2.7.1.tar.gzcdfreetype-2.7.1./configure--prefix=/usr/local/freetypemakemakeinstall9.安装libiconv
tar-xflibiconv-1.15.tar.gzcdlibiconv-1.15./configure--prefix=/usr/local/libiconvmakemakeinstall10.安装php-5.6
tar-xfphp-5.6.30.tar.xzcdphp-5.6.30./configure--prefix=/usr/local/php5--with-co
何为国外域名网站,如何分类香港阿里云服务器需要花多少钱买创建网站方案应该怎么做 创建步骤是怎样的联通华盛回应京东翻新机事件云服务器怎么架设网游百度云服务器上传上传项目错误哪家公司建站比较好 网站建设方式有哪些百度移动端域名显示改为用网站品牌名代替