centos 下php mysql nginx vsftpd 正确安装配置

 
  
vsftpd 安装
yum install vsftpd
useradd -d /var/www/html -g www -s /sbin/nologin www
chown -R www:www /var/www/html
chmod -R 775 /var/www/html
nginx安装
直接解压 ./configure --prefix=/usr/local/nginx
修改nginx.conf 配置 user www www
php 安装
yum -y install gcc automake autoconf libtool make	
yum -y install gcc gcc-c++
yum -y install openssl* pcre*
yum -y install gd-devel lib jpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y zlib* \
./configure --prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--with-bz2 \
--with-curl \
--enable-ftp \
--enable-sockets \
--disable-ipv6 \
--with-gd \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-freetype-dir=/usr/local\
--enable-gd-native-ttf\
--with-iconv-dir=/usr/local \
--enable-mbstring \
--enable-calendar \
--with-gettext \
--with-libxml-dir=/usr/local\
--with-zlib \
--with-openssl \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-mysql=mysqlnd \
--enable-dom \
--enable-xml \
--enable-fpm \
--with-libdir=lib64


cp php-fpm.conf.default php-fpm.conf
修改group wwww  user www
mysql二进制安装
wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.20-linux-glibc2.5-i686.tar.gz
tar zxvf mysql-5.6.20-linux-glibc2.5-i686.tar.gz
groupadd mysql
useradd -g mysql mysql
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
cp support-files/mysql.server /etc/init.d/mysqld
cp my.cnf /etc/my.cnf
vi /etc/my.cnf
mv mysql-5.6.20-linux-glibc2.5-i686 /usr/local/mysql
[mysqld]中添加:
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
port = 3306
server_id = 1
service mysqld start
全局边量配置
vi /etc/profile
export="$PATH:/usr/local/mysql/bin"


vsftpd 安装yum install vsftpduseradd -d /var/www/html -g www -s /sbin/nologin wwwchown -R www:www /var/www/htmlchmod -R 775 /var/www/htmlnginx安装直接解压 ./configure --prefix=/usr/local/nginx修改nginx.conf 配置 user www wwwphp 安装yum -y install gcc automake autoconf libtool makeyum -y install gcc gcc-c++yum -y install openssl* pcre*yum -y install gd-devel lib jpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y zlib* \./configure --prefix=/usr/local/php \--with-config-file-path=/usr/local/php/etc \--with-bz2 \--with-curl \--enable-ftp \--enable-sockets \--disable-ipv6 \--with-gd \--with-jpeg-dir=/usr/local \--with-png-dir=/usr/local \--with-freetype-dir=/usr/local\--enable-gd-native-ttf\--with-iconv-dir=/usr/local \--enable-mbstring \--enable-calendar \--with-gettext \--with-libxml-dir=/usr/local\--with-zlib \--with-openssl \--with-pdo-mysql=mysqlnd \--with-mysqli=mysqlnd \--with-mysql=mysqlnd \--enable-dom \--enable-xml \--enable-fpm \--with-libdir=lib64cp php-fpm.conf.default php-fpm.conf修改group wwww user wwwmysql二进制安装wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.20-linux-glibc2.5-i686.tar.gztar zxvf mysql-5.6.20-linux-glibc2.5-i686.tar.gzgroupadd mysqluseradd -g mysql mysqlscripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/datacp support-files/mysql.server /etc/init.d/mysqldcp my.cnf /etc/my.cnfvi /etc/my.cnfmv mysql-5.6.20-linux-glibc2.5-i686 /usr/local/mysql[mysqld]中添加:basedir = /usr/local/mysqldatadir = /usr/local/mysql/dataport = 3306server_id = 1service mysqld start全局边量配置vi /etc/profileexport="$PATH:/usr/local/mysql/bin"
 
  

 
  
 
 

你可能感兴趣的:(centos 下php mysql nginx vsftpd 正确安装配置)