安裝Cent OS
從http://www./modules/tinycontent/index.php?id=15下載最新版本的CentOS
更新成163源
打開Terminate 輸入sudo root并輸入密碼 輸入su讓當(dāng)前用戶以root權(quán)限進(jìn)入 輸入cd /etc/yum.repos.d 輸入mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 來備份/etc/yum.repos.d/CentOS-Base.repo 輸入wget http://mirrors.163.com/.help/CentOS6-Base-163.repo下載163源 輸入mv /etc/yum.repos.d/CentOS6-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo 輸入yum makecache完成更新
安裝并配置MySQL 1.1 執(zhí)行yum命令安裝MySQL
1.2 把添加MySQL進(jìn)開機(jī)啟動項,并立即啟動MySQL
1.3 設(shè)置MySQL root賬號密碼
二、 安裝Apache 2.1 使用yum命令安裝Apache
2.2 設(shè)置開機(jī)啟動Apache
2.3 啟動Apache
2.4 現(xiàn)在直接在瀏覽器鍵入http://localhost或http://本機(jī)IP,應(yīng)該會看到Apache的測試頁面
3.3 安裝相關(guān)模塊使用PHP支持MySQL:為了讓PHP支持MySQL,我們可以安裝php-mysql軟件包;也可使用以下命令搜索可用的php模塊
Using YUM :Step 1 ? Install/enable EPEL repository . You can find latest repository here ( http://download./pub/epel/6/i386/repoview/epel-release.html )
Step 2 ? Now update repositories
Step 3 ? After updating yum repositories , now you can install phpmyadmin package
This command will install phpmyadmin package along with dependencies . please type the package name exactly as phpMyAdmin ( ” M” and “A” –> Uppercase ) Step 4 ? Now restart httpd service
Now open the path in your browser ( Eg-> http://192.168.1.1/phpMyAdmin ) . You can see the below screen after entering Mysql root username and password . 4.9 至此,打開頁面http://localhost/phpmyadmin即可輕松管理你的mySQL數(shù)據(jù)庫
打開CentOS網(wǎng)絡(luò)端口保證其它機(jī)器可以訪問
#/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
查看打開的端口:
# /etc/init.d/iptables status
|
|