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

How to install LAMP on Linux system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the Linux system how to install LAMP, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

LAMP is a common Web server environment solution, an open source development platform for creating and managing Web applications. The following will share with you the detailed steps of installing LAMP on the Linuxi system, which can be referred to by those who are in need.

Introduction to LAMP: LAMP is short for Linux, Apache, MySQL, PHP, a regular Web server environment solution, referenced by its acronym "LAMP". It is an open source development platform for creating and managing Web applications. Linux is used as the back-end operating system (OS). Apache is the Web server, MySQL is the database, and PHP is the scripting language.

Install Apache1. Install Apache

Yum-y install httpd2. Apache configuration httpd.conf

Find the Apache configuration file httpd.conf by command find /-name httpd.conf (default is / etc/httpd/conf/httpd.conf)

Edit the httpd.conf file

Vi / etc/httpd/conf/httpd.conf modifies DocumentRoot "/ xx/xx/xxx" and changes "/ xx/xx/xxx" to the directory where the project is located, such as DocumentRoot "/ var/www/html", which will also be changed to.

Check to see if the installation is successful (start Apache and check Apache status)

Service httpd start service httpd status shows that OK is installed successfully.

Configure the Apache boot entry

Chkconfig-- add httpd (add httpd services to the list of services) chkconfig httpd on installs Mysql1. Install Mysql

Yum-y install mysql mysql-devel mysql-server mysql-libs2. View Mysql version

Rpm-qi mysql-server3. Database character set Settings

Add default-character-set=utf8 to Mysql configuration file / etc/my.cnf

4. Start Mysql

Service mysqld start5. Create a root administrator

Mysqladmin-u root password password 6. Configure Mysql Boot Startup Service

Chkconfig-- add mysqld (add mysql service to the service list) chkconfig mysqld on (set mysql service to start with boot) 7. Log in to Mysql

Mysql-u root-p enter the password to install PHP1. Install PHP

Yum-y install php2. Install the PHP extension

Yum-y install php-mysql php-gd php-imap php-ldap php-odbc php-mbstring php-devel php-soap php-cli php-pdo yum-y install php-mcrypt php-tidy php-xml php-xmlrpc php-pear yum-y install php-pecl-memcache php-eaccelerator3. Restart Apache

Service httpd restart4. test

Create an index.php file under / var/www/html/ and write to phpinfo ()

The browser accesses the index.php file. If you output phpinfo information, the installation is successful.

Thank you for reading this article carefully. I hope the article "how to install LAMP in Linux system" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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

Development

Wechat

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

12
Report