install MySQL1. Sudo apt-get install mysql-server or apt-get isntall mysql-client 2. The installation process will prompt to set the password, note that the settings do not forget. 3. Detect if installation succeeded after installation: sudo netstat-tap | grep mysql4. Log in to MySQL database: mysql-u root-p 5. View the current database: show databases; PS: Don't forget;
Installing Apache 1.sudo apt-get Install apache2 Enter Y installation Complete2. Configure Apache: Change the Web site root directory:sudo vi/etc/apache2/apache2.conf return to find the location of "<Directory/var/www/>" Change "/var/www/" to the new root directorysudo vi/etc/apache2/sites-available/000-default.conf Enter to find the location of "documentroot/var/www/" Change "/var/www/" to the new root directory. 3. Configure the domain name jump:<VirtualHost> inside Add: documentroot Web site root directoryServerName website domain nameNote: serveradmin is your address if there is any problem with the server, it will be sent to this address, which will appear on some pages generated by the server, such as error reporting. <VirtualHost> can put multiple to implement multi-domain jump4. Restart Apache server: sudo/etc/init.d/apache2 Restart
Install PHP1.sudo apt-get Update 2.sudo apt-get install PHP5 enter Y installation complete 3. Let Apache support Php:sudo apt-get install LIBAPACHE2-MOD-PHP5 Installation Complete
Extending the PHP module1.PHP-GD Library:(1) Extension PHP5-GD module: sudo apt-get install PHP5-GD installation Complete(2) Restart Apache server: sudo/etc/init.d/apache2 Restart2.php-curl:
(1) Download package: wget http://curl.haxx.se/download/curl-7.17.1.tar.gz
(2) Decompression: TAR-ZXF curl-7.17.1.tar.gz
(3)./configure–prefix=/usr/local/curl
(4) Installation: Make & make Install
(5) Restart Apache server: sudo/etc/init.d/apache2 restart
3.php-mysqli
(1) Entry directory:/usr/local/php/bin/phpize (path or php-5.2.14/ext/mysqli/phpize)
(2) Run command:./configure--prefix=/usr/local/mysqli--with-php-config=/usr/local/php/bin/php-config--with-mysqli=/usr /local/mysql/bin/mysql_config
(3): Install: Make do test make install
Extending the above modules requires modifying the php.ini file
(1) The above extension modules are. So files, they are in the/usr/lib/php5/20121212/directory under the php.ini file in the/ETC/PHP5/APACH2 directory we need to manually modify PHP.ini
(2) Modify Phpini: Find Extension_dir after adding the following modules
1.php-gd:extension_dir = "/usr/lib/php5/20121212/" extension=gd.so;
2.php-curl:extension_dir = "/usr/lib/php5/20121212/" extension=curl.so;
3.php-mysqli:extension_dir = "/usr/lib/php5/20121212/" extension=mysqli.so;
(3) Restart Apache server: sudo/etc/init.d/apache2 restart
Install PHP Environment-mysql+apache+php-linux operating system on Ubuntu