[root@weixing01 src]# cd /usr/local/mysql/
[root@weixing01 mysql]# ls
bin data include man README share support-files
COPYING docs lib mysql-test scripts sql-bench
5.创建用户,目录并初始化
[root@weixing01 mysql]# useradd mysql
[root@weixing01 mysql]# mkdir /data/
[root@weixing01 mysql]# ls /data/
[root@weixing01 mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
FATAL ERROR: please install the following Perl modules before executing ./scripts/mysql_install_db:
Data::Dumper
6.初始化:
./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
Installing MySQL system tables...2018-02-26 22:25:59 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-02-26 22:25:59 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2018-02-26 22:25:59 0 [Note] ./bin/mysqld (mysqld 5.6.36) starting as process 1622 ...
2018-02-26 22:25:59 1622 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-02-26 22:25:59 1622 [Note] InnoDB: The InnoDB memory heap is disabled
2018-02-26 22:25:59 1622 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-02-26 22:25:59 1622 [Note] InnoDB: Memory barrier is not used
2018-02-26 22:25:59 1622 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-02-26 22:25:59 1622 [Note] InnoDB: Using Linux native AIO
7.执行完成后马上执行
[mysqld]
datadir=/data/mysql
socket=/tmp/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
#log-error=/var/log/mariadb/mariadb.log
#pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
#!includedir /etc/my.cnf.d
checking whether to enable calendar conversion support... no
checking whether to enable ctype functions... yes
checking for cURL support... yes
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/
[root@weixing01 php-5.6.30]# ls /usr/local/php-fpm/
bin etc include lib php sbin var
[root@weixing01 php-5.6.30]# ls /usr/local/php
bin etc include lib php
[root@weixing01 php-5.6.30]# ls /usr/local/php-fpm/sbin/
php-fpm
[root@weixing01 php-5.6.30]# ls /usr/local/php-fpm/var
log run
5.查看配置是否正确:
[root@weixing01 php-5.6.30]# /usr/local/php-fpm/sbin/php-fpm -t
[12-Mar-2018 22:27:46] ERROR: failed to open configuration file '/usr/local/php-fpm/etc/php-fpm.conf': No such file or directory (2)
[12-Mar-2018 22:27:46] ERROR: failed to load configuration file '/usr/local/php-fpm/etc/php-fpm.conf'
[12-Mar-2018 22:27:46] ERROR: FPM initialization failed
6.修改配置文件:
[root@weixing01 php-5.6.30]# cp php.ini-production /usr/local/php-fpm/php.ini
[root@weixing01 php-5.6.30]# cd /usr/local/php-fpm/etc/
[root@weixing01 etc]# ls
pear.conf php-fpm.conf.default
[root@weixing01 etc]# vim php-fpm.conf