Home Backend Development PHP Tutorial Steps to build LAMP environment with ubutun

Steps to build LAMP environment with ubutun

Aug 08, 2016 am 09:28 AM
apache install mysql php sudo

1: Install ubuntun
2: Enable SSH service sudo apt-get install openssh-server
3: Use ifconfig to view the host’s IP address and use Xshell to connect
4: Install LAMP
Install Apache2 sudo apt-get install apache2
Install Mysql sudo apt-get install mysql-server
Install php sudo apt-get install php5

use mysql as an extension module of Apache2
sudo apt-get install php5-mysql
5: Restart
Restart Apache service apache2 reatart
Restart mysql service mysql restart
6: Install common extensions for php
gd library and curl
sudo apt-get install php5-gd php5-curl curl libcurl3 libcurl3-dev
Restart apache
7: Use filezilla to transfer files and log in as root
If you cannot log in, open /ect/ssh/sshd_config for editing and restart the ssh service
8; Detailed explanation of configuration files
Apache available modules /etc/apache2/mods-available
Apache enabled modules /etc/apache2/mods-enabled
php configuration file /etc/php5/apache2/php.ini
mysql configuration file /etc/mysql/my.cnf
Principle: Establish a soft connection between available modules and enabled modules
9:Multi-site configuration
Copy 000-default.conf under the available modules
Establish a soft connection to the enabled module
After establishing the connection, just add ServerName and change document root
Restart Apache
10: Install phpmyadmin
apt-get install phpmyadmin is installed under /usr/share by default
Create a soft connection ln -s /usr/share/phpmyadmin /var/www
ok

Appendix: Ubuntun has a root user by default, but there is no password, and Ubuntun cannot log in without a password by default, so we need to be root first
Set the password sudo passwd root. After the setting is completed, you can log in using the root account

The above introduces the steps to build a LAMP environment with ubutun, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

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)

MySQL vs. Other Programming Languages: A Comparison MySQL vs. Other Programming Languages: A Comparison Apr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

The Continued Use of PHP: Reasons for Its Endurance The Continued Use of PHP: Reasons for Its Endurance Apr 19, 2025 am 12:23 AM

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

MySQL and phpMyAdmin: Core Features and Functions MySQL and phpMyAdmin: Core Features and Functions Apr 22, 2025 am 12:12 AM

MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

How to safely store JavaScript objects containing functions and regular expressions to a database and restore? How to safely store JavaScript objects containing functions and regular expressions to a database and restore? Apr 19, 2025 pm 11:09 PM

Safely handle functions and regular expressions in JSON In front-end development, JavaScript is often required...

Why does the Python script not be found when submitting a PyFlink job on YARN? Why does the Python script not be found when submitting a PyFlink job on YARN? Apr 19, 2025 pm 02:06 PM

Analysis of the reason why Python script cannot be found when submitting a PyFlink job on YARN When you try to submit a PyFlink job through YARN, you may encounter...

How to process and display percentage numbers in Java? How to process and display percentage numbers in Java? Apr 19, 2025 pm 10:48 PM

Display and processing of percentage numbers in Java In Java programming, the need to process and display percentage numbers is very common, for example, when processing Excel tables...

The Compatibility of IIS and PHP: A Deep Dive The Compatibility of IIS and PHP: A Deep Dive Apr 22, 2025 am 12:01 AM

IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

Using Laravel: Streamlining Web Development with PHP Using Laravel: Streamlining Web Development with PHP Apr 19, 2025 am 12:18 AM

Laravel optimizes the web development process including: 1. Use the routing system to manage the URL structure; 2. Use the Blade template engine to simplify view development; 3. Handle time-consuming tasks through queues; 4. Use EloquentORM to simplify database operations; 5. Follow best practices to improve code quality and maintainability.

See all articles