rpm安装php-fpm,linux rpm安装php-fpm、mysql、nginx及装配ftp

1.如果没有ftp软件,直接安装运行下面程序:

yum -y install vsftpd

chkconfig vsftpd on

安装出现下面错误:

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was

14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"

Error: Cannot find a valid baseurl for repo: base

是因为缺少DNS,解决如下:到/etc目录下配置resolv.conf加入nameserver IP:

[root@localhost ~]# vi /etc/resolv.conf

#下面地址是福建电信DNS

nameserver 218.85.157.99

2.命令

启动vsftpd: service vsftpd start

停止vsftpd: service vsftpd stop

重启vsftpd: service vsftpd restart

1.安装nginx+ php+ mysql

wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm //下载rpm文件

rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm //解压

rpm -qa | grep nginx 检查nginx 是否加入源路径

安装 php mysql nginx

yum install mysql mysql-server php php-mysql php-fpm nginx

php组件库 选择安装 如果找不到源地址,请查找小技巧里面的更新第三方源库

yum install php-cli php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy php-common php-devel

如需单独安装,请参考下面

1.1.单独安装php-fpm服务

yum install -y php php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt libmcrypt-devel php-fpm

#启动php-fpm

/etc/rc.d/init.d/php-fpm start

设置自动启动

chkconfig php-fpm on

1.2.单独安装mysql

安装MYSQL

yum -y install mysql mysql-server

启动mysql

service mysqld start

chkconfig mysqld on #设为开机启动

为root账户设置密码

mysql_secure_installation

重启所有服务

service mysqld restart

service nginx restart

/etc/rc.d/init.d/php-fpm restart

测试成功

2.安装svn客户端

yum install subversion

获取代码:

svn checkout 路径

svn update //到获取目录下,更新代码

3.添加服务自启动

nginx 服务

chkconfig --add nginx

chkconfig nginx on

service nginx start

php-fpm

chkconfig --add php-fpm

chkconfig php-fpm on

service php-fpm start

mysql

chkconfig --add mysqld

chkconfig mysqld on

service mysqld start

4.卸载软件

yum remove httpd

yum remove mysql

yum remove php

5.防火墙配置

修改文件/etc/sysconfig/iptables

[root@bogon ~]# cd /etc/sysconfig/

[root@bogon sysconfig]# vi iptables

你可能感兴趣的:(rpm安装php-fpm)