Ubuntu system installation, network configuration, lamp environment construction

Source: Internet
Author: User
Tags phpmyadmin

Ubuntu installation Lamp Environment

First, install Ubuntu

Install Ubuntu default installation,

Disk partition allocation: using LVM in a new Ubuntu installation

Second, static configuration network card

sudo vim/etc/network/interfaces

File contents:

1 Auto Lo2 iface Lo inet loopback3 Auto Eth0 # #这个应该是决定是否启用这个端口4 iface eth0 inet static # #静态设置IP5Hwaddress ether the: Wu: xx:Wuyi: Xx:xx # #加入MAC地址, remember to put it before the IP address6Address202.198.151.17 7Netmask255.255.255.0 8#broadcast202.198.151.255 9Gateway202.198.151.254Ten # #通过dhcp动态设置 OneIface eth1 inet DHCP

  

Reset the network to enable the new settings

sudo/etc/init.d/networking restart

Third, remote connection Xshell, SECURESRC connect ubuntu terminal

Sudo Apt-get Install Openssh-server

Static IP:

Dynamic IP:

Four, using Apt-get method to quickly install lamp environment (Tasksel install Lamp-server one-click installation)

①, installing Apache

Sudo Apt-get Install Apache2

To detect if the installation was successful:

Apache2-v

②, installing PHP

Sudo Apt-get Install PHP5

See if MySQL extensions are installed, mysql.so

Cat/etc/php5/conf.d/mysql.ini

Installing the mysql.so Extension

Sudo Apt-get Install Php5-mysql

Restart MySQL Service

Sudo Service MySQL Restart

To restart Apache:

sudo apache2 restart

To install some common modules for PHP:

Sudo apt-get Install Curl libcurl3 php5-gd Libcurl3-dev Php-curl

③, installing MySQL

Sudo Apt-get Install Mysql-server

④, Installation phpMyAdmin

1 Install phpMyAdmin 3 Ln -s/usr/share/phpmyadmin  /var/www/phpmyadmin

Download phpMyAdmin compression package decompression;

Five, Apt-get mode installation of lamp configuration file/etc

Apache2/etc/apache2

mods-*** Apache can use the module

sites-** Virtual Host

Avaliable can be used by

Enabled , each time it is loaded

Php/etc/php5

Master configuration file: php.ini

Mysql/etc/mysql

Master configuration file: my.cnf

MySQL Data migration: stored by default in the/var/lib directory

VI. Build a virtual Host

Configuring a virtual Host in Apache

cd/etc/apache2/sites-available/

Available virtual Host configuration files

1. Copy the new virtual host file

1    sudo CP default Root 2 3    sudo CP Default Test 4 5    sudo CP Default goophp

2. Modify the virtual host configuration file

1 Sudo Vim Root 3 Sudo VIM Test
5 Sudo vim goophp

Note: To add a new field

ServerName web.root.com

Modify the DocumentRoot path and directory

3. Create the virtual host file in the sites-enabled folder corresponding soft connection

Cd sites-Ln -S. /sites-avaliable/root Root

4 . Restart apache2, run the test

Ubuntu system installation, network configuration, lamp environment construction

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.