二、配置yum軟體管理平台:
創建光碟掛載點 mkdir /mnt/cdrom
掛載光碟: mount /dev/cdrom /mnt/cdrom
配置本地yum倉庫 /etc/yum.repos.d/rhel-debuginfo.repo 1 [rhel-debuginfo] 2 name=Red Hat Enterprise Linux $releasever - $basearch - Debug 3 baseurl=file:///mnt/cdrom/Server 4 enabled=1 5 gpgcheck=1 6gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release yum list all 列出使yum關聯倉庫中的軟體; 三、Appache伺服器: yum install httpd service httpd start 驗證一下: 【linux的ip地址:10.106.104.253】
四、配置Mysql服務:
yum install mysql mysql-server
測試php連接mysql
vim /var/www/index.php
開啟 mysqld 服務! [root@localhost html]# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] [root@localhost html]# service mysqld start
關閉mysqld服務 [root@localhost html]# service mysqld stop Stopping MySQL: [ OK ]
五、配置php:
1 <?php 2 $link=mysql_connect('127.0.0.1','root',''); 3 if ($link) 4 echo "********pass!"; 5 else 6 echo "failed! you are fire!"; 7 ?>
[火星人 ] 非源碼LAMP的配置已經有385次圍觀