nginx用第三方yum源atomic安装,与mysql数据库的安装步骤。atomic只用来安装nginx。

文章来自: http://blog.sina.com.cn/s/blog_8442befd01016195.html 注意:atomic只用来安装nginx。mysql与php都是用的系统源(可以尝试163源)。
 
1.关闭防火墙
[root@CentOS ~]# chkconfig iptables off

2.关闭selinux
vi /etc/sysconfig/selinux
//将SELINUX=enforcing修改为disabled然后重启生效
3.安装开发包和库文件
[root@CentOS ~]# yum -y install ntp make openssl openssl-devel pcre pcre-devel libpng libpng-devel libjpeg-6b libjpeg-devel-6b freetype freetype-devel gd gd-devel zlib zlib-devel gcc gcc-c++ libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake screen sysstat compat-libstdc++-33 curl curl-devel

4.卸载已安装的apache、mysql、php
[root@CentOS ~]# yum remove httpd
[root@CentOS ~]# yum remove mysql
[root@CentOS ~]# yum remove php

5.安装mysql
[root@CentOS ~]# yum install mysql mysql-server mysql-devel
[root@CentOS ~]# service mysqld start
[root@CentOS ~]# chkconfig --levels 235 mysqld on

//为root用户设置密码
[root@CentOS ~]# mysqladmin -u root password "123456"

//重启mysql
[root@CentOS ~]# service mysqld restart
 
 
6、配置CentOS 6.0 第三方yum源(CentOS默认的标准源里没有nginx软件包,操作此步骤请将系统yum源/etc/yum.repo.d下面的源重命名。)
//下载wget工具
[root@CentOS ~]# yum install wget

//下载atomic yum源
[root@CentOS ~]# wget http://www.atomicorp.com/installers/atomic
[root@CentOS ~]# sh ./atomic
//安装提示输入时输yes会发现/etc/yum.repo.d下面多了一个源atomic.repo

#更新yum软件包
[root@CentOS ~]# yum check-update
检查当前yum源:yum repolist
 
7、安装nginx
[root@CentOS ~]# yum install nginx
[root@CentOS ~]# service nginx start

//设2、3、5级别开机启动
[root@CentOS ~]# chkconfig --levels 235 nginx on

        注意:安装mysql与nginx时候有时会遇到key问题:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 signature: NOKEY, key ID 4520afa9   Public key for nginx-1.6.2-23.el5.art.i386.rpm is not installed
 
解决方式:yum install nginx --nogpgchec

你可能感兴趣的:(nginx用第三方yum源atomic安装,与mysql数据库的安装步骤。atomic只用来安装nginx。)