<noscript lang='sl7ewj5l'><thead date-time='xh2i5q1p'></thead></noscript>

            <sup draggable='i7ybiu5'><ol draggable='12lhb5'></ol></sup>

          1. <caption date-time='izlsva'><ol dropzone='09i0snt'></ol></caption>

            <dfn draggable='jxw7hiz'><span dir='kwm1l0'></span></dfn>

            文章熱詞:LAMP環境搭建

            日期:2019-03-04 09:42 by Mr. Yang 2877 0 收藏
            我要分享

            摘要:LAMP 是Linux Apache MySQL PHP的簡寫,其實就是把Apache, MySQL以及PHP安裝在Linux系統上,組成一個環境來運行php的腳本語言。

            1.安裝apche:yum -y install httpd

            啓動apche:service httpd start

            2.安裝php:yum -y install php

            mysql服務:yum -y install mysql-server

            3.安裝mysql:yum -y install mysql

            啓動mysql:/etc/init.d/mysqld start

            重啓mysql:service mysqld start

            4.配置虛拟站點:vi/etc/httpd/conf/httpd.conf

            5.更換rpm源,請根據自己的centos版本選擇相應的rpm源進行安裝

            Centos 5.X:

            rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpmCentOs 6.x:

            rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

            CentOs 7.X:

            rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm

            rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

            6.安裝php7:yum install php70w

            常用命令:

            安裝擴展:yum install php70w-xml(擴展名)

            查看一下php拓展:php -m

            重啓mysql:service mysqld start
            數據庫授權法:GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION 

            查找文件:find / -name mysql

            給文件最高權限:chmod -R 777 /var/www/ygwfcms/public/upload

            導入數據庫:    create database ygwfcms;

            use ygwfcms;

            set names utf8;

            source /usr/database.sql;

            修改數據庫密碼:mysqladmin -u root -p password mypasswd

            删除數據庫:drop database ygw;

            删除php:rpm -qa|grep php

            設置mysql密碼:mysqladmin -u root password '123456'

            登錄mysql:mysql -u root -p

            查看mysql編碼:show variables like 'character%';

            如果麻煩可以安裝寶塔:

            yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh

            寶塔常用命令:

            重啓面闆:service bt restart

            修改寶塔密碼:cd /www/server/panel && python tools.pyc panel testpasswd

            清楚登陸限制:rm -f /www/server/panel/data/*.login



            下一篇:助你開始使用 git 的簡易指南,木有高深内容。


            評論