Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the installation and configuration of linux9.0+apache+php+mysql

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Today, I will talk to you about the installation and configuration of linux9.0+apache+php+mysql. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

The latest of mysql,apache,php

Bag

Mysql-standard-5.0.1-alpha-snapshot-pc-linux-i686.tar.gz

Httpd-2.0.52.tar.gz

-5.0.2.tar.gz

Let's install mysql first.

Cp mysql-standard-5.0.1-alpha-snapshot-pc-linux-i686.tar.gz / usr/local/

Tar-zxvf mysql-standard-5.0.1-alpha-snapshot-pc-linux-i686.tar.gz

Cd mysql-standard-5.0.1-alpha-pc-linux-i686/

Emacs INSTALL-BINARY gets installation information

Groupadd mysql

Useradd-g mysql mysql

Cd / usr/local/

Ln-s mysql-standard-5.0.1-alpha-pc-linux-i686/ mysql builds soft links

. / scripts/mysql_install_db-- user=mysql

Chown-R root.

Chown-R mysql data

Chgrp-R mysql.

. / bin/mysqld_safe-- user=mysql & launch mysql from the background and you will see

[1] 3879

[root--1014--/usr/local/mysql] Starting mysqld daemon with databases from / usr/local/mysql/data

The proof is successful, which can be seen with ps-aux │ grep mysql.

Installation succeeded

And then install apache.

Tar-zxvf httpd-2.0.52.tar.gz

Cd httpd-2.0.52

Emacs INSTALL gets some installation information

. / configure-enable-so-enable-so

Make; make install

Cd / usr/local/apache2/bin

. / apachectl start

Httpd: Could not determine the servers fully qualified domain name, using 127.0.0.1 for ServerName

Open it at this time, enter 127.0.0.1 or your computer name, mine is tian1118, and then you can see beautiful feathers, prove that apache is installed successfully, and can correctly display simplified Chinese, really cool.

Take a closer look, there seems to be something wrong.

Cd / usr/loca/apache2/conf/

Back up the cp httpd.conf beifei so that you don't correct your mistakes.

Emacs httpd.conf

Find # ServerName

Change it to ServerName 127.0.0.1

.. / bin/apachectl restart has no error prompt to prove success

And then install php.

Tar-zxvf php-5.0.2.tar.gz

Cd php-5.0.2

Emacs INSTALL gets some installation information

. / configure-with-apxs2=/usr/local/httpd/bin/apxs-with-=/usr/local/mysql

If there is the following proof that it is almost successful.

+-- +

│ 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: whether to overwrite'/ usr/local/lib/php.ini'? Y

Integration of php and apache

Emacs / usr/local/apache2/conf/httpd.conf finds the DirectoryIndex and changes it as follows:

DirectoryIndex index.html index.php index.htm index.html.var

find

AddType application/x-compress .Z

AddType application/x-gzip .gz .tgz

Add after it

AddType application/x-httpd-php .php

/ usr/local/apache2/bin/apachectl restart

Test php

Emacs / usr/local/apache2/htdocs/index.php

Add

Open the browser and enter

You can see the information about php, which proves that the php installation was successful.

Conclusion: it is strongly recommended that you install the software with source code, although it is troublesome, but you know what you have done, know where you installed the software package, and don't worry if something goes wrong. First, look at the error prompt, check the error message, and use what you have learned about linxu to determine which is wrong. For example, when I install php, I want to install apache first, then php, and finally mysql. When I install php, I add the parameter-with-mysql=/usr/local/mysql, it will make an error during installation, and when I install php, it also tells me that the version of libxm12 is too low, mine is RD9.0, kernel 2.4.20-8, when I use rpm-qa │ grep libxm12, version 1, then download libxml2-2.6.10.tar.gz, install php successfully.

After reading the above, do you have any further understanding of linux9.0+apache+php+mysql installation and configuration? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report