2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > centos65编译安装lamp和lnmp

centos65编译安装lamp和lnmp

时间:2023-05-30 22:49:06

相关推荐

centos65编译安装lamp和lnmp

Linux Apache Mysql PHP source install

CentOS6.5 Minimal setup

*可选 更换yum源

yum install gcc gcc-c++ setuptool ntsysv iptables vim system-config-securitylevel-tui system-config-network-tui openssl-devel curl-devel gd-devel libjpeg-devel perl perl-devel libxml2 libxml2-devel

1.apr1.6.2 ./configure --prefix=/usr/local/apr

2.expat2.2.1 ./configure --prefix=/usr/local/expat

3.apr-util1.6.0 ./configure --prefix=/usr/local/apu --with-apr=/usr/local/apr --with-expat=/usr/local/expat

4.pcre8.10 ./configure --prefix=/usr/local/pcre

5.httpd2.4.25 ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apu --with-pcre=/usr/local/pcre

6.mysql5.7 rpm -Uvh mysql57-community-release-el6-11.noarch.rpm

7.mcrypt2.5.8 ./configure --prefix=/usr/local/mcrypt

8.php5.6.30

./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-static --enable-maintainer-zts --enable-inline-optimization --enable-sockets --enable-wddx --enable-zip --enable-calendar --enable-bcmath --enable-soap --with-zlib --with-iconv --with-gd --with-xmlrpc --enable-mbstring --with-curl --enable-ftp --with-freetype-dir=/usr/bin --with-jpeg-dir=/usr/bin --with-png-dir=/usr/bin --disable-ipv6 --disable-debug --with-openssl --disable-maintainer-zts --disable-fileinfo --with-mcrypt=/usr/local/mcrypt

nginx

Pre-Built Packages for Stable version

To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with the following contents:

[nginx]

name=nginx repo

baseurl=/packages/OS/OSRELEASE/$basearch/

gpgcheck=0

enabled=1

Replace “OS” with “rhel” or “centos”, depending on the distribution used, and “OSRELEASE” with “6” or “7”, for 6.x or 7.x versions, respectively.

yum install nginx

(php7.1.8

./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-static --enable-maintainer-zts --enable-inline-optimization --enable-sockets --enable-wddx --enable-zip --enable-calendar --enable-bcmath --enable-soap --with-zlib --with-iconv --with-gd --with-xmlrpc --enable-mbstring --with-curl --enable-ftp --with-freetype-dir=/usr/bin --with-jpeg-dir=/usr/bin --with-png-dir=/usr/bin --disable-ipv6 --disable-debug --with-openssl --disable-maintainer-zts --disable-fileinfo --with-mcrypt=/usr/local/mcrypt --with-openssl --enable-fpm

)

Wrote PEAR system config file at: /usr/local/php7/etc/pear.conf

You may want to add: /usr/local/php7/lib/php to your php.ini include_path

/root/soft/php-7.1.8/build/shtool install -c ext/phar/phar.phar /usr/local/php7/bin

ln -s -f phar.phar /usr/local/php7/bin/phar

Installing PDO headers: /usr/local/php7/include/php/ext/pdo/

开启两个nginx配置文件

配置nginx,server配置

{

server {

listen 80;

server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

root /www

location / {

index index.html index.htm index.php l.php;

autoindex off;

try_files $uri $uri/ /index.php?$query_string;

}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html

#

error_page 500 502 503 504 /50x.html;

location = /50x.html {

root html;

}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80

#

#location ~ \.php$ {

# proxy_pass http://127.0.0.1;

#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#

location ~ \.php(.*)$ {

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param PATH_INFO $fastcgi_path_info;

fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

include fastcgi_params;

}

# deny access to .htaccess files, if Apache's document root

# concurs with nginx's one

#

#location ~ /\.ht {

# deny all;

#}

}

}

配置apache

vim /usr/local/apache2/conf/httpd.conf

Addtype application/x-httpd-php .php

开启rewrite模块,去掉#

将AllowOverride 改为All

svnserver的安装

1.sqlite3.19.3 ./configure --prefix=/usr/local/sqlite

./configure --prefix=/usr/local/svn --with-apr=/usr/local/apr --with-apr-util=/usr/local/apu

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。