LNMP開發環境搭建
10.為nginx提供開機啟動指令碼
# vim /etc/rc.d/init.d/nginx
###複製以下內容到服務檔案中###
#!/bin/bash
# nginx Startup script for the Nginx HTTP Server
# it is v.0.0.2 version.
# chkconfig: - 85 15
# description: Nginx is a high-performance web and proxy server.
# It has a lot of features, but it's not for everyone.
# processname: nginx
# pidfile: /app/nginx/logs/nginx.pid
# config: /app/nginx/conf/nginx.conf
nginxd=/app/nginx/sbin/nginx
nginx_config=/app/nginx/conf/nginx.conf
nginx_pid=/app/nginx/logs/nginx.pid
RETVAL=0
prog="nginx"
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x $nginxd ] || exit 0
# Start nginx daemons functions.
start() {
if [ -e $nginx_pid ];then
echo "nginx already running...."
exit 1
fi
echo -n $"Starting $prog: "
daemon $nginxd -c ${nginx_config}
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/nginx
return $RETVAL
}
# Stop nginx daemons functions.
stop() {
echo -n $"Stopping $prog: "
killproc $nginxd
RETVAL=$?
echo#
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/nginx /app/nginx/logs/nginx.pid
}
reload() {
echo -n $"Reloading $prog: "
#kill -HUP `cat ${nginx_pid}`
killproc $nginxd -HUP
RETVAL=$?
echo
}
test() {
$nginxd -t
}
# See how we were called.
case "$1" in
test)
test
;;
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
stop
start
;;
status)
status $prog
RETVAL=$?
;;
*)
echo $"Usage: $prog {start|stop|restart|reload|status|help|test}"
exit 1
esac
exit $RETVAL
11.賦予Nginx執行許可權,並設定為開機啟動
# chmod 755 /etc/rc.d/init.d/nginx
# chkconfig nginx on
至此,Nginx配置結束!!
-----------------------------------------------------------------------------------------------------------------------------------二、編譯安裝PHP
1.安裝編譯PHP時需要的依賴包
# yum -y install gd-devel curl-devel libxml2-devel bzip2-devel \
libxpm-devel libXpm mbstring exif libicu-devel libmcrypt-devel \
php-mcrypt bzip2* libjpeg* libpng* freetype*
2.下載PHP依賴的libmcrypt加密演算法擴充套件庫
# wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz
3.下載PHP安裝包
# wget http://mirrors.sohu.com/php/php-5.5.16.tar.gz
4.解壓libmcrypt包
# tar zxvf libmcrypt-2.5.7.tar.gz && cd libmcrypt-2.5.7
5.編譯安裝libmcrypt
# ./configure && make && make install
6.解壓PHP包
# tar zxvf php-5.5.16.tar.gz && cd php-5.5.16
7.執行./coonfigure對PHP進行配置以及檢測當前環境是否滿足安裝需求
./configure \
--prefix=/app/php5.5 \
--sysconfdir=/app/php5.5/etc \
--with-config-file-path=/app/php5.5/etc \
--with-config-file-scan-dir=/app/php5.5/etc/conf.d \
--enable-maintainer-zts \
--enable-phpdbg \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--with-zend-vm=GOTO \
--enable-inline-optimization \
--disable-debug \
--disable-short-tags \
--without-pear \
--enable-bcmath \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql \
--without-pdo-sqlite \
--disable-ipv6 \
--with-curl \
--enable-ftp \
--enable-sockets \
--with-openssl \
--with-bz2 \
--with-zlib \
--with-zlib-dir \
--enable-zip \
--enable-json \
--with-iconv \
--with-iconv-dir \
--with-pcre-regex \
--with-pcre-dir \
--enable-mbstring \
--enable-mbregex \
--with-gettext \
--with-mcrypt \
--with-mhash \
--disable-calendar \
--enable-gd-jis-conv \
--with-gd \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--enable-gd-native-ttf \
--enable-exif \
--enable-xml \
--with-libxml-dir \
--enable-soap \
--disable-xmlwriter \
--disable-xmlreader \
--enable-sysvsem \
--enable-sysvmsg \
--enable-shmop \
--enable-sysvshm \
--enable-pcntl \
--disable-flatfile \
--enable-fd-setsize=4096 \
--enable-intl \
--with-xpm-dir
8.出現下圖說明./configure通過
9.編譯安裝PHP
# make && make install
10.配置PHP,建立php.ini 配置檔案
# vim /app/php5.5/etc/php.ini
###複製以下內容到服務檔案中###
[PHP]
engine = On
short_open_tag = ON
asp_tags = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 17
disable_functions = exec,passthru,shell_exec,system,proc_open,popen,proc_close,
proc_get_status,proc_nice,proc_terminate,php_uname,posix_getpwuid,posix_kill,
posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,posix_setuid,posix_uname,
syslog,parse_ini_file,eval,apache_child_terminate,apache_setenv,
define_syslog_variables,escapeshellarg,escapeshellcmd,show_source
disable_classes =
zend.enable_gc = On
expose_php = OFF
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL & ~E_ NOTICE & ~E_STRICT
display_errors = off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
error_log=/data/logs/php/php-error.log
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = On
variables_order = "GPCS"
相關推薦
LNMP開發環境搭建
10.為nginx提供開機啟動指令碼 # vim /etc/rc.d/init.d/nginx ###複製以下內容到服務檔案中### #!/bin/bash # nginx Startup script for the Nginx HTTP Server # it i
開發環境搭建(lnmp)
現在 digi res package .so uri blog 協同 說明 我們的開發環境一般現在時用Linux + Nginx + MySQL(mariaDB) + PHP的組合進行項目的搭建與開發,工欲善其事必先利其器。 搭建環境: Centos7 + mysql
基於Vagrant搭建可移植的lnmp開發環境
使用vagrant搭建開發環境可以避免團隊開發帶來的開發環境不一致問題,避免了很多不必要的麻煩,同時其分發機制也也有利於新來的同事立即部署適合於公司的開發環境,非常便利,是很多網際網路公司的首選。因此,學習如何搭建基於vagrant的開發環境是很有必要的。 Vagrant 是一個簡單易用的部署工
docker搭建LNMP開發環境
win7系統如果安裝使用docker 從官方倉庫下載映象(如下載過慢可換國內倉庫) docker pull mysql:5.7 docker pull php:5.6.38 docker pull nginx:1.15.5
ubuntu16.04下原始碼搭建lnmp開發環境並部署laravel專案到線上
之前都是使用lnmp安裝包來搭建線上環境,今天試試原始碼搭建環境,雖然之前搭建過一次,但許久不操作還是有點忘記了,好了,廢話不多說開始正題。 開始安裝前先執行sudo apt-get update更新一下軟體庫 我們先安裝nginx,執行sudo apt-get inst
Mac OS上搭建LNMP開發環境
1. 概述 LNMP代表的就是:Linux系統下Nginx+MySQL+PHP這種網站伺服器架構。Linux是一類Unix計算機作業系統的統稱,是目前最流行的免費作業系統。代表版本有:debian、centos、ubuntu、fedora、gentoo等。Ng
vue.js開發環境搭建
回車 try htm 成功 效果 webpack log 表示 測試 1、安裝node.js,忽略 2、基於node.js,利用淘寶npm鏡像安裝相關依賴在cmd裏直接輸入:npm install -g cnpm –-registry=https://regi
[原創]ObjectARX開發環境搭建之VS2010+ObjectARX2012Wizard+Addin工具條問題修復
系統 右鍵 9.png line cls sid 新建 使用 開發環境 目前ObjectARX版本越來越高,也越來越簡化開發,如果需要同時開發低版本和高版本的ARX程序,就需要搭建批量編譯環境,以滿足ARX開發的需要。 批量編譯的搭建網絡上已經有了很多的教程,基本上都是基於
Python3-Django-1.開發環境搭建
file 響應 令行 ide star local bsp pla 創建 官網 https://www.djangoproject.com/ 安裝 http://www.runoob.com/django/django-install.html 創建項目 方式一
ubuntu14.04 LTS Python IDE專用編輯器PyCharm開發環境搭建
terminal 環境搭建 1-1 reat 開發環境搭建 cnblogs ati .html eat 一 PyCharm下載 官網下載地址:https://www.jetbrains.com/pycharm/download/ 這裏的PyCharm有付費和免費版本,我
android開發環境搭建
for ips ogl developer 設置 path sys 打開 ins 一.安裝ADT插件 adt全稱是android developer tools,用途顯而易見。本文介紹在eclipse中在線安裝adt: 依次點擊 help>
Vulkan Tutorial 01 開發環境搭建之Windows
異常 方案 party return info auto 行程 while nload 操作系統:Windows8.1 顯卡:Nivida GTX965M 開發工具:Visual Studio 2017 相信很多人在開始學習Vulkan開發的起始階段都會在開發環境的配置上
ios開發-環境搭建
應用 最新版 計算 project 輸入 xcode 運行 搭建 new 一.裝XCode mac air 先更新到最新版mac系統 macOS Sierra 10.12.5 appStore 下載XCode Version 8.3.2 漫長等待... 二.建Hello
Python開發環境搭建
get python安裝 path 開發環境搭建 .py tar -s org pat 1、去到Python官網下載Python的安裝程序https://www.python.org/ 2、直接運行Python安裝程序python-2.7.13.msi(安裝方法很簡單,直接
Ubuntu開發環境搭建
rect android源碼 andro deb nload 4.2 tab file blue VM及Utuntu安裝 Vmware安裝/Ubuntu安裝 Vmware環境配置 安裝Vmware-tools: tar -xf xxx.tar.gz sudo
dubbo開發環境搭建與tomcat集成、DEMO示例(最完整版本、帶管理控制臺、監控中心、zookeeper)
-s http服務 ppr context 正常 windows web容器 web.xml配置 web.xml 以windows為例,linux基本相同,開發環境一般linux,個人環境一般windows(如果不開額外vm的話)。 示例以dubbo官方自帶demo為例子
NDK在windows下的開發環境搭建及開發過程
刷新 -1 ont static blog 簡單 包名 mfp targe 在Android應用的開發project中。無論是遊戲還是普通應用。都時常會用到.so即動態鏈接庫,關於.so是什麽玩意兒,有什麽優點。這個大家能夠在網上查一下,本人不做過多解釋。.
cocos2dx 3.0 windows8下開發環境搭建搭建 不須要cygwin
進行 文件夾 jdk 搭建 pop 官網下載 trac develop 嘗試 已經接觸cocos2dx有一段時間,但一直也僅僅是看看Demo,沒有真正的去寫代碼。由於本人僅僅是java的coder。還是半路出家的coder,編程基礎太淺。對於c++、lu
微信小程序的開發環境搭建(Windows版本)
block 項目目錄 mar 應用 images 想要 log 點擊 體系 前言: 小程序是指微信公眾平臺小程序,小程序可以幫助開發者快速的開發小程序,小程序可以在微信內被便捷地獲取和傳播;是一種不需要下載安裝即可使用的應用小程序,和原有的三種公眾號是並行的體系
從零開始學習音視頻編程技術(三) 開發環境搭建(Qt4.86手動設置環境,主要就是設置g++和qmake,比較透徹,附下載鏈接)
路徑 details 分享 baidu 末尾 是我 其中 找到 source 1.先下載安裝Qt 我們使用的版本是4.8。 可以自行百度下載也可以從下面的網盤地址下載: Qt庫和編譯器下載: 鏈接:http://pan.baidu.com/s/1hrUxLIG 密碼