Linux/Centos安裝Litespeed+PHP+MYSQL+PHPMYADMIN教程
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來管理你的資料庫.
相關文章
- Linux安裝rabbitmq簡單教程(Centos6.5)LinuxMQCentOS
- Centos 安裝 Docker|教程CentOSDocker
- VMware安裝Linux CentOSLinuxCentOS
- Linux系統安裝——Centos 7.6安裝LinuxCentOS
- CentOS 7安裝 hping教程CentOS
- CentOS-RocketMQ安裝教程CentOSMQ
- Centos6.6安裝教程CentOS
- docker的安裝(linux、centos)DockerLinuxCentOS
- Linux安裝CentOS8.3LinuxCentOS
- 安裝Centos8 LinuxCentOSLinux
- centos7 docker 安裝教程CentOSDocker
- CentOS 7 安裝 Elasticsearch 6.4.2 教程CentOSElasticsearch
- Linux(CentOS)安裝JDK1.8LinuxCentOSJDK
- CentOS Linux7 安裝JDKCentOSLinuxJDK
- linux centos8安裝dockerLinuxCentOSDocker
- Linux Centos上安裝 MySQL 8.0.16LinuxCentOSMySql
- Linux CentOS升級安裝gitLinuxCentOSGit
- 【Linux】Centos7.6 安裝ZookeeperLinuxCentOS
- ADS安裝教程(Linux)Linux
- Linux Debian安裝教程Linux
- Parrot Linux安裝教程Linux
- Linux的安裝教程Linux
- CentOS 7.3怎麼安裝?CentOS 7.3.1611系統安裝配置圖文教程CentOS
- Centos Stream 9 安裝Docker 23.0.2 社群版安裝教程。CentOSDocker
- CentOS8 詳細安裝教程CentOS
- Centos7安裝配置Hive教程。CentOSHive
- Centos7系列安裝FineBI教程。CentOS
- CentOS7 docker安裝部署教程CentOSDocker
- Centos下Elasticsearch安裝詳細教程CentOSElasticsearch
- VM安裝配置centos8教程CentOS
- Docker教程之四CentOS安裝DockerDockerCentOS
- centos7安裝教程詳解 centos7安裝詳細步驟CentOS
- Linux系統安裝(CentOS6)LinuxCentOS
- Linux-Redis安裝(CentOS7)LinuxRedisCentOS
- 【Linux】Centos7.6 安裝JDK 1.8LinuxCentOSJDK
- CentOS 8.0.1905 linux伺服器系統安裝與配置圖解教程CentOSLinux伺服器圖解
- Linux Ubuntu安裝配置教程LinuxUbuntu
- Linux下安裝svn教程Linux
- Linux系統安裝01-centos7系統安裝LinuxCentOS