如果有一台linux服务器,动手配置一台适合Joomla!的服务器,是非常简单的。我们配置一台linux as4u4 + apache 2+php 5 + mysql 5的服务器。
一、安装mysql
下载安装文件:
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51a-linux-i686-glibc23.tar.gz/from/http://ftp.iij.ad.jp/pub/db/mysql/
groupadd mysql
useradd -g mysql -s /sbin/nologin mysql
tar -zxvf mysql-5.0.51a-linux-i686-glibc23.tar.gz
mv mysql-5.0.51a-linux-i686-glibc23 /usr/local/mysql
cd /usr/local/mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
scripts/mysql_install_db --user=mysql
cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/
二、安装 apache
1. wget http://www.axint.net/apache/httpd/httpd-2.2.8.tar.gz
下载:apache 2.2.8
tar -xvzf httpd-2.2.8.tar.gz
cd httpd-2.2.8
./configure --prefix=/usr/local/apache --enable-rewrite --enable-so
make;make install
三、安装php
1、安装libpng
http://nchc.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.25.tar.gz
tar -xvzf libpng-1.2.25.tar.gz
cd libpng-1.2.25
cp scripts/makefile.std makefile
make
make install
2、安装libjpeg
linux安装盘上有 libjpeg-devel-6b-33.i386.rpm,要是从网上下载也行。
rpm -ivh libjpeg-devel-6b-33.i386.rpm
3、安装 freetype
wget http://jaist.dl.sourceforge.net/sourceforge/freetype/freetype-2.3.5.tar.gz
tar -xvzf freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure
make;make install
4、安装GD
wget http://www.libgd.org/releases/gd-2.0.35.tar.gz
tar -xvzf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --with-png --with-freetype --with-jpeg
make;make install
5、安装PHP
wget http://cn2.php.net/get/php-5.2.5.tar.gz/from/this/mirror
源代码 php 5.2.5 ,下载,解压缩:
tar -xvzf php-5.2.5.tar.gz
cd php-5.2.5
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --enable-ftp --with-zlib --with-mcrypt --with-gd --with-gettext --with-iconv --with-pdo-mysql=/usr/local/mysql --with-ttf --enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-freetype-dir --with-apxs2=/usr/local/apache/bin/apxs
make;make install;
6、编译完成后,在apache目录下生成了php5的module,重启apache
四、修改apache 配置
AddType application/x-httpd-php .php
其余的按照配置apache站点的标准进行就好。
让我们来启动mysql
service mysql.server start
启动apache
/usr/local/apache/bin/apachectl start
这样一台服务器就配置完成了,只需要设置好虚机,就可以用你的域名访问了
一、安装mysql
下载安装文件:
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51a-linux-i686-glibc23.tar.gz/from/http://ftp.iij.ad.jp/pub/db/mysql/
groupadd mysql
useradd -g mysql -s /sbin/nologin mysql
tar -zxvf mysql-5.0.51a-linux-i686-glibc23.tar.gz
mv mysql-5.0.51a-linux-i686-glibc23 /usr/local/mysql
cd /usr/local/mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
scripts/mysql_install_db --user=mysql
cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/
二、安装 apache
1. wget http://www.axint.net/apache/httpd/httpd-2.2.8.tar.gz
下载:apache 2.2.8
tar -xvzf httpd-2.2.8.tar.gz
cd httpd-2.2.8
./configure --prefix=/usr/local/apache --enable-rewrite --enable-so
make;make install
三、安装php
1、安装libpng
http://nchc.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.25.tar.gz
tar -xvzf libpng-1.2.25.tar.gz
cd libpng-1.2.25
cp scripts/makefile.std makefile
make
make install
2、安装libjpeg
linux安装盘上有 libjpeg-devel-6b-33.i386.rpm,要是从网上下载也行。
rpm -ivh libjpeg-devel-6b-33.i386.rpm
3、安装 freetype
wget http://jaist.dl.sourceforge.net/sourceforge/freetype/freetype-2.3.5.tar.gz
tar -xvzf freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure
make;make install
4、安装GD
wget http://www.libgd.org/releases/gd-2.0.35.tar.gz
tar -xvzf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --with-png --with-freetype --with-jpeg
make;make install
5、安装PHP
wget http://cn2.php.net/get/php-5.2.5.tar.gz/from/this/mirror
源代码 php 5.2.5 ,下载,解压缩:
tar -xvzf php-5.2.5.tar.gz
cd php-5.2.5
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --enable-ftp --with-zlib --with-mcrypt --with-gd --with-gettext --with-iconv --with-pdo-mysql=/usr/local/mysql --with-ttf --enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-freetype-dir --with-apxs2=/usr/local/apache/bin/apxs
make;make install;
6、编译完成后,在apache目录下生成了php5的module,重启apache
四、修改apache 配置
AddType application/x-httpd-php .php
其余的按照配置apache站点的标准进行就好。
让我们来启动mysql
service mysql.server start
启动apache
/usr/local/apache/bin/apachectl start
这样一台服务器就配置完成了,只需要设置好虚机,就可以用你的域名访问了