当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 4 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : ApacheMySQLPHP
帖子发表于 : 2005-08-26 23:55 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10116
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 128
This is to help people setup and install a [WWW] LAMP server in Ubuntu 5.04, including Apache 2, PHP 4, and MySQL 4.1. As of this writing, MYSQL 5.0 and PHP 5 could only be installed by compiling. See the bottom of this document for further info.
Check Repositories

The Universe repository needs to be enabled to install Apache. Please see AddingRepositoriesHowto for details.

Also, you should be familiar with RootSudo.
Installing Apache 2

$ sudo apt-get install apache2

Installing PHP 4

$ sudo apt-get install php4

Installing MYSQL 4

$ sudo apt-get install mysql-server
$ sudo apt-get install libapache2-mod-auth-mysql
$ sudo apt-get install php4-mysql

After installing MySQL, you really ought to read [WWW] 2.9.3. Securing the Initial MySQL Accounts from the [WWW] MySQL Reference Manual.
Edit Apache Configuration

You may want your current user to be the PHP pages administrator. To do so, edit the Apache configuration file :

$ sudo gedit /etc/apache2/apache2.conf

Search both the strings starting by "User" and "Group", and change the names by the current username and groupname you are using. Then you'll need to restart Apache. (look at the next chapter concerning apache commands)
Edit PHP Configuration to Work With MYSQL

You may need to edit the PHP configuration file to get PHP and MYSQL talking :

$ sudo gedit /etc/php4/apache2/php.ini

Remove the ";" for the line ";extension=mysql.so", and restart Apache as is stated below.
Run, stop, and restart Apache

Use the following command to run Apache :

$ sudo /usr/sbin/apache2ctl start

To stop it, use :

$ sudo /usr/sbin/apache2ctl stop

Finally, to restart it, run :

$ sudo /usr/sbin/apache2ctl restart

Status

To check the status of your PHP installation:

$ sudo gedit /var/www/testphp.php

and insert the following line

<?php phpinfo(); ?>

View this page on a web browser, at [WWW] http://yourserveripaddress/testphp.php or [WWW] http://localhost/testphp.php
Securing Apache

If you just want to run your Apache install as a development server and want to prevent it from listening for incoming connection attempts, this is easy to do.

$ sudo gedit /etc/apache2/ports.conf
$ password:

Change ports.conf so that it contains:

Listen 127.0.0.1:80

Save this file, and restart Apache (see above). Now Apache will serve only to your home domain, [WWW] http://127.0.0.1 or [WWW] http://localhost.
Further Information

You can compile PHP5FromSource, as well as MYSQL5FromSource.


https://wiki.ubuntu.com/ApacheMySQLPHP


_________________
当净其意如虚空,远离妄想及诸取,令心所向皆无碍


页首
 用户资料  
 
2 楼 
 文章标题 : 初译
帖子发表于 : 2005-08-31 10:35 
头像

注册: 2005-08-29 14:49
帖子: 1119
地址: 杭州
送出感谢: 0 次
接收感谢: 3
http://forum.ubuntu.org.cn/viewtopic.php?t=2375

This is to help people setup and install a [WWW] LAMP server in Ubuntu 5.04, including Apache 2, PHP 4, and MySQL 4.1. As of this writing, MYSQL 5.0 and PHP 5 could only be installed by compiling. See the bottom of this document for further info.
本页面是为了帮助人们在Ubuntu 5.04上设置和安装[WWW]LAMP服务器,包括Apache 2、PHP 4和MySQL 4.1。写作此页时,MYSQL 5.0和PHP 5只能通过编译安装。更多信息参看本文档最后部分。
Check Repositories
检查仓库

The Universe repository needs to be enabled to install Apache. Please see AddingRepositoriesHowto for details.
为安装Apache,需要激活Universe仓库。细节请参看AddingRepositoriesHowto。

Also, you should be familiar with RootSudo.
还有你应该熟悉RootSudo。
Installing Apache 2
安装Apache 2

$ sudo apt-get install apache2

