一、腳本YUM源安裝:
1.yum install wget #安裝下載工具wget2.wget http://www.atomicorp.com/installers/atomic #下載atomic yum源,配置CentOS 6.5第三方yum源3. sh ./atomic #腳本執行4. yum check-update #更新yum軟件包
二、163yum源的安裝
1.進入yum源配置目錄
cd /etc/yum.repos.d
2.備份系統自帶的yum源
mv CentOS-Base.repo CentOS-Base.repo.bk
3.下載163網易的yum源:
centos7.x:wget http://mirrors.163.com/.help/CentOS7-Base-163.repocentos6.x:wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
4.更新玩yum源后,執行下邊命令更新yum配置,使操作立即生效
yum makecache
三、添加阿里yum更新源碼:
1.安裝wget:
yum install wget -y
2.備份你的原鏡像文件,以免出錯后可以恢復。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3.下載新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repoCentOS 6:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repoCentOS 7:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4.然后重建緩存:
yum clean allyum makecache
四、安裝并配置MySQL
1. 執行yum命令安裝MySQ
yum -y install mysql mysql-server
2 .把添加MySQL進開機啟動項,并立即啟動MySQL
chkconfig --levels 235 mysqld on #重啟自動啟動服務service mysqld start #重新啟動mysql服務
3.設置MySQL root帳號密碼
mysql_secure_installation
回車,根據提示輸入Y
輸入2次密碼,回車
根據提示一路輸入Y
最后出現:Thanks for using MySQL!
MySql密碼設置完成,重新啟動 MySQL
service mysqld start [root@localhost ~]# netstat -tulpn | grep -i mysqltcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1723/mysqld
五、安裝Apache
1. 使用yum命令安裝Apache
yum 主站蜘蛛池模板: 改则县| 哈尔滨市| 永川市| 九龙坡区| 两当县| 介休市| 神农架林区| 宁蒗| 方山县| 东乡族自治县| 陆良县| 乐亭县| 饶河县| 江陵县| 汉源县| 师宗县| 利川市| 吉林市| 邮箱| 镇远县| 庆云县| 延庆县| 桦甸市| 驻马店市| 嵊泗县| 马山县| 元江| 大宁县| 肥城市| 开江县| 金昌市| 株洲县| 阜阳市| 泗洪县| 长海县| 山丹县| 萝北县| 云霄县| 鱼台县| 稻城县| 冕宁县|