活到老学到老  

记录遇到问题的点点滴滴。

lnmp安装

8年前发布  · 1479 次阅读
  lnmp 

Webtatic EL6 for CentOS/RHEL 6.x

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

Webtatic EL5.1 for CentOS/RHEL 5.x:

rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm

If you already have MySql client or server installed (rpm -q mysql mysql-server), then you can upgrade using the following method:

yum install mysql.`uname -i` yum-plugin-replace
yum replace mysql --replace-with mysql55w

“yum install mysql” is only there to make sure yum-plugin-replace can resolve dependencies correctly if only mysql-server was installed.

Otherwise, to install MySql client and server, then run:

yum install -y mysql55w mysql55w-server

如果遇到mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package Percona-Server-server报错,有两种情况导致这个问题:

1)卸载操作系统预装的mysql-libs包

rpm -qa | grep -i libs | grep -i mysql
rpm -e mysql-libs  --nodeps

You should upgrade existing tables before setting the server to become a production machine, which can be done by starting the server and running the mysql_upgrade script (this may take time depending on the size of the database).

service mysqld start

This will issue a password prompt for the user. If you don’t have a root user password, remove the “-p” mysql_upgrade -u root -p MySQL 5.1

php:

yum -y install php56w-cli php56w-devel php56w-fpm php56w-gd php56w-mysql php56w-mbstring php56w-pdo php56w-tidy php56w-xml

php5.6安装 https://webtatic.com/packages/php56/

mysql5.5安装 https://webtatic.com/packages/mysql55/

nginx安装 https://www.nginx.com/resources/wiki/start/topics/tutorials/install/

设为开机启动:

chkconfig nginx on
 
chkconfig mysqld on
 
chkconfig php-fpm on