導航:首頁 > 編程語言 > installphp安裝

installphp安裝

發布時間:2022-09-05 13:16:49

① 怎麼安裝install.php路徑

install.php本來就是個安裝頁,比如你的域名是123.com,域名根目錄下有個install.php,你就可以用123.com/install.php來訪問安裝程序,不明白追問。

② 怎麼安裝PHP環境

LAMP/LNMP 環境搭建

一.檢查系統環境

1.確認centos版本

[root@localhost ~]# cat /etc/redhat-release

2.檢查是否安裝過apache

rpm -qa | grep httpd

或者:

apachectl -v

或者:

httpd -v

3.檢查是否安裝過Mysql

service mysqld start

如果未被識別則沒有安裝

如果系統安裝過,或者安裝失敗,清理一下系統

4.清理Mysql痕跡

yum remove mysql

rm -f /etc/my.cnf

5.卸載Apache包

rpm -qa|grep httpd

注意:如果是新的系統或者你從來沒有嘗試安裝過,則以上步驟省略

二.安裝Apache、PHP、Mysql

停止防火牆服務

[root@localhost ~]# systemctl stop firewalld.service

禁用防火牆開機啟動服務

[root@localhost ~]# systemctl disable firewalld.service

1.安裝apache

[root@localhost ~]# yum -y install httpd

2.安裝php

[root@localhost ~]# yum -y install php

3.安裝php-fpm

[root@localhost ~]# yum -y install php-fpm

4.安裝Mysql

[root@localhost ~]# yum -y install mysql

5.安裝 mysql-server

[root@localhost ~]# yum install mariadb-server

CentOS 7+ 版本將MySQL資料庫軟體從默認的程序列表中移除,用mariadb代替了,entos7配置教程上,大多都是安裝mariadb,因為centos7默認將mariadb視作mysql。

因為mysql被oracle收購後,原作者擔心mysql閉源,所以又寫了一個mariadb,這個資料庫可以理解為mysql的分支。如果需要安裝mariadb,只需通過yum就可。

6.安裝 php-mysql

[root@localhost ~]# yum -y install php-mysql

三.安裝基本常用擴展包

1.安裝Apache擴展包

yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

2.安裝PHP擴展包

yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-devel

3.安裝Mysql擴展包

yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql

四.配置Apache、mysql開機啟動

重啟Apache、mysql服務(注意這里和centos6有區別,Cenots7+不能使用6的方式)

systemctl start httpd.service #啟動apache

systemctl stop httpd.service #停止apache

systemctl restart httpd.service #重啟apache

systemctl enable httpd.service #設置apache開機啟動

重啟資料庫

#啟動MariaDB

[root@localhost ~]# systemctl start mariadb.service

#停止MariaDB

[root@localhost ~]# systemctl stop mariadb.service

#重啟MariaDB

[root@localhost ~]# systemctl restart mariadb.service

#設置開機啟動

[root@localhost ~]# systemctl enable mariadb.service

五.配置Mysql

初次安裝mysql是沒有密碼的,我們要設置密碼,mysql的默認賬戶為root

方式1:設置 MySQL 數據 root 賬戶的密碼:

[root@localhost ~]# mysql_secure_installation

當出現如下提示時候直接按回車:

Enter current password for root

出現如下再次回車:

Set root password? [Y/n]

出現如下提示輸入你需要設置的密碼,這里輸入了root,輸入密碼是不顯示的,回車後再輸入一次確認:

New password:

接下來還會有四個確認,分別是:

Remove anonymous users? [Y/n]

Disallow root login remotely? [Y/n]

Remove test database and access to it? [Y/n]

Reload privilege tables now? [Y/n]

直接回車即可。

方式2:進入mysql mysql -r

修改mysql密碼:set password for 'root'@'localhost'=password('root');

mysql授權遠程連接(navicat等): grant all on *.* to root identified by 'root';

六.測試環境

我們在瀏覽器地址欄輸入http://ip/,正常顯示,說明我們的lamp 環境搭建成功

七.安裝nginx

yum install yum-priorities -y

wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm

yum install nginx

Nginx 版本號可變更http://nginx.org/packages/centos/7/noarch/RPMS/$版本

八.配置nginx

1.nginx啟動,停止,重啟

systemctl start nginx.service #啟動nginx

systemctl stop nginx.service #停止

systemctl restart nginx.service #重啟

systemctl enable nginx.service #設置開機啟動

5.在 /usr/share/nginx/html中新建一個test.php

訪問http://ip:81/test.php即可看到php頁面

修改完成配置記得啟動apache 和php-fpm 哦!

九.負載配置

upstream site{

server 172.16.170.138;

server 172.16.170.139;

}

