|
为了装wordpress 顺便打造自己的Home Server
Apache PHP MYSQL还是习惯手工编译 因为有些参数需要设置
在Slackware上编译AMP好爽 基本上支持包一个都不少
如果你用Ubuntu Server 手工编译 支持包就得烦死你 一个一个装上那些包 才能开工
我习惯装在/opt下 装在你自己习惯的地方就好了
apache还是用2.0的最高版本 2.2好像变了不少 还没习惯
#######################
# Apache
#######################
./configure --prefix=/opt/apache2 --enable-so --enable-rewrite=shared
make
make install
nano /etc/rc.local
-- add the follow line behind exit 0
/usr/local/apache2/bin/apachectl start
MYSQL编译太慢 用最新的版本就好了 直接bin安装吧 没什么麻烦
#######################
# MYSQL
#######################
cp mysql-standard-5.0.18-linux-i686.tar.gz /opt
cd /opt/
gunzip < mysql-standard-5.0.18-linux-i686.tar.gz | tar xvf -
mv mysql-standard-5.0.18-linux-i686 mysql '
rm mysql-standard-5.0.18-linux-i686.tar.gz
cd mysql
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
bin/mysqld_safe --user=mysql &
cp support-files/my-medium.cnf /etc/my.cnf
cp /opt/mysql/support-files/mysql.server /etc/rc.d/rc.mysqld
#edit the rc.mysqld edit the $basedir...
/opt/mysql/bin/mysqladmin -u root password "your password"
这里要注意 5。0以上的MYSQL使用的是新的密码hash算法
我们要改回旧的方式 要不很多程序还要改
/opt/mysql/bin/mysql -u root -p
登陆 然后
USE mysql;
UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') WHERE Host = 'some_host' AND User = 'some_user';
按照你的情况修改上面的SQL语句就好了
最后装PHP
#######################
# PHP
#######################
./configure -prefix=/opt/php -with-mysql-dir=/opt/mysql -enable-bcmath -with-zlib -with-gd -with-jpeg-dir -enable-gd-native-ttf -with-ttf -with-freetype-dir -enable-memory-limit -enable-zend-multibyte -disable-ipv6 -disable-path-info-check -with-iconv -with-pear -disable-debug -with-mail -with-apxs2=/opt/apache2/bin/apxs
cp php.ini-dist /usr/local/lib/php.ini
nano /usr/local/apache2/conf/httpd.conf
-- add these lines
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
上面是我习惯的配置文件 为了兼容老程序 用4系列最新版
这里说下 一定要把mail加上 否则你很多程序里面的mail()函数无法使用~比如wordpress
好了现在都可以用了
编辑一个
<? phpinfo(); ?>
看看吧~ |
|