Use Raspberry Pi to build your own web server (I) install LAMP and raspberry lamp

Source: Internet
Author: User

Use Raspberry Pi to build your own web server (I) install LAMP and raspberry lamp
1. Adjust pi GPU memoryOccupiedSize

As a web server, you do not need to output video signals. Therefore, reduce GPU memory usage to maximize pi performance.

1 sudo raspi-config

Select Advanced Options-> Memory Split, enter 16, and restart after saving.

 

2. Update your pi
1 sudo apt-get update2 sudo apt-get upgrade

Restart the instance after the update is completed.

 

3. Install server software

Install the most commonly used LAMP, namely Linux, Apache, MySql, and PHP.

3.1 install Apache and PHP

1 sudo apt-get install apache2 php5 libapache2-mod-php5

3.2 install MySql (set the Database Password during installation)

1 sudo apt-get install mysql-server mysql-client php5-mysql

3.3 After installation, restart apache.

1 sudo service apache2 restart

 

4. Test

After all the required software is installed, the server is basically set up. In this case, open your browser and enter 127.0.0.1 to see a page like this:

 

The root directory of the website is/var/www/html by default.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.