Home php教程 php手册 详细介绍:Apache+PHP+MySQL配置攻略

详细介绍:Apache+PHP+MySQL配置攻略

Jun 13, 2016 pm 12:46 PM
one introduce exist Strategy test Version system Require detailed Configuration

  一、系统要求:

  本系统在REDHAT7.2版本测试通过

  二、服务器端软件要求:

  1:到APACHE的网络站下载APACHE WEB SERVER http://www.apache.org/

  2. 到php的网络站下载php解析器 http://www.php.net/

  3.到mysql的网站下载 mysql http://sourceforge.net/projects/mysql/

  三.安装调试WEB SERVER

  把以上各文件下载后放到同一个目录下,我把他们放在/usr/local下,用tar命令把个文件解包

  

tar zxvf apache_1.3.12.tar.gz
tar zxvf php-4.0.6.tar.gz
tar zxvf mysql-3.22.40.tar.gz

  为了便于安装建议把目录该名字

  

#mv apache_1.3.12 apache
#mv php-4.0.6 php
#mv mysql-3.22.40 mysql

  安装mysql

  四.在安装web服务前可以先安装mysql

  

cd mysql
./configure
make
make install

  根据机子的性能,编译过程要花费一定的时间,编译完成后系统默认把mysql安装在/usr/local下。

  安装完成后,先把mysql的进程启起来
  cd /usr/local/bin

  ./mysql_install_db(安装mysql的基本数据库)

  ./safe_mysqld & (把进程启起来并转入后台)

  到这里mysql算安装完成了,试试运行./mysql看看能不能链接数据库,如果正常的话,应该可以看到这样的界面

  

Welcome to the MySQL monitor.Commands end with ; or g.
Your MySQL connection id is 880 to server version: 3.22.40
Type 'help' for help.
mysql>

  到这恭喜你完成了mysql的安装

  mysql的使用大家可以参照他的doc文档

  五.整合apache、php4

  这是所有工作的关键所在,也是最难的一步,可能因为版本的不同在安装过程中有这样那样的错误,大家可以根据版本信息作出相应的修改。

  先cd apache

  ./configure

  这一好象可有可无,可是我曾经因为没有作这一步而出错所以必须有这一步

  

cd ../php
./configure --with-mysql=/usr/local --with-apache=/usr/local/apache --enable-track-vars
make
make install
cd ../apache
./configure --activate-module=src/modules/php4/libphp4.a 
make 
make install

  这步是安装apache WEB服务,大家可以看看./configure –help自己加入相应需要的模块,或者参照安装手册进行安装。

  把php的配置文件拷贝到相应的目录下

  cd ../php

  cp php.ini-dist /usr/local/lib/php.ini

  php.ini基本可以不用作什么修改,要修改可以参照相应的说明。

  配置完PHP就该配置Apache Web SERVER了,先对httpd.conf进行配置

  cd /usr/local/apache/conf

  vi httpd.conf

  针对php要对以下内容进行修改:

  # AddType application/x-httpd-php .php

  # AddType application/x-httpd-php-source .phps

  把以上两行的注释符去掉,并根据实际情况确定php文档的后缀名,根据horde的需要,建议大家把第一行改成如下形式

  AddType application/x-httpd-php .php .php3 .htm .phtml .php4

  另外还要修改系统默认的首页类型,建议把DirectoryIndex index.htm改成这样:

  DirectoryIndex index.htm index.html index.php3 index.php default.php

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Jul 30, 2024 pm 02:17 PM

On July 29, at the roll-off ceremony of AITO Wenjie's 400,000th new car, Yu Chengdong, Huawei's Managing Director, Chairman of Terminal BG, and Chairman of Smart Car Solutions BU, attended and delivered a speech and announced that Wenjie series models will be launched this year In August, Huawei Qiankun ADS 3.0 version was launched, and it is planned to successively push upgrades from August to September. The Xiangjie S9, which will be released on August 6, will debut Huawei’s ADS3.0 intelligent driving system. With the assistance of lidar, Huawei Qiankun ADS3.0 version will greatly improve its intelligent driving capabilities, have end-to-end integrated capabilities, and adopt a new end-to-end architecture of GOD (general obstacle identification)/PDP (predictive decision-making and control) , providing the NCA function of smart driving from parking space to parking space, and upgrading CAS3.0

750,000 rounds of one-on-one battle between large models, GPT-4 won the championship, and Llama 3 ranked fifth 750,000 rounds of one-on-one battle between large models, GPT-4 won the championship, and Llama 3 ranked fifth Apr 23, 2024 pm 03:28 PM

Regarding Llama3, new test results have been released - the large model evaluation community LMSYS released a large model ranking list. Llama3 ranked fifth, and tied for first place with GPT-4 in the English category. The picture is different from other benchmarks. This list is based on one-on-one battles between models, and the evaluators from all over the network make their own propositions and scores. In the end, Llama3 ranked fifth on the list, followed by three different versions of GPT-4 and Claude3 Super Cup Opus. In the English single list, Llama3 overtook Claude and tied with GPT-4. Regarding this result, Meta’s chief scientist LeCun was very happy and forwarded the tweet and

