重裝MySQL,(二進制包)php
具體配置css
ps aux |grep mysql rm -rf /usr/local/mysql cd /usr/local/src wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz tar zxvf mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz mv mysql-5.6.35-linux-glibc2.5-x86_64 /usr/local/mysql cd /usr/local/mysql useradd mysql mkdir /data/ ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql cp support-files/my-default.cnf /etc/my.cnf cp support-files/mysql.server /etc/init.d/mysqld vi /etc/init.d/mysqld 定義basedir和datadir /etc/init.d/mysqld start 或 service mysql start
開機自啓設置html
[root@axiang-02 mysql]# chkconfig --add mysqld [root@axiang-02 mysql]# chkconfig mysqld on [root@axiang-02 mysql]# chkconfig --list 注意:該輸出結果只顯示 SysV 服務,並不包含原生 systemd 服務。SysV 配置數據可能被原生 systemd 配置覆蓋。 若是您想列出 systemd 服務,請執行 'systemctl list-unit-files'。 欲查看對特定 target 啓用的服務請執行 'systemctl list-dependencies [target]'。 mysqld 0:關 1:關 2:開 3:開 4:開 5:開 6:關 netconsole 0:關 1:關 2:關 3:關 4:關 5:關 6:關 network 0:關 1:關 2:開 3:開 4:開 5:開 6:關
重裝PHPmysql
make clean
若是沒有須要先下載linux
cd /usr/local/src/ wget http://cn2.php.net/distributions/php-5.6.30.tar.gz tar zxf php-5.6.30.tar.gz
若是是重裝須要先清空nginx
cd php-5.6.30 make clean useradd -s /sbin/nologin php-fpm yum install libcurl-devel ./configure --prefix=/usr/local/php-fpm --with-config-file-path=/usr/local/php-fpm/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --with-pear --with-curl --with-openssl make && make install
安裝成功可查看安裝目錄web
php與nginx結合sql
cp php.ini-production /usr/local/php-fpm/etc/php.ini cd /usr/local/php-fpm/etc/ vi php-fpm.conf //複製粘貼D15Z php-fpm.conf ... [global] pid = /usr/local/php-fpm/var/run/php-fpm.pid error_log = /usr/local/php-fpm/var/log/php-fpm.log [www] listen = /tmp/php-fcgi.sock listen.mode = 666 user = php-fpm group = php-fpm pm = dynamic pm.max_children = 50 pm.start_servers = 20 pm.min_spare_servers = 5 pm.max_spare_servers = 35 pm.max_requests = 500 rlimit_files = 1024 ... cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm chmod 755 /etc/init.d/php-fpm chkconfig --add php-fpm chkconfig php-fpm on service php-fpm start
若是忘記建立用戶,服務會報錯以下圖數據庫
useradd -s /sbin/nologin php-fpm
ps aux |grep php-fpm ll /tmp/php-fcgi.sock //能夠看到生成了權限是666該文件,說明配置文件生效
擴展apache