yum源安装方式在RHEL5.5上部署LAMP


我们就使用光盘自带的rpm包安装,这样可以节约大量找安装包的时间,而且使用yum安装会自动解决包安装时依赖性的问题,非常简单,整个部署10多分钟就可以搞定。
 
一.服务器网络配置
IP地址:192.168.1.100
掩码:255.255.255.0
网关:192.168.1.1
主机名:testdb.nyl.com
 
修改hosts文件,添加一行
 
vi /etc/hosts
192.168.1.100   testdb.nyl.com
 
二.配置yum源 
 
cd /etc/yum.repos.d/
vi mycdrom.repo #新建一个repo文件
[Base]
name=RHEL5 ISO Base
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
 
OK!把光盘放进去,然后挂载到服务器
 
mount /dev/cdrom /mnt
 
-----------------------------------------------------------------------
 
准备工作做好了,可以开始安装了
 
一、安装Apache
 
首先我们安装apache,这个包最少,安装最容易
 
yum install httpd* --nogpgcheck  #加个nogpgcheck参数是强制跳过gpg检查
 
rpm -aq|grep http
httpd-devel-2.2.3-43.el5
httpd-manual-2.2.3-43.el5
httpd-2.2.3-43.el5
 
启动apache服务
service httpd start
 
查看服务状态
service httpd status
 
当然也可以添加apache服务随机启动
 
chkconfig --add httpd
 
二、安装Mysql
 
yum install mysql* --nogpgcheck
 
rpm -aq|grep mysql
mysql-server-5.0.77-4.el5_4.2
apr-util-mysql-1.2.7-11.el5
mysql-bench-5.0.77-4.el5_4.2
mysql-test-5.0.77-4.el5_4.2
php-mysql-5.1.6-27.el5
mysql-connector-odbc-3.51.26r1127-1.el5
mysql-5.0.77-4.el5_4.2
mod_auth_mysql-3.0.0-3.2.el5_3
mysql-devel-5.0.77-4.el5_4.2
 
如果发现缺了几个包可以进到/mnt/Server目录下打上
 
启动mysql服务
service mysqld start
 
查看mysql服务
service mysqld status
 
当然也可以添加mysql服务随机启动
chkconfig --add mysqld
 
mysqladmin -u root -p password 123456 #修改mysql的口令为"123456"
 
mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.0.77 Source distribution
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql>
  • 1
  • 2
  • 3
  • 下一页

相关内容