debian/ubuntu 编译安装nginx php

debian/ubuntu 编译安装nginx php

tar -zxvf nginx-1.9.9.tar.gz

apt-get install libpcre3 libpcre3-dev

./configure --prefix=/work/nginx-1.9.9 --with-pcre

make

make install

service iptables stop #关闭防火墙, 可能不需要

修改nginx运行用户为tboqi

抱着log目录可写

.bashrc

alias nginx="sudo /home/tboqi/download/linuxSoft/nginx-1.9.9/sbin/nginx"


582 ./configure --prefix=/home/tboqi/lib/php-5.6.21 --enable-fpm --enable-bcmath --with-gd --enable-gd-native-ttf --with-gd --with-png-dir --with-curl --with-bz2 --with-freetype-dir --with-iconv-dir --with-zlib-dir --enable-soap --with-pear=PREFIX/pear --enable-gd-native-ttf --enable-mbstring --enable-exif --disable-cgi --enable-cli --with-jpeg-dir --enable-bcmath --enable-sockets --disable-ipv6 --with-mcrypt --with-mysql=mysqlnd --enable-ftp --enable-mysqlnd --with-mysqli=mysqlnd --enable-embedded-mysqli --enable-embedded-mysqli --disable-mysqlnd-compression-support --with-pdo-mysql=mysqlnd

583 make

585 ls

586 cd ext/phar/

587 ls

588 cp phar.phar ../../

584 make install


602 cd lib/

604 cd nginx-1.9.9/

606 cd conf/

608 mv nginx.conf nginx.confbak

614 ln -s /home/tboqi/tbqapps/cfg/vbox_centos_v6.8_conf/nginx.conf.1.9.9 nginx.conf

615 mkdir vhost

618 cd vhost/

620 ln -s /home/tboqi/tbqapps/cfg/vbox_centos_v6.8_conf/nginx_vhost/www.tbq.com.conf

633 cd ..

634 cd php-5.6.21/

636 cd lib/

638 mv php.ini php.inibak

639 ln -s ~/tbqapps/cfg/vbox_centos_v6.8_conf/php.ini5.6 php.ini

640 cd ..

643 cd etc/

645 ln -s ~/tbqapps/cfg/vbox_centos_v6.8_conf/php-fpm.conf5.6 php-fpm.conf

649 ./sbin/php-fpm

659 nginx -s reload

http://192.168.56.20/info.php 配置完成

相关推荐
创世宇图1 小时前
阿里云Alibaba Cloud Linux 4 LTS 64位生产环境配置-Nginx
linux·nginx
HelloTonyGo2 小时前
个人游戏笔记本免费“养龙虾”(Win10+WSL2+OpenClaw 部署与配置指南)
windows·ubuntu·wsl2·openclaw
小飞菜涅4 小时前
fast-lio2复现
嵌入式硬件·学习·ubuntu
三七吃山漆6 小时前
[红明谷CTF 2021]write_shell
php·ctf·[红明谷ctf 2021]
ZHOUPUYU7 小时前
PHP与WebSocket实时通信的原理到生产级应用
开发语言·html·php
ken22328 小时前
ubuntu 云镜像 2604 的内存和磁盘占用 实测
linux·运维·ubuntu
一勺菠萝丶8 小时前
芋道项目部署时,前端和门户网站如何通过 Nginx 转发后台接口,而不直接暴露后端地址
运维·前端·nginx
困死,根本不会8 小时前
树莓派 SSH 连接排错实录:从 IP 网段到主机密钥变更,再到 VNC 自启动
开发语言·ssh·php·树莓派
好多渔鱼好多8 小时前
【IPC】Nginx 技术介绍
人工智能·nginx
桌面运维家9 小时前
Nginx+Keepalived:Linux高可用负载均衡配置实战
linux·nginx·负载均衡