报错:WARNING: The host 'test4' could not be looked up with resolveip.
解决办法:vim /etc/hosts 在最后一行添加192.168.1.242 test4
报错:./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
解决办法:yum -y install libaio-devel libaio
7、复制配置文件到/etc目录覆盖之前的my.cnf:
[root@centos74 mysql]# cp support-files/my-large.cnf /etc/my.cnf
cp:是否覆盖"/etc/my.cnf"? y
8、复制mysql 启动脚本文件到/etc/init.d 目录下并重命名为mysqld:
[root@centos74 mysql]# cp support-files/mysql.server /etc/init.d/mysqld
同时修改启动脚本的权限为755:
[root@centos74 mysql]# chmod 755 !$
chmod 755 /etc/init.d/mysqld
9、编辑启动脚本,定义datadir 路径:
[root@centos74 mysql]# vim /etc/init.d/mysqld
定义数据存放路径:
datadir=/data/mysql
10、将mariadb自带命令放入$PATH
[root@localhost ~]# PATH=$PATH:/etc/init.d/#当前有效,重启shell就失效 [root@localhost ~]# echo "export PATH=$PATH:/etc/init.d/" >>/etc/profile [root@localhost ~]# echo "export PATH=$PATH:/usr/local/mysql/bin/" >>/etc/profile [root@localhost ~]# source !$
11、启动mariadb:
[root@centos74 mysql]# /etc/init.d/mysqld start
Starting MySQL. SUCCESS!
第二步,开始安装php
这里要先声明一下,针对Nginx的php安装和针对apache的php安装是有区别的,因为Nginx中的php是以fastcgi的方式结合nginx的,可以理解为nginx代理了php的fastcgi,而apache是把php作为自己的模块来调用的。同样的,php官方下载地址: http://www.php.net/downloads.php
下载php
[rot@localhost src]# cd /usr/local/src [root@localhost src]# wget http://am1.php.net/distributions/php-5.5.23.tar.gz
解压php
[root@localhost src]# tar zxf php-5.5.23.tar.gz
创建相关账户
[root@localhost src]# useradd -s /sbin/nologin php-fpm
配置编译参数
[root@localhost src]# cd php-5.5.23
[root@localhost src]# yum -y install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel
[root@localhost php-5.5.23]# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --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 --disable-ipv6 --with-pear --with-curl --enable-bcmath --enable-mbstring --enable-sockets --with-gd --with-libxml-dir=/usr/local --with-gettext