Always new! Huawei Mate60 series upgrades to HarmonyOS 4.2: AI cloud enhancement, Xiaoyi Dialect is so easy to use Always new! Huawei Mate60 series upgrades to HarmonyOS 4.2: AI cloud enhancement, Xiaoyi Dialect is so easy to use Jun 02, 2024 pm 02:58 PM

On April 11, Huawei officially announced the HarmonyOS 4.2 100-machine upgrade plan for the first time. This time, more than 180 devices will participate in the upgrade, covering mobile phones, tablets, watches, headphones, smart screens and other devices. In the past month, with the steady progress of the HarmonyOS4.2 100-machine upgrade plan, many popular models including Huawei Pocket2, Huawei MateX5 series, nova12 series, Huawei Pura series, etc. have also started to upgrade and adapt, which means that there will be More Huawei model users can enjoy the common and often new experience brought by HarmonyOS. Judging from user feedback, the experience of Huawei Mate60 series models has improved in all aspects after upgrading HarmonyOS4.2. Especially Huawei M

Join a new Xianxia adventure! 'Zhu Xian 2' 'Wuwei Test' pre-download is now available Join a new Xianxia adventure! 'Zhu Xian 2' 'Wuwei Test' pre-download is now available Apr 22, 2024 pm 12:50 PM

The "Inaction Test" of the new fantasy fairy MMORPG "Zhu Xian 2" will be launched on April 23. What kind of new fairy adventure story will happen in Zhu Xian Continent thousands of years after the original work? The Six Realm Immortal World, a full-time immortal academy, a free immortal life, and all kinds of fun in the immortal world are waiting for the immortal friends to explore in person! The "Wuwei Test" pre-download is now open. Fairy friends can go to the official website to download. You cannot log in to the game server before the server is launched. The activation code can be used after the pre-download and installation is completed. "Zhu Xian 2" "Inaction Test" opening hours: April 23 10:00 - May 6 23:59 The new fairy adventure chapter of the orthodox sequel to Zhu Xian "Zhu Xian 2" is based on the "Zhu Xian" novel as a blueprint. Based on the world view of the original work, the game background is set

How to check the version of Douyin How to check the version of Douyin Apr 15, 2024 pm 12:06 PM

1. Open the Douyin app and click [Me] in the lower right corner to enter the personal page. 2. Click the [Three Stripes] icon in the upper right corner and select the [Settings] option in the pop-up menu bar. 3. In the settings page, scroll to the bottom to view the current version number information of Douyin.

What are the differences between function testing and coverage in different languages? What are the differences between function testing and coverage in different languages? Apr 27, 2024 am 11:30 AM

Functional testing verifies function functionality through black-box and white-box testing, while code coverage measures the portion of code covered by test cases. Different languages ​​(such as Python and Java) have different testing frameworks, coverage tools and features. Practical cases show how to use Python's Unittest and Coverage and Java's JUnit and JaCoCo for function testing and coverage evaluation.

On the occasion of the re-opening of the national server of World of Warcraft, here are the 4 major version selection guides, the last one is more suitable for casual players On the occasion of the re-opening of the national server of World of Warcraft, here are the 4 major version selection guides, the last one is more suitable for casual players Apr 13, 2024 am 09:16 AM

There are currently 4 versions of World of Warcraft. The national server has been closed for more than a year. It is estimated that many players do not know where each version has developed. Let's sort out the current status of each version. 1. At the end of the official server version 10.0, before the closure of the national server, version 10.0 has just started. It is currently in version 10.26. There will be version 10.27 later, and the Age of Dragon expansion pack will be over. Although version 10.0 has received good reviews in foreign servers and has restored some popularity for Blizzard, the core of the game in version 10.0 has not changed at all. It is still mainly about big secrets and raids, and the number of PVP players is very small. With the continuous updates of the official server version, players’ gaming tendencies have also changed from PVE and PVP to collecting.

Detailed introduction of Samsung S24ai functions Detailed introduction of Samsung S24ai functions Jun 24, 2024 am 11:18 AM

2024 is the first year of AI mobile phones. More and more mobile phones integrate multiple AI functions. Empowered by AI smart technology, our mobile phones can be used more efficiently and conveniently. Recently, the Galaxy S24 series released at the beginning of the year has once again improved its generative AI experience. Let’s take a look at the detailed function introduction below. 1. Generative AI deeply empowers Samsung Galaxy S24 series, which is empowered by Galaxy AI and brings many intelligent applications. These functions are deeply integrated with Samsung One UI6.1, allowing users to have a convenient intelligent experience at any time, significantly improving the performance of mobile phones. Efficiency and convenience of use. The instant search function pioneered by the Galaxy S24 series is one of the highlights. Users only need to press and hold

See all articles