LAMP configuration under Fedora 5

xiaoxiao2021-04-07  351

Fedora inherits the style of Red Hat, the installation configuration is simple, and the entry threshold is relatively low, which is easy to learn Linux.

LAMP is the abbreviation of Linux Apache MySQL PHP,

Linux is an open system, Apache is the most common network server, MySQL is an open source relational database with network management add-on tools, "P" can represent PHP, Perl or Python language, respectively, in different occasions, almost the strongest Web server combination. However, for all of these programs is the program developer, not a popular desktop user.

Using the Fedora 5 Setting the LAMP server is very simple, below is some precautions:

1. When installing Fedora 5, select a custom installation, select all components related to Apache, MySQL, and PHP;

2.Apache's main profile is /etc/httpd/conf/httpd.conf;

The default User and Group are apache;

The default web directory is / var / www / html; this path is set in httpd.conf;

Start Apache Server / USR / SBIN / APACHECTL START;

To boot the Apache, you need to put the / usr / sbin / apachectl start within /etc/rc.d/rc.local;

3.Fedora's mysql database catalog is / var / lib / mysql, not the previous / usr / local / mysql;

When using MySQL's various command functions, you need to use a mysql.sock file, but mysql defaults this file under / TMP, so you need to use a simple action to deceive mysql: #LN -S / var / lib /MYSQL/Mysql.sock / TMP /

Start mysql: /etc/rc.d/init.d/mysqld start

To boot the mysql, you need to add the following line to the last line of the /etc/rc.d/rc.local file:

CD / usr; / usr / bin / mysqld_safe &

Establish an administrator password: / usr / bin / mysqladmin -u root password 'Your.password'

Log in to mysql: / usr / bin / mysql -u root -p as an administrator

4. PHP configuration file in /etc/php.d/

Need to configure the httpd.conf file of Apache, join the following two lines:

LoadModule PHP5_MODULE MODULES / LIBPHP5.SO

AddType Application / X-httpd-php .php

Restart Apache:

/ usr / sbin / apachectl stop

/ usr / sbin / apachectl start

Test whether PHP works normally: enter / var / www / html /, new file Test.php, join the code:

PHPINFO ();

?>

Open any browser, enter the address http://localhost/test.php, if you see the PHP information, the PHP configuration is successful, otherwise it is not successful.

After the 4 steps, the LAMP server is configured to access the web page by accessing http: //192.168.*..

转载请注明原文地址:https://www.9cbs.com/read-132617.html

New Post(0)