即使用 Linux 作為操作系統, Apache 作為 Web 服務器, MySQL 作為數據庫和使用 PHP 作為腳本語言。 ( Perl 或 Python 經常被用來取代 PHP )
事實上,各自安裝這些軟體是很麻煩的,還好有現成的安裝套件可以幫助我們快速的完成架設 LAMP server 。
Steps:
- There are two ways could install LAMP server
- Use the apt-get
- Execute following command sudo apt-get install lamp-server^
- Create password for the MySQL "root" user root
- Use tasksel
- Install tasksel sudo apt-get install tasksel
- Use tasksel to install LAMP stack sudo tasksel install lamp-server
- Create password for the MySQL "root" user root
- Checking Apache2 installation http://localhost
- Checking PHP5 installation
- Create a quick php info page (/var/www/index.php) echo -e "<?php phpinfo(); ?>" | sudo tee /var/www/index.php
- Checking http://localhost/index.php
- Checking MySQL installation
- Executd following command mysqladmin -u root -p status
- Enter the password. If everything is working correctly, will show massage like below: Uptime: 2117 Threads: 1 Questions: 575 Slow queries: 0 Opens: 421 Flush tables: 1 Open tables: 41 Queries per second avg: 0.271
- Install phpMyAdmin
- Install by apt-get sudo apt-get install phpmyadmin
- Choose the web server apache2
- Configure database for phpmyadmin with dbconfig-common? Yes
- Provide the password of MySQL administrator root
- Create and confirm MySQL application password for phpmyadmin root
- Configure apache2.conf to work with Phpmyadmin echo -e "\n# Include the phpMyAdmin configurations:\nInclude /etc/phpmyadmin/apache.conf" | sudo tee -a /etc/apache2/apache2.conf
- Restart Apache2 sudo service apache2 restart
- Enter phpMyAdmin http://localhost/phpmyadmin
User name: root
Password: root
沒有留言:
張貼留言