CentOS system LNMP production environment configuration process
CentOS minimal installation, and then create a new repo first # vi /etc/yum.repos.d/centos.21andy.com.repo Put the following content [21Andy.com] name=21Andy.com Packages for Enterprise Linux 5 – $basearch baseurl=http://www.21andy.com/centos/5/$basearch/ enabled=1 gpgcheck=0 protect=1 Enable EPEL repo CentOS i386 enter the following command rpm -ihv http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm CentOS x86_64 Enter the following command rpm -ihv http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm Then import key rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL OK, one-click installation yum -y install nginx mysql-server php-fpm php-cli php-pdo php-mysql php-mcrypt php-mbstring php-gd php-tidy php-xml php-xmlrpc php-pear php-pecl-memcache php-eaccelerator Finally, run yum -y update, all are the latest If you want to use the latest stable version of nginx 0.7.65, put yum -y install nginx Change to yum -y install nginx-stable That’s it After installing, you can already play like this service mysqld start service php-fpm start service nginx start Don’t forget to set it to start at boot chkconfig –level 345 mysqld on chkconfig –level 345 php-fpm on chkconfig –level 345 nginx on The configuration files are all found under /etc See how the installation is automatic Dependencies Resolved ==================================================== ======== Package Arch Version Repository Size ==================================================== ======== Installing: mysql x86_64 5.0.89-1.el5 21Andy.com 3.5 M mysql-server x86_64 5.0.89-1.el5 21Andy.com 10 M nginx x86_64 0.8.33-3.el5 21Andy.com 422 k php-cli x86_64 5.3.1-2.el5…