server {

listen 80;

server_name localhost;

#charset koi8-r;

#access_log /var/log/nginx/log/host.access.log main;

location / {

root /usr/share/nginx/html;

index index.html index.htm;

proxy_pass http://site;

}

apache 默認目錄 /var/www/html

nginx 默認目錄 /usr/share/nginx/html

升級php版本

centos7 默認安裝php是5.4

查看yum的可安裝的php版本列表

yum provides php

開始升級PHP更新源:

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

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

yum remove php-common -y #移除系統自帶的php-common

php72版本

yum install -y php72w php72w-opcache php72w-xml php72w-mcrypt php72w-gd php72w-devel php72w-mysql php72w-intl php72w-mbstring

php56版本

yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring #安裝依賴包

查看php版本

php -v

安裝php fpm:

yum install php72w-fpm

yum provides php-fpm #因為我是准備搭建lnmp,所以安裝php-fpm,這里會提示多個安裝源,選擇5.6版本的安裝就可以了

yum install php56w-fpm-5.6.31-1.w7.x86_64 -y

systemctl start php-fpm.service 【啟動】

systemctl enable php-fpm.service【開機自啟動】

CentOS yum有時出現「Could not retrieve mirrorlist 」的解決辦法——resolv.conf的配置

原因:沒有配置resolv.conf

解決方法:

到/etc目錄下配置resolv.conf加入nameserver IP,如:

nameserver 8.8.8.8

nameserver 8.8.4.4

search localdomain

保存再次運行上面的命令就可以。

https://blog.csdn.net/mao834099514/article/details/73470001

nginx目錄 : /usr/share/nginx/html

/etc/nginx/conf.d/default.conf nginx配置目錄

apache目錄 : /var/www/html

/etc/httpd/conf/httpd.conf apache配置文件

nginx 配置域名

cd /etc/nginx

cp default.conf imooc.conf

修改server_name imooc.test.com 以及項目目錄

配置虛擬域名 windows 訪問需要在host增加 linuxip

ServerName www.nine.com

DocumentRoot "/var/www/html/learnlaravel/public"

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

關閉防火牆

setenforce 0

③ 怎樣用install。php安裝網站

如果是你在網上下載的開源軟體··直接輸入域名/install.php或者域名/install/ 就會進入安裝頁面··一步步點就好啦···

④ 伺服器上怎麼安裝php程序

你好,如果你的伺服器是Windows系統,那麼你需要遠程到你的伺服器,進行啟動IIS(asp環境),如果你需要php環境,你可以從xp.cn(小皮)或者bt.cn(寶塔)安裝面板
如果你的伺服器是Linux,建議使用寶塔
打開終端,不同Linux系統的輸入指令不同:
Centos安裝腳本
終端輸入:yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
Ubuntu/Deepin安裝腳本
終端輸入:wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
Debian安裝腳本
終端輸入:wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
Fedora安裝腳本
終端輸入wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh
輸入後進行安裝就可以了

⑤ 用install.php安裝是出錯

是否已經選擇資料庫,先use 資料庫一下再試試

⑥ 在本地如何安裝這個Install.php文件

使用環境包phpstudy即可。解壓即可配好php環境,還帶站點設置。phpstudy支持26種組合一鍵切換。

⑦ thinkphp5開發的程序怎麼做install安裝文件

⑧ 菜鳥問題:如何運行/install.php安裝程序呢

IIS 要運行 PHP 的話要進行一系列的設置。

IIS本身是為ASP而設計的程序。

windows IIS 下配置PHP的詳細設置方法

http://bbs.chuxueit.com/viewthread.php?tid=176&highlight=php

還有一種更簡單的方法,就是使用 Apache 伺服器,集成的PHP伺服器。

只要把php文件放在目錄下,即可運行php程序。

⑨ PHP 配置本地的 discuz6.0.0 時 找到本地discuz中的 install.php安裝報錯

按提示是代碼問題 有兩個可能性
一是環境 php的環境有可能不完善
二是程序本身 install存在問題 可以重新放文件試試

但是你情況特殊
你使用的discuz6.0 這個版本多年之前就停止更新了
存在很多漏洞
關鍵是官方的版本 貌似後期已經不支持安裝
所以很多網上放出來的 都是第三方修改過的版本...
存在問題甚至是隱患都不足為奇

所以建議你 安裝最新版程序測試
也建議更換其他php環境進一步調試

⑩ 怎麼安裝微擎 install.php

下載在線版完成後,解壓文件夾,其實就是一個PHP腳本文件,將install.php的腳本文件放在我們的項目根目錄中,然後運行,訪問,http://你的域名/install.php,就是運行你的install.php腳本。

閱讀全文

與installphp安裝相關的資料

熱點內容
體重小本app怎麼樣 瀏覽:777
編程語言需求 瀏覽:935
當兵體重怎麼個演算法 瀏覽:169
加密的電腦文件帶出去怎麼打開 瀏覽:849
死循環會在編譯的時候出錯嗎 瀏覽:986
c51單片機特殊寄存器的原理 瀏覽:578
閃耀永恆特利加密鑰 瀏覽:761
如何誇程序員 瀏覽:779
天津期貨python招聘 瀏覽:265
單片機機器語言寫的程序 瀏覽:553
韓國直播軟體app叫什麼名 瀏覽:920
軍營訓練不聽教官的命令 瀏覽:263
v開頭的音樂播放器是什麼APP 瀏覽:121
單片機是怎麼做出來的 瀏覽:318
博圖怎麼作為opc伺服器 瀏覽:102
編譯做題軟體 瀏覽:298
橋梁檢測pdf 瀏覽:689
化解壓力的一種方法 瀏覽:684
路由器和DSN伺服器有什麼區別 瀏覽:551
android伸縮控制項 瀏覽:861