LAMP架设过程步骤

4 篇文章 0 订阅
4 篇文章 0 订阅

1,安装必要环境

rpm  -q  make   gcc  gcc-c++

 

rpm或者yum

 

rpm 要先挂载cdrom

mount /dev/cdrom /mnt/cdrom

进入vi   /etc/yum.repos.d/centos-media.repo设置光盘安装

 

更改baseurl=file:///mnt/cdrom

 

     enabled=1

 

把yum.repos.d下面的剩下三个文件更名或者移动位置

在连网的情况下yum 方式:yum install -y  make   gcc  gcc-c++

 

 

2,检测httpd /mysql/ php是否已经安装,服务有没有启动,有则需先停止服务再卸载

rpm -qa|grep httpd mysql php

 

service httpd /mysql  status亦可以进 ls /etc/rc.d/init.d 查看

 

yum remove httpd/mysql

 

关闭防火墙selinux

vi /etc/sysconfig/selinux

所有的注释掉,在最后加上selinux=disabled

netfilter/iptables

iptables -F

 

下载好所需要安装包后:

建一个自解压所有包的运行文件

cd  /lamp

ls  *.tar.gz >ls.list

for TAR in `cat ls.list`

do

    tar -zxf $TAR

done

 

运行shell文件:

sh -x tar.sh

3,开始安装

a.     ./configure   --prefix=/usr/local/libxml2/

查看配置参数设置:

./configure  --hlep |grep zlib/gd2

 

make

make install

如果出错要重新安装可以删除文件

rm -rf /usr/local/libxml2

rm -rf /lamp/libxml2-2.6.30

 

b.     ./configure    --prefix=/uer/local/libmcrypt/

make &&make install

cd  libltdl

c.     ./configure   --enable-ltdl-install

make&&make install

 

d.    cd  zlib-1.2.8

    ./configure

make && make install

 

e.   ./confugre --prefix=/usr/local/libpng/

make && make install

 

f.   mkdir  /usr/local/jpeg9

    mkdir  /usr/local/jpeg9/bin

    mkdir  /usr/local/jpeg9/lib

    mkdir  /usr/local/jpeg9/include

    mkdir  -p  /usr/local/jpeg9/man/man1

./configure   --prefix=/usr/local/jpeg9/ --enable-shared --enable-static

make

make install

 

g.  ./configure --prefix=/usr/local/freetype/

make && make install

 

h.   cd autoconf-2.69

 ./configure ;make;make install

 

i.   ./configure --prefix=/usr/local/gd2/ --with-jpeg=/usr/local/jpeg9/ --with-freetype=/local/freetype/

make &&make install

 

j.   

cd   ./apr-util-1.3.12

cp -rf ./apr-util-1.3.12 ./httpd-2.4.10/srclib/apr-util

cd ./aprl-1.3.12

cp -rf ./apr -1.3.12 ./httpd-2.4.10/srclib/apr

 

yum -y install pcre-devel

 

  ./configure   --prefix=/usr/local/apache2/ --sysconfdir=/etc/httpd/ --with-included-apr --disable-userdir --enable-so --enable-defalte-shared --enable-expires=shared --enable-rewrite=shared --enable-static-support

 

make &&make install

 

启动服务看看

/usr/local/apache2/bin/apachect1 start

ps -le |grep httpd

 

ls /usr/local/apache2/modules

 

如果安装中提示模块报错

chcon -t texrel_shlib_t filename模块名 或者/usr/local/apache2/modules/?

 

k.  cd  ../mysql-5.6.22

cd  ../ncurses-5.6

 ./configure --with-shared --without-debug --without-ada --enable-overwrite

 

make &&make install

 

groupadd mysql

查看一下 grep mysql /etc/group

useradd -g msyql mysql

grep mysql /etc/passwd

 

 

cd mysql-5.6.22

yum install -y cmake

 

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \

-DMYSQL_UNIX_ADDR=/tmp/mysql.sock \

-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_READLINE=1 \

-DENABLED_LOCAL_INFILE=1 \

-DMYSQL_DATADIR=/usr/local/mysql \

-DMYSQL_TCP_PORT=3306

 

 

(./configure --prefix=/usr/local/mysql/ --with-extra-charsets=all )这里版本要用cmake)

 

 

 

 

php

 

./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-jpeg-dir=/usr/local/jpeg/ --with-freetype-dir=/usr/local/freetype/ --with-gd --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable-mbstring=all -enable-sockets --enable-bcmath --with-gettext

 

 

 

一些注意事项:

yum -y install libpng-devel

 

解决办法是由原来的--with-gd=/usr/local/gd2/改为 --with-gd 不指定路径了

 

 

zabbix

 

 

添加zabbix进入数据库允许权限

GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;

 

 

安装zabbix依赖

yum install net-snmp-devel curl curl-devel mysql-devel

 

同步网络时钟

crantab -e

*/10 * * * * ntpdate -u ntp.api.bz

 

当上传SQL数据库提示文件太大时修改以php.ini下三个文件,然后重启apache和mysqld

upload_max_filesize, memory_limit 和post_max_size,

 

sap--->saprfc

输入函数:查找输入项和输出项

IMPORT和输出项为表格

如:

$result=$sap->callFunction("ZRFC_V02_PLANNING",

                               

                                array(      

                                                                          

                                                                                 array("IMPORT","P_ARBPL","PR03"),

                                      array("IMPORT","P_SEQNO","BS"),

                                                                          

                                                                                 array("TABLE","O_HEADER",array()),

                                                                                 array("TABLE","O_ITEM",array())

                                                                           ));

调函数方法

通过TCode:SE37,我们既可以进入RFC的开发初始界面

 

 

 

 

如果不希望有报notice错误请在Php.ini中修改:

error_reporting =E_ALL & ~E_NOTICE

 

vim命令:
%s#/home/szs/stb/stsdk/A36/rpmbuild/BUILD#/home/yinjiabin/qt#g
解释:
将/home/szs/stb/stsdk/A36/rpmbuild/BUILD
替换为/home/yhinjiabin/qt

路径当中#的使用

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值