Chinaunix首页 | 论坛 | 博客
  • 博客访问: 321457
  • 博文数量: 120
  • 博客积分: 3000
  • 博客等级: 中校
  • 技术积分: 1290
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-19 01:46
文章分类

全部博文(120)

文章存档

2010年(84)

2009年(36)

我的朋友

分类:

2009-12-19 05:56:46

192.168.5.119
 
 
程序员LAMP开发环境安装:
 
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel libevent-devel libevent mhash mhash-devel libmcrypt-devel libmcrypt gd gd-devel pcre pcre-devel perl perl-devel
 
groupadd mysql
useradd -g mysql mysql
unzip mysql-5.1.40.zip
cd mysql-5.1.40
mkdir /usr/local/mysql
./configure --prefix=/usr/local/mysql --enable-local-infile --with-charset=utf8 --with-debug --with-big-tables --with-plugins=max
/sbin/ldconfig
make 
make install
cp support-files/my-medium.cnf /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db --basedir=/usr/local/mysql/ --datadir=/mysqldata/mysql_data/(数据存放目录根据具体情况而定)
chown -R mysql.mysql /mysqldata/mysql_data
/usr/local/mysql/bin/mysqld_safe --user=mysql &
cd ../
ln -s /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
echo "/etc/init.d/mysqld start" >> /etc/rc.local
然后使用netstat -tunlp查看3306端口是否开启,如果没有开启,就需要检查/mysqldata/mysql_data/下的错误日志。
 
tar zxvf libiconv-1.13.tar.gz
cd libiconv-1.13/
./configure --prefix=/usr/local
make
make install
cd ../
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
 
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
cd ../
 
tar zxf httpd-2.2.13.tar.gz
cd httpd-2.2.13
mkdir /usr/local/apache
./configure --prefix=/usr/local/apache  --with-mysql=/usr/local/mysql --enable-ssl --with-ssl --enable-rewrite=shared  --enable-speling=shared --enable-dav --enable-mods-shared=all --enable-module=so
make
make install
cd ../
编辑/usr/local/apache/conf/httpd.conf,在"AddType application/x-gzip .gz .tgz"行下面添加"AddType application/x-httpd-php .php .phtm" 和 "AddType application/x-httpd-php-source .phps"
ln -s /usr/local/apache/bin/apachectl /etc/init.d/httpd
echo "/etc/init.d/httpd -k start" >> /etc/rc.local
/etc/init.d/httpd -k start
然后使用netstat -tunlp查看80端口是否开启,如果没有开启,就需要检查错误日志。
 
tar jxf php-5.3.1.tar.bz2
cd php-5.3.1
mkdir /usr/local/php
./configure --prefix=/usr/local/php/ --with-apxs2=/usr/local/apache/bin/apxs  --with-libxml-dir  --with-openssl --with-zlib  --with-zlib-dir --with-bz2  --with-curl --with-curlwrappers --enable-mbregex   --with-pcre-dir --enable-ftp  --with-openssl-dir  --with-gd --with-jpeg-dir  --with-png-dir --with-zlib-dir  --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-gmp --with-mhash   --enable-mbstring --with-mcrypt --with-mysql=/usr/local/mysql --with-zlib-dir --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib-dir --enable-soap --enable-sockets
 
编辑Makefile 大约77 行左右的地方: EXTRA_LIBS = ..... -lcrypt 在最后加上 -liconv,例如: EXTRA_LIBS = ..... -lcrypt -liconv
 
make
make install
cp php.ini-production  /usr/local/php/lib/php.ini
cd ../
编辑/usr/local/php/lib/php.ini,修改"register_globals = Off"为"register_globals = On";修改" extension_dir ="./" "改为" extension_dir = "/usr/local/php//lib/php/extensions/no-debug-non-zts-20060613/" " .
注意:
如果出现以下错误:
dler/mod_php5.lo sapi/apache2handler/sapi_apache2.lo
sapi/apache2handler/apache_config.lo sapi/apache2handler/php_functions.lo
main/internal_functions.lo -lcrypt -lcrypt -lrt -lmysqlclient -lmcrypt -lltdl
-lldap -llber -lgmp -lfreetype -lpng -lz -ljpeg -lcurl -lbz2 -lz -lm -ldl
-lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -lcurl -ldl -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err -lidn -lssl -lcrypto -lz -lxml2 -lz -lm -lssl -lcrypto
-ldl -lz -lmysqlclient -lz -lcrypt -lnsl -lm -lmygcc -lxml2 -lz -lm -lxml2 -lz
-lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -liconv  -o
libphp5.la
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] 错误 1
需要执行以下命令:
yum install libtool.i386  libtool-ltdl.i386  -y
 
 
tar zxf SCA_SDO-1.2.4.tgz
cd SCA_SDO-1.2.4
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
mkdir /usr/local/php/lib/php/SDO
scp -r SCA /usr/local/php/lib/php/
scp -r DAS /usr/local/php/lib/php/SDO/
chmod -R 755 /usr/local/php/lib/php/SCA
chmod -R 755 /usr/local/php/lib/php/SDO/DAS
echo "extension = sdo.so" >> /usr/local/php/lib/php.ini
cd ../
 
echo 'export PATH=$PATH:/usr/local/apache/bin:/usr/local/mysql/bin:/usr/local/php/bin' >> /root/.bashrc
source /root/.bashrc

阅读(702) | 评论(0) | 转发(0) |
0

上一篇:Xen_ks_setup

下一篇:ks.cfg

给主人留下些什么吧!~~