linux下安裝php7+mysql5.7+nginx
一。安裝常用擴充套件庫
1 2 3 |
sudo
yum -y install
gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel
bzip2
bzip2 -devel
ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers libevent libevent-devel libcurl libcurl-devel net-tools sudo
yum -y install
libmcrypt libmcrypt-devel
|
如果通過Yum安裝不了libmcrypt的話,直接原始碼編譯
新增www使用者,php-fpm和nginx統一使用此使用者
1 2 |
sudo
groupadd www
sudo
useradd
-g www www
|
===========================
一. 安裝資料庫 MySQL5.7.10
1 2 3 |
cd
~ /soft/
groupadd
mysql
useradd
-r -g mysql mysql
|
1 2 3 4 5 6 7 8 9 10 11 12 |
wget
http: //cdn .mysql.com //Downloads/MySQL-5 .7 /mysql-5 .7.10-linux-glibc2.5-x86_64. tar .gz
tar
zxvf mysql-5.7.10-linux-glibc2.5-x86_64. tar .gz
mv
mysql-5.7.10-linux-glibc2.5-x86_64 /usr/local/mysql
cd
/usr/local/mysql
chown
-R mysql .
chgrp
-R mysql .
bin /mysqld
|