1. Configure the network environment
Slightly
2. Set the root password
sudo passwd initial set root password
Su switches to the root user
3. Common software
1. SSH
sudo apt-get install Openssh-server
2. Vim
3. Tree
4. Git
sudo apt-get installxxx
4. Build Lamp
1. Installing Apache
sudo apt-get install git
Test: The browser accesses the Http://Ubuntu IP and the IT works! page appears.
View Status: Service Apache2 Status/start/stop/restart
Web directory:/var/www
Installation directory:/etc/apache2/
Global configuration:/etc/apache2/apache2.conf
Listening Port:/etc/apache2/ports.conf
Virtual Host:/etc/apache2/sites-enabled/000-default.conf
2. Install MySQL
sudo apt-get install mysql-server mysql-client
Test: Mysql-u root-p
View status: Service MySQL Status/start/stop/retart
To view the listening port: NETSTAT-TUNPL or Netstat-tap
3. Install PHP
sudo apt-get install PHP
Test: Php7.0-v
4. Other modules
sudo apt-get install libapache2-mod-php7.0
sudo apt-get install Php7.0-mysql
Restart Service
Service Apache2 Restart
Service MySQL Restart
Test Apache can parse PHP
vim/var/www/html/phpinfo.php
Written in file: <?php echo phpinfo ();? >
Browser access: Http://ubuntu address/phpinfo.php, PHP version page appears
5. Modify Permissions
sudo chmod 777/var/www
6. Installing phpMyAdmin
sudo apt-get install phpMyAdmin
Install: Select Apache2, click OK. The next option is to configure the database and enter the password.
Create phpMyAdmin shortcut: sudo ln-s/usr/share/phpmyadmin/var/www/html
Enable Apache Mod_rewrite module: sudo a2enmod rewrite
Restart Service:
Service PHP7.0-FPM Restart
Service Apache2 Restart
Test: Browser access: Http://ubuntu address/phpmyadmin
7. Install the Python package
1. Pip
sudo apt-get install Python-pip
2. Django
Pip Install Django
3. Mysql-python
Pip Install Mysql-python
Ubuntu 16.04 Build Lamp development environment