Lamp (RPM) Installation:
One: Edit local yum for installing packages:
[Root@localhost ~]# cd/mnt/cdrom/
[Root@localhost ~]# mount/dev/cdrom/mnt/cdrom/
[Root@localhost ~]# cd/mnt/cdrom/server/
[Root@localhost server]# Vim/etc/yum.repos.d/rhel-debuginfo.repo #编辑本地yum
Two: Install HTTP server:
[Root@localhost server]# yum Install httpd-y #使用yum安装http服务,-y means canceling the interaction
[root@localhost server]# service httpd start #启动http
[Root@localhost server]# chkconfig httpd on #开机自动启动http
Third: Install MySQL database:
[Root@localhost server]# yum list all |grep MySQL #查看与mysql相关的安装包
[Root@localhost server]# yum install mysql-y #安装mysql工具包
[Root@localhost server]# yum install mysql-server-y #安装mysql-server Server
[root@localhost server]# service mysqld start #启动mysql服务
[Root@localhost server]# chkconfig mysqld on #开机自动启动mysql
[Root@localhost server]# NETSTAT-TUPLN |less #分页查看端口
[root@localhost server]# mysqladmin-u root-p password ' 123 ' #为数据库创建口令
[Root@localhost server]# mysql-u root-p #使用口令登录数据库