网卡配置
修改ONBOOT="no"中的no位yes,修改后为ONBOOT="yes"
添加下面配置项,其中的具体IP等配置需要根据实际情况修改
BOOTPROTO=static
IPADDR=192.168.1.113
NETMASK=255.255.255.0
GETEWAY=192.168.1.1
DNS1=192.168.0.1
1)使用终端输入 date 命令后出现乱码
进行下面操作
编辑/etc/sysconfig/i18n,修改为如下内容:
LANG="zh_CN.GB2312″
SUPPORTED="zh_CN.UTF-8:zh_CN:zh"
SYSFONT="latarcyrheb-sun16"
修改完成后,推出终端重新登录
2)没有wget (下载工具,系统必须可以接入网络)
yum install wget
3)没有make (安装程序,系统必须可以接入网络)
运行yum install make
4)安装上传下载工具(rz/sz)
php项目搭建通过wget freeware.sgi/source/rzsz/rzsz-3. 下载
解压:tar zxvf rzsz-3.
运行:make posix
运行make posix时报错
[root@localhost src]# make posix
cc -O -DPOSIX -DMD=2 rz.c -o rz
make: cc:命令未到
make: *** [posix] 错误 127
原因是没有安装gcc,运行下面命令(我只运行了前两个就可以用了,第三个命令没有试)
yum install g++* -y
yum install gcc* -y
yum install glibc* -y
gcc安装完成后继续运行make posix 应该就可以安装完成了
复制rz/sz到bin目录下,命令:cp rz sz /usr/bin/
5)安装mysql时运行
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/webserver/mysql \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS:STRING=utf8,gbk \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_SSL=bundled \
-DWITH_READLINE=1 \
-DWITH_EMBEDDED_SERVER=1 \
-DENABLED_LOCAL_INFILE=1
命令时出现下方错误信息
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at ake:82 (MESSAGE):
Curses library not found. Please install appropriate package,
and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
ake:126 (FIND_CURSES)
ake:216 (MYSQL_USE_BUNDLED_LIBEDIT)
:250 (MYSQL_CHECK_READLINE)
执行下面命令,
运行安装:yum install ncurses-devel
CMake Error at ake:82 (MESSAGE):
Curses library not found. Please install appropriate package,
and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
ake:126 (FIND_CURSES)
ake:216 (MYSQL_USE_BUNDLED_LIBEDIT)
:250 (MYSQL_CHECK_READLINE)
执行下面命令,
运行安装:yum install ncurses-devel
运行安装:yum install bison
删除文件:
启动mysql是报错(mysql安装过程中不需要配置开机启动)
ln -s /var/lib/mysql /mysql .sock /tmp/mysql .sock (运行后无效果)
把/usr/local/webserver/mysql/support-files/目录下的my-hugef配置文件复制到etc目录下
之后使用/bin/sh /usr/local/webserver/mysql/bin/mysqld_safe --datadir=/data1/mysql/data --pid-file=/data1/mysql/data/bogon.pid启动或者使用/etc/init.d/mysqld start启动
安装php过程中
提示:configure: error: xml2-config not found. Please check your libxml2 installation.
运行:yum install libxml2
yum install libxml2 –devel -y
提示:configure: error: Cannot find OpenSSL's <evp.h>
运行:yum install openssl openssl-devel
提示:configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
运行:yum install curl curl-devel
提示:configure: error: Cannot find ldap.h
运行:yum install openldap-devel
提示:configure: error: Cannot find ldap libraries in /usr/lib.
运行:cp -frp /usr/lib64/libldap* /usr/lib/
提示:configure: error: Directory /usr/local/webserver/freetds is not a FreeTDS installation directory
运行:在/usr/local/webserver/目录下安装一个freetds
下载地址:/pub/Linux/ALPHA/freetds/
$ tar (解压)
$ ./configure --prefix=/usr/local/webserver/freetds --with-tdsver=8.0 --enable-msdblib
$ make
$ make install
$ ./configure --prefix=/usr/local/webserver/freetds --with-tdsver=8.0 --enable-msdblib
$ make
$ make install
/usr/local/webserver/php/sbin/php-fpm启动php错误解决:
ALERT: [pool www] pm.min_spare_servers(0) must be a positive value
编辑f到pm.min_spare_servers 去除;号,注意非注释内容pm.min_spare_servers
ALERT: [pool www] pm.max_spare_servers(0) must be a positive value
编辑f到pm.max_spare_servers 去除;号,同样非注释内容pm.max_spare_servers
WARNING: [pool www] pm.start_servers is not set. It's been set to 20.
ALERT: [pool www] pm.min_spare_servers(0) must be a positive value
编辑f到pm.min_spare_servers 去除;号,注意非注释内容pm.min_spare_servers
ALERT: [pool www] pm.max_spare_servers(0) must be a positive value
编辑f到pm.max_spare_servers 去除;号,同样非注释内容pm.max_spare_servers
WARNING: [pool www] pm.start_servers is not set. It's been set to 20.
编辑f到pm.start_servers 去除;号,同样非注释内容pm.start_servers
ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
# netstat -ntlpps -ef|grep php查看进程,有N多进程
nobody 26152 26151 0 15:45 ? 00:00:00 php-fpm: pool www
nobody 26153 26151 0 15:45 ? 00:00:00 php-fpm: pool www
nobody 26154 26151 0 15:45 ? 00:00:00 php-fpm: pool www
nobody 26155 26151 0 15:45 ? 00:00:00 php-fpm: pool www
...........................
#killall php-fpm 结束所有php-fpm进程
再启动php-fpm
#/usr/local/php/sbin/php-fpm
成功
ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
# netstat -ntlpps -ef|grep php查看进程,有N多进程
nobody 26152 26151 0 15:45 ? 00:00:00 php-fpm: pool www
nobody 26153 26151 0 15:45 ? 00:00:00 php-fpm: pool www
nobody 26154 26151 0 15:45 ? 00:00:00 php-fpm: pool www
nobody 26155 26151 0 15:45 ? 00:00:00 php-fpm: pool www
...........................
#killall php-fpm 结束所有php-fpm进程
再启动php-fpm
#/usr/local/php/sbin/php-fpm
成功
运行:./configure --prefix=/usr/local/webserver/Gearmand
报错:configure: error: Unable to find libevent
安装:gearman-1.0.2
运行:./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-gearman=/usr/local/webserver/Gearmand
报错:configure: error: Please install libgearman
运行:yum install libgearman-devel.i686 libgearman.i686
报错:configure: error: cannot find Boost headers version >= 1.39.0
运行:将boost安装目录中 lib/ 下的所有内容copy到/usr/lib 和 /usr/lib64下,同时 将 boost安装目录中 include/boost 软链到 /usr/include 中:
cd /usr/local/boost-1.47.0/lib
cp -rf * /usr/lib/;
cp -rf * /usr/lib64/;
ln -s /usr/local/boost-1.47.0/include/boost /usr/include/boost
报错:configure: error: cannot find the flags to link with Boost program_options
运行:ln -s /usr/local/boost/include/boost/ /usr/local/include/boost
ln -s /usr/local/boost/lib/libboost_program_options.so /usr/lib/libboost_program_options.so
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论