centos6.5下yum安装lnmp环境

安装常用软件

yum install nc wget curl gcc openssl-devel pcre-devel zlib-devel net-snmp* lrzsz dos2unix expect ntp mysql vim-common vim-enhanced vixie-cron unzip zip sysstat make rsync bind-utils bc libaio telnet -y

安装remi源

yum install -y epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum repolist

安装nginx

安装nginx yum源

rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

安装nginx

yum install nginx -y

安装php

安装php5.6

yum --enablerepo=remi,remi-php56 install php php-opcache php-mbstring php-mcrypt php-mysqlnd php-fpm php-xml php-gd php-xmlrpc php-pecl-redis php-pecl-apcu php-bcmath php-pecl-igbinary php-pecl-memcache php-zip -y

安装php7.1

yum --enablerepo=remi,remi-php71 install php php-opcache php-mbstring php-mcrypt php-mysqlnd php-fpm php-xml php-gd php-xmlrpc php-pecl-redis php-pecl-apcu php-bcmath php-pecl-igbinary php-pecl-memcache php-zip -y

安装mysql

安装mysql5.6官方yum源

rpm -ivh http://repo.mysql.com/mysql-community-release-el6.rpm

安装mysql5.7官方yum源

rpm -Uvh http://repo.mysql.com/mysql57-community-release-el6.rpm

安装mysql

yum install -y mysql-community-client mysql-community-server mysql-community-devel mysql-community-test

用官方yum源在线安装mysql下载很慢,推荐下载离线rpm包进行安装

发表评论

电子邮件地址不会被公开。 必填项已用*标注