http://rootzone.net/zh-CN/setup-unmanaged-vps-with-litespeed-php-and-mysql/
http://www.wowtutorial.org/tutorial/2.html
http://www.blogtopsites.com/outpost/2418766d6534bb558e370c45336a41c4
本文教程非原创,采集众家之长,综合小夜(419.at)和vpsbeta.com两家的测试使用所写,本站现在用的就是Litespeed+PHP+MYSQL+PHPMYADMIN.
本站用的vps是
hostrail优惠后1.2美元每月256M内存的VPS
系统环境和程序版本介绍:
系统是 Centos 5 32bit
Litespeed 是官方提供的免费版本:lsws-4.0.17-std-i386-linux.tar.gz
Mysql 是 5.1.35版本
Php 升级使用的是 5.2.14版本
第一:
yum -y install yum-fastestmirror
yum -y update
yum -y remove httpd
yum -y install patch make gcc gcc-c++ gcc-g77 flex bison tar
yum -y install libtool libtool-libs kernel-devel autoconf213
yum -y install libjpeg libjpeg-devel libpng libpng-devel
yum -y install freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel
yum -y install file glib2 glib2-devel bzip2 diff* openldap-devel
yum -y install bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs
yum -y install e2fsprogs-devel krb5 krb5-devel libidn libidn-devel
yum -y install openssl openssl-devel vim-minimal unzip vixie-cron
yum -y install fonts-chinese scim-chewing scim-pinyin scim-tables-chinese
export PHP_AUTOCONF=/usr/bin/autoconf-2.13
export PHP_AUTOHEADER=/usr/bin/autoheader-2.13
wget -c http://dl.awlsh.com/litespeed/libiconv-1.13.1.tar.gz
tar zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1/
./configure –prefix=/usr/local
make
make install
cd ../
wget -c http://dl.awlsh.com/litespeed/libevent-1.4.14b-stable.tar.gz
tar zxvf libevent-1.4.14b-stable.tar.gz
cd libevent-1.4.14b-stable/
./configure –prefix=/usr
make
make install
cd ../
wget -c http://dl.awlsh.com/litespeed/libmcrypt-2.5.8.tar.gz
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure –enable-ltdl-install
make
make install
cd ../../
wget -c http://dl.awlsh.com/litespeed/mhash-0.9.9.9.tar.gz
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
cd ../ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
wget -c http://dl.awlsh.com/litespeed/mcrypt-2.6.8.tar.gz
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
./configure
make
make install
cd ../
wget -c http://dl.awlsh.com/litespeed/google-perftools-1.6.tar.gz
tar zxvf google-perftools-1.6.tar.gz
cd google-perftools-1.6/
./configure
make && make install
echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf
/sbin/ldconfig
cd ../
第2:安装数据库
tar -zxvf mysql-5.1.35.tar.gzcd mysql-5.1.35./configure --prefix=/usr/local/mysql --enable-assembler --with-charset=utf8 --enable-thread-safe-client --with-extra-charsets=all --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infilemake && make installcd ../groupadd mysqluseradd -g mysql mysqlcp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf/usr/local/mysql/bin/mysql_install_db --user=mysqlchown -R mysql /usr/local/mysql/varchgrp -R mysql /usr/local/mysql/.cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqlchmod 755 /etc/init.d/mysqlchkconfig --level 345 mysql onecho "/usr/local/mysql/lib/mysql" >> /etc/ld.so.confecho "/usr/local/lib" >> /etc/ld.so.confldconfigln -s /usr/local/mysql/lib/mysql /usr/lib/mysqlln -s /usr/local/mysql/include/mysql /usr/include/mysql/etc/init.d/mysql start/usr/local/mysql/bin/mysqladmin -u root password 11111 (这个是数据库密码)/etc/init.d/mysql restart
tar zxvf lsws-4.0.17-std-i386-linux.tar.gzcd lsws-4.0.17sh install.sh
Do you agree with abot license ? 输入 Yes
User name [admin]:
Group [nogroup]:
when the server restarts [Y/n]?Y
Would you like to start it right now [Y/n]?
/usr/local/lsws/DEFAULT/html
所以进入其目录:
cd /usr/local/lsws/DEFAULT/html/
下载 phpmyadmin,解压
wget -c http://soft.vpser.net/datebase/phpmyadmin/phpmyadmin.tar.gz
tar zxvf phpmyadmin.tar.gz
最后通过访问
http://ip/phpmyadmin/index.php来管理你的数据库.