標籤:article mil 防火牆 系統啟動 cookies lin rc.d input eve
搭建好開發環境:Linux: CentOS 6.6(Final) x64
Apache:2.2.15
MySQL:5.1.52
PHP:5.3.2
步驟說明:1.MySQL
# yum install mysql mysql-server
# chkconfig --levels 235 mysqld on # MySQL 可以隨系統自己主動啟動
# /etc/init.d/mysqld start
# mysql_secure_installation # 設定 MySQL 資料 root 賬戶的password
# mysql -u root -p # 以root使用者啟動mysql資料庫
2.Apache
# yum install httpd
# chkconfig --levels 235 httpd on # Apache 隨系統啟動
# /etc/init.d/httpd start
# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT # centos的防火牆開放80連接埠
# /etc/rc.d/init.d/iptables save # 儲存
# /etc/init.d/iptables status # 確認檢查
3.PHP
# yum install php
# /etc/init.d/httpd restart
# yum search php # 搜尋模組
# yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc # 安裝相關模組
# /etc/init.d/httpd restart # 重新啟動 Apache
4.PHP-myAdmin
# cd /var/www/html
# wget http://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.10/phpMyAdmin-3.3.10-all-languages.tar.gz
# tar xvfz phpMyAdmin-3.3.10-all-languages.tar.gz # 解壓
# mv phpMyAdmin-3.3.10-all-languages phpmyadmin
# cd phpmyadmin
# cp config.sample.inc.php config.inc.php
# vim config.inc.php
:
$cfg[‘Servers‘][$i][‘auth_type‘] = ‘http‘; # default is cookies
:
# service httpd restart
5.配置監聽port
# cd /etc/httpd/conf
# vim httpd.conf
Listen 5000
CentOS 6.6編譯安裝LAMP(Apache2+PHP+Mysql+PHPmyAdmin)