LINUX下打造论坛全过程之第2天!
2005-03-10 19:44
302 查看
需求软件:
mysql-standard-5.0.2-alpha-snapshot-pc-linux-i686.tar.gz(www.mysql.com)
httpd-2.0.53.tar.gz (www.apache.org)
php-5.0.3.tar.gz (www.php.net)
1 安装mysql
cp mysql-standard-5.0.2-alpha-snapshot-pc-linux-i686.tar.gz /usr/local/
tar -zxvf mysql-standard-5.0.2-alpha-snapshot-pc-linux-i686.tar.gz
cd mysql-standard-5.0.2-alpha-pc-linux-i686/
emacs INSTALL-BINARY 获得安装信息
groupadd mysql
useradd -g mysql mysql
cd /usr/local/
ln -s mysql-standard-5.0.1-alpha-pc-linux-i686/ mysql 建立软链接
./scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
./bin/mysqld_safe --user=mysql & 从后台启动mysql,这时会看到
[root--1014--/usr/local/mysql]Starting mysqld daemon with databases from /usr/local/mysql/data
证明已经成功,可以用ps -aux │ grep mysql 可以看到。
安装成功
2 安装apache
tar -zxvf httpd-2.0.53.tar.gz
cd httpd-2.0.53
emacs INSTALL 获得一些安装信息
./configure --enable-so --enable-so
make
make install
cd /usr/local/apache2/bin
./apachectl start
打开Firefox浏览器,输入127.0.0.1,然后你就可以看到漂亮的羽毛,证明apache安装成功.
接着cd /usr/loca/apache2/conf/
emacs httpd.conf
找到#ServerName www.example.com:80
把它改为ServerName 127.0.0.1
../bin/apachectl restart 没有出错提示证明成功
3 安装PHP
再来安装php
tar -zxvf php-5.0.3.tar.gz
cd php-5.0.3
emacs INSTALL 获得一些安装信息
./configure --with-apxs2=/usr/local/httpd/bin/apxs --with- mysql=/usr/local/mysql
如果出现如下证明快成功了。
+-------------------------------------------------------------------- +
│ 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
cp php.ini-dist /usr/local/lib/php.ini
cp:是否覆盖‘/usr/local/lib/php.ini’? y
php与apache整合
emacs /usr/local/apache2/conf/httpd.conf 找到DirectoryIndex改为如下:
DirectoryIndex index.html index.php index.htm index.html.var
找到
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
在它后面添加
AddType application/x-httpd-php .php
/usr/local/apache2/bin/apachectl restart
测试php
emacs /usr/local/apache2/htdocs/index.php
输入1个经典的Hello World 程序
<html>
<head>
<title>PHP text</title>
</head>
<body>
<?php echo "<p>Hello World</p>"; ?>
</body>
</html>
打开浏览器,输入http://127.0.0.1/index.php 可以看到关于php的信息,证明php安装成功。
(于PHPBB2中文开发小组论坛得到资料,并修订了下)
mysql-standard-5.0.2-alpha-snapshot-pc-linux-i686.tar.gz(www.mysql.com)
httpd-2.0.53.tar.gz (www.apache.org)
php-5.0.3.tar.gz (www.php.net)
1 安装mysql
cp mysql-standard-5.0.2-alpha-snapshot-pc-linux-i686.tar.gz /usr/local/
tar -zxvf mysql-standard-5.0.2-alpha-snapshot-pc-linux-i686.tar.gz
cd mysql-standard-5.0.2-alpha-pc-linux-i686/
emacs INSTALL-BINARY 获得安装信息
groupadd mysql
useradd -g mysql mysql
cd /usr/local/
ln -s mysql-standard-5.0.1-alpha-pc-linux-i686/ mysql 建立软链接
./scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
./bin/mysqld_safe --user=mysql & 从后台启动mysql,这时会看到
[root--1014--/usr/local/mysql]Starting mysqld daemon with databases from /usr/local/mysql/data
证明已经成功,可以用ps -aux │ grep mysql 可以看到。
安装成功
2 安装apache
tar -zxvf httpd-2.0.53.tar.gz
cd httpd-2.0.53
emacs INSTALL 获得一些安装信息
./configure --enable-so --enable-so
make
make install
cd /usr/local/apache2/bin
./apachectl start
打开Firefox浏览器,输入127.0.0.1,然后你就可以看到漂亮的羽毛,证明apache安装成功.
接着cd /usr/loca/apache2/conf/
emacs httpd.conf
找到#ServerName www.example.com:80
把它改为ServerName 127.0.0.1
../bin/apachectl restart 没有出错提示证明成功
3 安装PHP
再来安装php
tar -zxvf php-5.0.3.tar.gz
cd php-5.0.3
emacs INSTALL 获得一些安装信息
./configure --with-apxs2=/usr/local/httpd/bin/apxs --with- mysql=/usr/local/mysql
如果出现如下证明快成功了。
+-------------------------------------------------------------------- +
│ 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
cp php.ini-dist /usr/local/lib/php.ini
cp:是否覆盖‘/usr/local/lib/php.ini’? y
php与apache整合
emacs /usr/local/apache2/conf/httpd.conf 找到DirectoryIndex改为如下:
DirectoryIndex index.html index.php index.htm index.html.var
找到
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
在它后面添加
AddType application/x-httpd-php .php
/usr/local/apache2/bin/apachectl restart
测试php
emacs /usr/local/apache2/htdocs/index.php
输入1个经典的Hello World 程序
<html>
<head>
<title>PHP text</title>
</head>
<body>
<?php echo "<p>Hello World</p>"; ?>
</body>
</html>
打开浏览器,输入http://127.0.0.1/index.php 可以看到关于php的信息,证明php安装成功。
(于PHPBB2中文开发小组论坛得到资料,并修订了下)
相关文章推荐
- LINUX下打造论坛全过程之第1天!
- LINUX下打造论坛全过程之第3天!
- 写一个Linux下搭建Discuz论坛的全过程教程。
- 打造自己的专属linux(四):Linux内核编译过程简介
- 一步一步打造自己的Linux--LFS6.3安装全过程
- 从windows服务器中的Mysql数据库和论坛程序迁移到Linux系统中的整个过程
- 基于Red Hat Enterprise Linux 5安装discuz论坛过程
- 打造自己的专属linux(四):Linux内核编译过程简介
- Linux Socket过程详细解释(包括三次握手建立连接,四次握手断开连接)
- Linux进程启动过程分析do_execve(可执行程序的加载和运行)---Linux进程的管理与调度(十一)
- RHEL5.3-WEB-linux+apache+mysql+php搭建论坛 (全rpm包安装)
- Linux操作系统学习_用户态与内核态之切换过程
- Linux从开机到登录启动过程综述(1)
- gcc编译过程、C语言编译过程分析、环境变量设置、linux文件夹结构和用途介绍、常用文件和目录的操作命令、文件类型
- linux登录过程
- 解决 Linux 下 SSH 远程连接服务卡慢的全过程
- 一张图说明Linux启动过程
- Linux操作系统启动过程
- linux使用过程中的常见错误