Update ubuntu source
/etc/apt/sources.list
Cp /etc/apt/sources.list /etc/apt/sources.list.bak backup
Modify vim /etc/apt/sources.list
Will be one of the latest data modification of the source image address
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
After performing apt-get update
Unbuntu install LAMP service
Step1: install apache
Apt install apache2 -y
The default configuration file: /etc/apache2/site-enabled/000-defult.conf
The default installation source location: /var/www.html
The installation is complete, enter the address of the virtual machine from the host browser to see
Step2 : Installation mysql
apt install mysql-server -y
Mysql -uroot -proot Login mtsql database
Showdatebases View all databases
Use navicat connect to the database
Modify the configuration file gedit /etc/mysql/mysql.conf.d/mysqld.cnf
Bind-address = 127.0.0.1 commented
. mysql> grant all on * * to root @ '%' identified by ' your password ' with grant option;
mysql>flush privileges;
Restart the database
Step3:
Install PHP
apt install php -y
I have a problem here, suggesting that
I chose this solution is forced to unlock,
Performing rm / var / cache / apt / archives / lock
Rm /var/lib/dpkg/lock
After running again apt install php -y
(Or apt install php7.0 php-pear libapache2- mod-php7.0 php7.0-mysql installed php and extensions
Apt install php7.0-curl php7.0-json php7.0-cgi installed php assembly
)
Change php Code
Open Open /etc/apache2/mods-enabled/dir.conf
In which the main directory to index.php
Restart apache server
Systemctl restart apache2
Create info file
Into the / var / www / html, create info.php , which enter call
<?php
phpinfo();
?>
Delete index.html
Open the Web page, enter the virtual machine ip , enter php
Install phpmyadmin , based on the web in the form of management mysql database platform
Apt install phpmyadmin
Set during installation prompted
After the / usr / share / phpmyadmin in / var / www / html , the connection thereof into the soft
ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
After you open your browser and enter the address localhost / phpmyadmin / , you can see (localhos virtual machine address)
Windows Server2008R2 installation
Service 1: IIS Internet Information Service , Internet Information Services
Server 2003 Windows , XP used iis6
Server2008 Windows , Win7 used iis7.0
Step1: