Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101392
  • 博文数量: 13
  • 博客积分: 266
  • 博客等级: 二等列兵
  • 技术积分: 272
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-25 19:30
文章分类

全部博文(13)

文章存档

2013年(4)

2012年(9)

分类: LINUX

2012-03-25 13:32:43

[mysql]
tar -zxvf mysql-5.0.77.tar.gz
cd mysql-5.0.77/
./configure --prefix=/usr/local/mysql --with-extra-charsets=all --enable-thread-safe-client --enable-assembler --with-charset=utf8 -- --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-name-curse-libs=/usr/lib/libncurses.so.5
make && make install
cd ../

groupadd mysql
useradd -s /sbin/nologin -M -g mysql mysql

cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
sed -i 's/skip-locking/skip-external-locking/g' /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db --user=mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql/.
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql
chmod 755 /etc/init.d/mysql

cat > /etc/ld.so.conf.d/mysql.conf<
/usr/local/mysql/lib/mysql
/usr/local/lib
EOF
ldconfig

ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
ln -s /usr/local/mysql/include/mysql /usr/include/mysql
/etc/init.d/mysql start

ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
ln -s /usr/local/mysql/bin/mysqldump /usr/bin/mysqldump
ln -s /usr/local/mysql/bin/myisamchk /usr/bin/myisamchk

/usr/local/mysql/bin/mysqladmin -u root password  你的passwd

/etc/init.d/mysql restart

[apache]
./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-mime 
make
make install
ln -s /usr/local/apache2/bin/apachectl /usr/sbin/apachectl
ln -s /usr/local/apache2/bin/httpd  /usr/sbin/httpd 


[php]
tar -zxvf php-5.3.6.tar.gz 
cd php-5.3.6
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib-dir --with-png-dir --with-jpeg-dir --with-freetype-dir --with-libxml-dir --with-xsl --with-gd --enable-ftp --enable-mbstring --enable-mbstring --enable-soap --enable-bcmath --with-config-file-path=/usr/local/php
make 
make install
cp -a /root/lamp/php/php-5.3.6/php.ini.-development /usr/local/php/php.ini
修改date.timezone = "Asia/Shanghai"
修改extension_dir = "/usr/local/php/include/php/ext"

阅读(1630) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~