Installing PHP 4
安装PHP 4

$ sudo apt-get install php4

Installing MYSQL 4
安装MYSQL 4

$ sudo apt-get install mysql-server
$ sudo apt-get install libapache2-mod-auth-mysql
$ sudo apt-get install php4-mysql

After installing MySQL, you really ought to read [WWW] 2.9.3. Securing the Initial MySQL Accounts from the [WWW] MySQL Reference Manual.
安装MySQL之后,你应该用心阅读一下[WWW]MySQL参考手册中的[WWW] 2.9.3. 保护MySQL初始帐号。
Edit Apache Configuration
编辑Apache配置

You may want your current user to be the PHP pages administrator. To do so, edit the Apache configuration file :
你也许要让自己的当前用户成为PHP页管理员。要达此目的,需编辑Apache配置文件:

$ sudo gedit /etc/apache2/apache2.conf

Search both the strings starting by "User" and "Group", and change the names by the current username and groupname you are using. Then you'll need to restart Apache. (look at the next chapter concerning apache commands)
搜索开头为“User”和“Group”的字符串,用你正在使用的用户名和组名替换这两个名字。随后你应重启Apache。(参看apache命令相关的下一章)
Edit PHP Configuration to Work With MYSQL
编辑PHP配置以配合MYSQL使用

You may need to edit the PHP configuration file to get PHP and MYSQL talking :
你可能需要编辑PHP配置文件,使PHP和MYSQL互通:

$ sudo gedit /etc/php4/apache2/php.ini

Remove the ";" for the line ";extension=mysql.so", and restart Apache as is stated below.
删除";extension=mysql.so"行的";",按如下所述重启Apache。
Run, stop, and restart Apache

Use the following command to run Apache :
运行、停止和重启Apache

使用如下命令运行Apache:

$ sudo /usr/sbin/apache2ctl start

To stop it, use :
要停止Apache,使用:

$ sudo /usr/sbin/apache2ctl stop

Finally, to restart it, run :
最后,重启Apache,执行如下命令:

$ sudo /usr/sbin/apache2ctl restart

Status
状态

To check the status of your PHP installation:
为检查你的PHP安装状态:

$ sudo gedit /var/www/testphp.php

and insert the following line
在上述文件中插入下面这行代码:

<?php phpinfo(); ?>

View this page on a web browser, at [WWW] http://yourserveripaddress/testphp.php or [WWW] http://localhost/testphp.php
在Web浏览器中查看此页面,通过[WWW] http://yourserveripaddress/testphp.php或[WWW] http://localhost/testphp.php地址。
Securing Apache
保护Apache

If you just want to run your Apache install as a development server and want to prevent it from listening for incoming connection attempts, this is easy to do.
如果你只是要把自己的Apache安装作为一个开发服务器运行,想阻止其侦听外来连接,按如下方法即可:

$ sudo gedit /etc/apache2/ports.conf
$ password:

Change ports.conf so that it contains:
更改ports.conf使其包含:

Listen 127.0.0.1:80

Save this file, and restart Apache (see above). Now Apache will serve only to your home domain, [WWW] http://127.0.0.1 or [WWW] http://localhost.
保存此文件并重启Apache(参见上面所述)。现在Apache将只服务于你自己的home域,[WWW] http://127.0.0.1或[WWW] http://localhost
Further Information
更多信息

You can compile PHP5FromSource, as well as MYSQL5FromSource.
如MYSQL5FromSource,你也可以从源码编译PHP5,PHP5FromSource。

https://wiki.ubuntu.com/ApacheMySQLPHP


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2005-09-07 20:45 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10116
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 128
http://www.ubuntu.org.cn/support/docume ... howto_view


_________________
当净其意如虚空,远离妄想及诸取,令心所向皆无碍


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2006-07-30 18:10 
头像

注册: 2005-07-02 14:41
帖子: 4133
系统: Ubuntu 14.04 (Kylin)
送出感谢: 53
接收感谢: 11
过时了

作废


_________________
https://weakish.github.io


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 4 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译