国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 幫助中心 > 正文

CentOS 5.5使用yum來安裝LAMP(php運行環境)

2024-07-09 22:40:23
字體:
來源:轉載
供稿:網友
今天用yum方法搭建起了個LAMP環境,中間遇到了很多問題,經過google和各位前輩的幫助,終于將環境搭建起來,現在把完整的步驟記錄下來, 1. 換源,sohu的相當好用。
1.1備份CentOS-Base.repo
cd /etc/yum.repos.d/
cp CentOS-Base.repo CentOS-Base.repo.bak
1.2替換源
用vi打開CentOS-Base.repo,并將內容清空,然后將下面的內容復制進去,并保存。
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.sohu.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.sohu.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://mirrors.sohu.com/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.sohu.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.sohu.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
1.3更新一下。
yum -y update
2. 用yum安裝Apache,Mysql,PHP.
2.1安裝Apache
yum install httpd httpd-devel
安裝完成后,用/etc/init.d/httpd start 啟動apache
設為開機啟動:chkconfig httpd on
2.2 安裝mysql
2.2.1 yum install mysql mysql-server mysql-devel
同樣,完成后,用/etc/init.d/mysqld start 啟動mysql
2.2.2 設置mysql密碼
mysql>; USE mysql;
mysql>; UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';
mysql>; FLUSH PRIVILEGES;
2.2.3 允許遠程登錄
mysql -u root -p
Enter Password: <your new password>
mysql>GRANT ALL PRIVILEGES ON *.* TO '用戶名'@'%' IDENTIFIED BY '密碼' WITH GRANT OPTION;
完成后就能用mysql-front遠程管理mysql了。
2.2.4 設為開機啟動
chkconfig mysqld on
3. 安裝php
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 华容县| 文昌市| 宁城县| 屯留县| 江阴市| 正安县| 封丘县| 澄迈县| 金塔县| 万山特区| 托克逊县| 定远县| 开封县| 德钦县| 姚安县| 江永县| 成武县| 化德县| 奎屯市| 南靖县| 新营市| 罗甸县| 阿鲁科尔沁旗| 佛山市| 乌拉特后旗| 满城县| 巴林左旗| 浙江省| 吉林省| 城市| 库车县| 通江县| 邹平县| 抚松县| 平泉县| 龙游县| 德州市| 涟水县| 静乐县| 武乡县| 武乡县|