国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 操作系統(tǒng) > 正文

搭建基于PHP的www服務(wù)器

2024-06-28 13:19:35
字體:
供稿:網(wǎng)友
搭建基于php的www服務(wù)器

安裝MySQL

#!/bin/bashmount |grep "/dev/sr0"if [ "$?" != 0 ];then    mount /dev/sr0 /mediafi[ "$?" != 0 ]&& echo "fail to mount ! exit " && exit yum -y install gcc-c++ ncurses-devel perl-devel rpm -q  gcc-c++ ncurses-devel perl-devel if [ "$?" != 0 ]; then    echo "install error "    yum -y remove gcc-c++ ncurses-devel perl-devel      if [ "$?" != 0 ]; then     echo "remove error "    fifi# install Cmakecmakeif [ "$?" != 0 ];then    cd /root/db/    tar zxf /root/db/cmake-3.1.0-rc3.tar.gz      # get the directory after unzip     dname=`ls -al /root/db/ |grep "^d" |grep ".*cmake.*"|awk '{PRint $9}'`     echo "directory: "$dname    if [ ! -d $dname ]; then        echo "fail unzip "        exit     fi    cd /root/db/$dname    echo "enter " `pwd`    ./bootstrap     if [ "$?" == 0 ];then        gmake         if [ "$?" == 0 ]; then            gmake install             if [ "$?" == 0 ]; then                echo "success"            else                 echo "gmake install fail ! exit "                exit             fi        else             echo "gmake fail ! exit "        fi    else         echo " ./bootstrap fail exit "        exit     fielse     echo "Cmake already installed "fi# install mysql cd /root/db/tar zxvf /root/db/mysql-5.6.20.tar.gzmysqlD=`ls -al /root/db/ |grep "^d" |grep ".*mysql.*"|awk '{print $9}'` echo "mysql directory: "$mysqlDif [ ! -d $mysqlD ]; then    echo "mysql fail unzip "    exit ficd /root/db/$mysqlDcmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysqlmake && make install# configure mysqlecho "PATH=$PATH:/usr/local/mysql/bin/" >> /etc/profilesource /etc/profileuseradd mysqlif [ "$?" != 0 ]; then    echo "adduser error "    exit fichown -R mysql:mysql /usr/local/mysql/cd /usr/local/mysql/echo "enter "`pwd`./scripts/mysql_install_db --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --user=mysqlcp support-files/mysql.server /etc/init.d/mysqldchkconfig mysqld onmv /etc/my.cnf /etc/my.cnf.bkservice mysqld start 

搭建www服務(wù)器以及PHP功能

#!/bin/bashmount |grep "/dev/sr0"if [ "$?" != 0 ]; then    mount /dev/sr0 /media fi[ "$?" != 0 ] && echo "fail to mount ! exit " && exit # install gcc-c++rpm -q gcc-c++if [ "$?" != 0 ]; then    yum -y install gcc-c++fi# remove httpdrpm -q httpd if [ "$?" == 0 ]; then    rpm -e httpd --nodepsfiyum -y install perl-devel freetype-devel libxml2-devel libXpm-devel zlib-devel libpng-devel[ "$?" != 0 ] && echo "perl-devel freetype-devel libxml2-devel libXpm-devel zlib-devel libpng-devel yum error ! exit " && exit # install APR(Apache Portable Runtime)tar -jxvf /root/web/apr-1.5.1.tar.bz2APR=`ls -al /root/web/ |grep "^d" |grep ".*apr.*"|awk '{print $9}'` [ "$APR" == "" ] && echo " apr unzip error ! exit " && exit cd /root/web/$APRecho "enter " `pwd`./configure --prefix=/usr/local/aprif [ "$?" ==  0 ];then    make && make install     if [ "$?" == 0 ]; then         echo "apr install success"    else         echo "apr make && make install error ! exit "        exit     fielse     echo "apr ./configure error ! exit "    exit fi# install apr-utiltar -jvxf /root/web/apr-util-1.5.3.tar.bz2APRU=`ls -al /root/web/ |grep "^d" |grep ".*apr-util*"|awk '{print $9}'` [ "$APRU" == "" ] && echo " apr-util unzip error ! exit " && exit echo "apr-util "$APRUcd /root/web/$APRUecho "enter "$APRU./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/if [ "$?" ==  0 ];then    make && make install     if [ "$?" == 0 ]; then         echo "apr-util install success"    else         echo "apr-util make && make install error ! exit "        exit     fielse     echo "apr-util ./configure error ! exit "    exit fi#install pcreecho "start instal pcre "echo "current directory is : " `pwd`cd /root/web/tar -jvxf /root/web/pcre-8.35.tar.bz2 PCRE=`ls -al /root/web/ |grep "^d" |grep ".*pcre.*"|awk '{print $9}'` echo "find pcre in /root/web/" $PCRE [ "$PCRE" == "" ] && echo " pcre unzip error ! exit " && exit echo "pcre : "$PCREcd /root/web/$PCREecho "enter pcre: " $PCRE./configure --prefix=/usr/local/pcreif [ "$?" ==  0 ];then    make && make install     if [ "$?" == 0 ]; then         echo "pcre install success"    else         echo "pcre make && make install error ! exit "        exit     fielse     echo "pcre ./configure error ! exit "    exit fi#apache installcd /root/web/tar -jvxf /root/web/httpd-2.4.10.tar.bz2HTTPD=`ls -al /root/web/ |grep "^d" |grep ".*httpd.*"|awk '{print $9}'` [ "$HTTPD" == "" ] && echo " httpd unzip error ! exit " && exit cd /root/web/$HTTPD./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite --enable-cgi --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre/if [ "$?" ==  0 ];then    make && make install     if [ "$?" == 0 ]; then         echo "httpd install success"    else         echo "httpd make && make install error ! exit "        exit     fielse     echo "httpd ./configure error ! exit "    exit fi


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 胶南市| 化德县| 三原县| 阿城市| 齐齐哈尔市| 丹巴县| 小金县| 定州市| 通海县| 成安县| 广灵县| 怀远县| 林口县| 盖州市| 大石桥市| 城步| 合江县| 东宁县| 南丰县| 台北县| 潍坊市| 祥云县| 东阳市| 璧山县| 德惠市| 清水河县| 石城县| 宜都市| 辰溪县| 天门市| 秦安县| 疏附县| 安龙县| 辽阳县| 夹江县| 章丘市| 安福县| 霍山县| 乌海市| 滨海县| 眉山市|