1.安裝Apache
成都創(chuàng)新互聯(lián)專(zhuān)注于榮成網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠(chéng)為您提供榮成營(yíng)銷(xiāo)型網(wǎng)站建設(shè),榮成網(wǎng)站制作、榮成網(wǎng)頁(yè)設(shè)計(jì)、榮成網(wǎng)站官網(wǎng)定制、微信小程序服務(wù),打造榮成網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供榮成網(wǎng)站排名全網(wǎng)營(yíng)銷(xiāo)落地服務(wù)。yum install httpd #根據(jù)提示,輸入Y安裝即可成功安裝
systemctl start httpd.service #啟動(dòng)apache
systemctl stop httpd.service #停止apache
systemctl restart httpd.service #重啟apache
systemctl enable httpd.service #設(shè)置apache開(kāi)機(jī)啟動(dòng)
2.安裝Mariadb
yum install mariadb mariadb-server #詢(xún)問(wèn)是否要安裝,輸入Y即可自動(dòng)安裝,直到安裝完成
systemctl start mariadb.service #啟動(dòng)MariaDB
systemctl stop mariadb.service #停止MariaDB
systemctl restart mariadb.service #重啟MariaDB
systemctl enable mariadb.service #設(shè)置開(kāi)機(jī)啟動(dòng)
cp /usr/share/mysql/my-huge.cnf /etc/my.cnf #拷貝配置文件(注意:如果/etc目錄下面默認(rèn)有一個(gè)my.cnf,直接覆 蓋即可)
2.1 初始化數(shù)據(jù)庫(kù)
mysql_secure_installation
回車(chē),根據(jù)提示輸入Y
輸入2次密碼,回車(chē)
根據(jù)提示一路輸入Y
最后出現(xiàn):Thanks for using MySQL!
MySql密碼設(shè)置完成,重新啟動(dòng) MySQL:
systemctl restart mariadb.service #重啟MariaDB
3.安裝PHP
yum install php #根據(jù)提示輸入Y直到安裝完成
3.1 安裝PHP組件,使PHP支持 MariaDB
yum install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash #這里選擇以上安裝包進(jìn)行安裝,根據(jù)提示輸入Y回車(chē)
systemctl restart mariadb.service #重啟MariaDB
systemctl restart httpd.service #重啟apache
4.安裝phpMyadmin
yum install phpmyadmin php-mcrypt
phpMyAdmin 的默認(rèn)安裝目錄是 /usr/share/phpMyAdmin,同時(shí)會(huì)在 Apache 的配置文件目錄中自動(dòng)創(chuàng)建虛擬主機(jī) 配置文件 /etc/httpd/conf.d/phpMyAdmin.conf(區(qū)分大小寫(xiě))。默認(rèn)情況下,CentOS 7上的phpMyAdmin只允許從 回環(huán)地址(127.0.0.1)訪(fǎng)問(wèn)。為了能遠(yuǎn)程連接,你需要改動(dòng)它的配置。
vi /etc/httpd/conf.d/phpMyadmin.conf
<Directory /usr/share/phpMyAdmin/> AddDefaultCharset UTF-8 <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> # Require ip 127.0.0.1 #注釋掉 # Require ip ::1 #注釋掉 Require all granted #新添加 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory> <Directory /usr/share/phpMyAdmin/setup/> <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> #Require ip 127.0.0.1 #注釋掉 #Require ip ::1 #注釋掉 Require all granted #新添加 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory> :wqsystemctl restart httpd
瀏覽器訪(fǎng)問(wèn)地址http://ip/phpmyadmin
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線(xiàn),公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性?xún)r(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿(mǎn)足用戶(hù)豐富、多元化的應(yīng)用場(chǎng)景需求。
網(wǎng)頁(yè)名稱(chēng):centos7lamp環(huán)境-創(chuàng)新互聯(lián)
當(dāng)前URL:http://www.rwnh.cn/article20/dsdcco.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供域名注冊(cè)、動(dòng)態(tài)網(wǎng)站、App開(kāi)發(fā)、關(guān)鍵詞優(yōu)化、品牌網(wǎng)站設(shè)計(jì)、網(wǎng)站維護(hù)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容