liukaida 发表于 2015-8-21 05:41:24

CentOS 6.5 配置LAMP环境随笔

  php -v
php -m |grep shmop
出现以下错误时:
  -bash: php: command not found
需要确认,.bash_profile文件里的路径是否添加:
  vi .bash_profile
如果没有,添加下面的命令
  export PATH=$PATH:/usr/local/php/bin

killall php杀死php进程  httpd-2.4.9.tar.gz    http://httpd.apache.org/download.cgi
  yum install gcc-c++安装编译gc++
  # vi
/usr/local/src/gd-2.0.35/gd_png.c
查找png.h改成
/usr/local/libpng/include/png.h
保存退出
再重新执行
# make
  # make install
  /usr/local/apache2/bin/apachectl stop//停止apache
  /usr/local/apache2/bin/apachectl start//开启apache
  
  /usr/local/php/bin/php
  
  /usr/local/mysql/bin/mysqld_safe --user=luojianqun &   //开启mysql
  
  查看进程是否启动 ps -ef | grep redis   //查看是否启动redis服务
查看端口是否占用 netsta -tunpl | grep 6379   //查看是否启动6379端口
  
  一、如果你的系统是RedHat系列:
  yum list|grep ncurses
  yum -y install ncurses-devel
  yum install ncurses-devel
  /usr/local/mysql/bin/mysqld_safe --user=luojianqun &
  
  ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml2/ --with-png-dir=/usr/local/libpng/ --with-jpeg-dir=/usr/local/jpeg6/ --with-freetype-dir=/usr/local/freetype/ --with-gd=/usr/local/gd2/ --with-zlib-dir=/usr/local/zlib/ --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets   //编译php
  
  CentOS6.5的英文系统,或者通过vm虚拟机快速安装的系统,通过更改vi /etc/sysconfig/i18n变换的语言,可能没有中文输入法,下面简单的说一下在CentOS6.5下,如何通过yum安装中文输入法。

[*]首先需要root权限,要用root登录,或者 su root暂时获取root权限。
[*]输入指令:yum install “@Chinese Support”
[*]会提示是否安装等,全部选择y
[*]回到桌面,点击系统>首选项>输入法或者(system->preferences->input method),如果没有输入法的话注销一下系统,再重新登入。

页: [1]
查看完整版本: CentOS 6.5 配置LAMP环境随笔