[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) |