编译环境
Debian (Ubuntu)
apt-get install build-essential
apt-get install libncurses5-dev
sudo apt-get install libxml2-dev libcurl3-dev libpng-dev libmhash-dev libmcrypt-dev libxslt-dev libpspell-dev
Mysql编译安装参数
CHOST="i686-pc-linux-gnu" CFLAGS="-O3 -msse2 -mmmx -mfpmath=sse -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer" CXXFLAGS="-O3 -msse2 -mmmx -mfpmath=sse -funroll-loops -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer" ./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-comment=Source --with-server-suffix=-Community-Server --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-ndb-debug --without-isam --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
配置成功会提示:
MySQL has a Web site athttp://www.mysql.com/which carries details on the
latest release, upcoming features, and other information to make your
work or play with MySQL more productive. There you can also find
information about mailing lists for MySQL discussion.
Remember to check the platform. specific part of the reference manual for
hints about installing MySQL on your platform. Also have a look at the
files in the Docs directory.
Thank you for choosing MySQL!
make
make install
groupadd mysql //增加mysql组
useradd -g mysql mysql //增加mysql用户,这个用户属于mysql组
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root:mysql . //设置权限,注意后面有一个 "."
chown -R mysql /var/lib/mysql //设置 mysql 目录权限
chgrp -R mysql . //注意后面有一个 "."
cp share/mysql/my-medium.cnf /etc/my.cnf
cp share/mysql/mysql.server /etc/init.d/mysqld //开机自动启动 mysql。
chmod 755 /etc/init.d/mysqld
rcconf //开启启动服务设置
/etc/init.d/mysqld start //启动 MySQL
bin/mysqladmin -u root password "password_for_root"
查看mysql编译参数
cat /usr/local/mysql/bin/mysqlbug |grep ./configure
把 mysql 加入环境变量
export PATH="$PATH:/usr/local/mysql/bin"
apache 编译
./configure //配置源代码树
--prefix=/usr/local/apache2 //体系无关文件的顶级安装目录PREFIX ,也就Apache的安装目录。
--enable-module=so //打开 so 模块,so 模块是用来提 DSO 支持的 apache 核心模块
--enable-deflate=shared //支持网页压缩
--enable-expires=shared //支持 HTTP 控制
--enable-rewrite=shared //支持 URL 重写
--enable-cache //支持缓存
--enable-file-cache //支持文件缓存
--enable-mem-cache //支持记忆缓存
--enable-disk-cache //支持磁盘缓存
--enable-static-support //支持静态连接(默认为动态连接)
--enable-static-htpasswd //使用静态连接编译 htpasswd - 管理用于基本认证的用户文件
--enable-static-htdigest //使用静态连接编译 htdigest - 管理用于摘要认证的用户文件
--enable-static-rotatelogs //使用静态连接编译 rotatelogs - 滚动 Apache 日志的管道日志程序
--enable-static-logresolve //使用静态连接编译 logresolve - 解析 Apache 日志中的IP地址为主机名
--enable-static-htdbm //使用静态连接编译 htdbm - 操作 DBM 密码数据库
--enable-static-ab //使用静态连接编译 ab - Apache HTTP 服务器性能测试工具
--enable-static-checkgid //使用静态连接编译 checkgid
--disable-cgid //禁止用一个外部 CGI 守护进程执行CGI脚本
--disable-cgi //禁止编译 CGI 版本的 PHP
--disable-userdir //禁止用户从自己的主目录中提供页面
--with-mpm=worker // 让apache以worker方式运行
--enable-authn-dbm=shared // 对动态数据库进行操作。Rewrite时需要。
make
make install
建立一个符号连接:
ln -s /usr/local/apache2/bin/apachectl /etc/init.d/httpd
rcconf //加入自动启动
php 编译
CHOST="i686-pc-linux-gnu" CFLAGS="-O3 -msse2 -mmmx -mfpmath=sse -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer" CXXFLAGS="-O3 -msse2 -mmmx -mfpmath=sse -funroll-loops -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer" ./configure --prefix=/usr/local/php5 --with-mysql=/usr/local/mysql --with-gd --enable-calendar --with-zlib --with-curl --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-openssl --enable-zend-multibyte --with-gettext --with-mcrypt --enable-exif --with-png-dir=/usr/local/lib --enable-ftp --with-mhash --with-libxml-dir=/usr/local/lib --with-xsl --with-pspell
配置完成提示
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
make
make install
修改/usr/local/apache2/conf/httpd.conf,在AddType部分加入如下内容
AddType application/x-httpd-php .php
分享到:
相关推荐
Debian中的dhcp源代码 Debian 是一个 自由 的操作系统 (OS) 供您和您的计算机使用。一个操作系统就是让您的计算机工作的一系列基础程序和实用工具的集合。由于 Debian 采用了 Linux 内核 (一个操作系统的核心),但是...
debian7下的常用配置文件 包括vim、更新源等
TuxLite, Debian或者Ubuntu的完整 LAMP 和LNMP设置脚本 TuxLite自述文件TuxLite是一个免费的shell 脚本集合,用于快速部署用于Debian和Ubuntu的LAMP 和LNMP栈( Linux,apache/Nginx,MySQL和 PHP ) 。你认为从共享...
选择合适的Ubuntu版本 在系统安装篇已经说过了,32位CPU用户安装32位版的Ubuntu,64位CPU的就安装64位版本。有人说64版本安装软件有兼容性问题。我从Ubntuu7.04开始到现在的8.04一直使用64位系统,一直都很稳定没...
nginx-autoinstall, 在Debian和Ubuntu上,使用定制模块从源代码编译 Nginx 自动安装通过optionnal模块编译和安装 Nginx 。 兼容性x86,x64,arm*Debian 8和更高版本Ubuntu 16.04和更高版本特性最新的主线或者稳定...
这个文件含有Debian 6 Squeeze与Debian 7 wheezy的镜像使用路径,直接把里面的内容覆盖到/etc/apt/sources.list。本文件直接从网站下载,非个人所做。只为方便大家下载。
deb 安装包,适用于 Debian 9 - 11 / Ubuntu 18.x - 22.x 已注册,即装即用无限制。
ubuntu安装todesk
为CentOS / Debian / Ubuntu安装LAMP(Linux + Apache + MySQL / MariaDB / Percona Server + PHP)描述LAMP是一个功能强大的bash脚本,用于安装Apache + PHP + MySQL / MariaDB / Percona Server等。 您可以通过...
plex media server 1.25.4.5487 debian ubuntu amd64版本 解决部分视频不能播放并提示,File is unplayable. Color space is not supported.文件无法播放。不支持颜色空间。
Ubuntu/Debian 自有软件包构建私有源 linux在自建私有yum源方面,我们熟知redhat系列的createrepo命令,配合rpmbuild命令,使我们创建私有yum真是相当简单了,如果切换到debian系列下面呢?前面的文件讲解了怎么...
Synergy for Debian和Ubuntu Linux 系统下的鼠标和键盘共享软件,因为Synergy 是跨平台支持的,因此大家可以在多终端下使用! 关于Synergy Linux 一款能够让使用者仅用一套键盘鼠标,就同时操控多部计算机的免费工具...
debian、ubuntu、凝思磐石系统oracle11g安装包,内含安装脚本支持自动安装数据库,并还原数据库dmp文件
简介 ubuntu(debian)的软件包管理
Debian LAMP Docker 映像 这不是官方的 Debian 映像(也不与 Apache 软件基金会或任何东西相关)。 这是一个完整的 LAMP 堆栈 Docker 映像,基于 Debian Stable 并运行和 Percona MySQL Server 提供的最新 PHP 版本...
通过一个简单的脚本将英特尔MKL添加到Debian / Ubuntu系统
Debian安装与基本配置 图解版 挺详细的配置
ansible-role-nvm:在DebianUbuntu和RHELCentOS上安装NVM和Node.js
Ubuntu/Debian的系统下对IP的自动配置脚本,包括网卡,IP ,掩码,网关,DNS服务器的配置,使用指令:sudo ipaddr.sh.x -i eth0 -a 192.168.1.10 -m 255.255.255.0 -g 192.168.1.1 -d 8.8.8.8 根据自己的需求进行一定...