需要組件: Apache PHP Mysql phpMyAdmin Apache 0. yum install httpd 1. 確認版本號 $ httpd -v 2. 啓動apache $ sudo service httpd start (http://xxx.xxx.xxx.xxx shows apache info) 3.設定本身主動啓動(optional) $ sudo chkconfig httpd on $ sudo chkconfig --list httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off PHP 0. yum install php php-devel php-mbstring php-mysql php-gd 1. 確認版本號 $ php -v 2. 設置php.ini $ sudo cd /etc $ sudo cp php.ini php.ini.old $ sudo vim php.ini (optional) post_max_size = 8M upload_max_filesize = 2M ↓ post_max_size = 128M upload_max_filesize = 128M Mysql 0. yum -y install mysql-server 1. 確認版本號 $ mysql --version 2. Mysql 啓動 $ sudo service mysqld start 或者 $ sudo /etc/rc.d/init.d/mysqld start 3. 設置password $ sudo mysql_secure_installation 4. 設置本身主動啓動 $ sudo chkconfig mysqld on phpMyAdmin 0. 安裝 $ sudo yum install phpmyadmin 1. 配置phpMyAdmin.conf $ cd /etc/httpd/conf.d $ sudo cp phpMyAdmin.conf phpMyAdmin.conf.old $ sudo vim phpMyAdmin.conf Allow from 127.0.0.1 (near line 25) Allow from ::1 ↓ #Allow from 127.0.0.1 #Allow from ::1 Allow from All $ sudo service httpd restart http://xxx.xxx.xxx.xxx/phpmyadmin