lamp编译安装

来源:互联网 发布:极限挑战网络直播 编辑:程序博客网 时间:2024/05/22 06:51

对于公司里面开发的虚拟机上,往往是共享的,因此,所安装的软件一定要与别人的隔离开,不能影响到其它的同类型软件。


php编译参数
./configure --prefix=/home/xinlong/php --with-apxs2=/home/xinlong/apache/bin/apxs --with-mysql=/home/xinlong/mysql --with-config-file-path=/home/xinlong/php/etc

apache编译参数:

configure --prefix=/home/xinlong/apahce

httpd.conf中要添加
ADDType application/x-httpd-php .php

ADDType application/x-httpd-php-source .phps

mysql编译参数:

./configure --prefix=/home/xinlong/mysql --enable-assembler --without-debug --with-mysqld-ldflags=-all-static --enable-thread-safe-client --with-charset=utf8 --with-extra-charsets=all --with-unix-socket-path=/home/xinlong/mysql/tmp/mysql.sock --with-mysqld-user=lucien --sysconfdir=/home/xinlong/mysql/var/my.cnf --localstatedir=/home/xinlong/mysql/data

还要在源码中拷贝 my.cnf到mysql/var/中

另外这有一个我对于虚拟主机的配置方法(以phpmyadmin为例)

进入apache/conf,mkdir sites-enabled

在httpd.conf 中添加Include conf/sites-enabled/*

在sites-enabled中可以添加自己的虚拟主机文件,如vim phpmyadmin

Listen 8080
NameVirtualhost *:8080
<VirtualHost *:8080>
        DocumentRoot "/home/xinlong/phpmyadmin"
        servername locahost:8080
        <Directory "/home/xinlong/phpmyadmin">
                Options Indexes FollowSymLinks
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>




原创粉丝点击