centos下yum安裝lamp和lnmp輕鬆搞定,centoslnmp

來源:互聯網
上載者:User

centos下yum安裝lamp和lnmp輕鬆搞定,centoslnmp

centos下yum安裝lamp和lnmp輕鬆搞定,到底多輕鬆你看就知道了,媽媽再也不擔心不會裝lamp了。

很辛苦整理的安裝方法,會持續更新下去。凡無法安裝的在評論裡貼出問題來,會儘快解決。共同維護一個可用yum可用更新.

軟體列表:php5.4 apache2.2 mysql5.5 nginx1.8 centos6.x

rpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpmrpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpmyum --enablerepo=remi install -y mysql-server mysql php php-devel php-xml php-fpm php-mysql php-mbstring php-mcrypt php-gd httpd nginx wget svn vim yum expect

說明:這裡會更新會比較慢大約54個包,原因是remi國內沒有源,從國外更新。remi什麼時候國內會有源呢?


如果遇到錯誤:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

vi /etc/yum.repos.d/epel.repo


修改點:
[epel]name=Extra Packages for Enterprise Linux 6 - $basearchbaseurl=http://download.fedoraproject.org/pub/epel/6/$basearch#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearchfailovermethod=priorityenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6.........

注意修改nginx與apache的連接埠,防止衝突。
service nginx restartservice httpd restartservice php-fpm restartservice mysqld restart


總結:
1. epel與remi是什麼有什麼作用?
   epel與remi都是rpm包的不同Repository是對Base的不同擴充。為什麼不直接使用Base呢?其實是可以的但是這樣安裝後php是5.3的我們無法使用php5.4的特性了。remi裡麵包含了最新的php的拓展與依賴。但是remi必須依賴於epel這個Repository所以兩個必須都安裝。
2. yum --enablerepo=remi有何作用?
   預設remi.rpm安裝完後是沒有開啟的。所以要使用必須使用yum --enablerepo=remi使其生效。其實可以完全直接可以修改

vi /etc/yum.repos.d/remi.repo

修改點:
[remi]name=Les RPM de remi pour Enterprise Linux 6 - $basearch#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirrorenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi.......


本頁會不定期更新,方便大家安裝系統。  記得關注。。。



著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.