阿里雲伺服器安裝配置Apache php伺服器

2021-06-23 00:49:28 字數 623 閱讀 8749

一、ssh登陸阿里雲伺服器

執行命令:

yum install  php

二、啟動apache+php伺服器

命令:httpd -k start

異常:httpd: could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for servername

處理:find -name httpd.conf

編輯httpd.conf檔案,搜尋"#servername",新增servername localhost:80

如:[root@server conf]# vi httpd.conf

#servername www.example.com:80

servername localhost:80

再重新啟動apache 即可。

三、通過ftp上傳html或php專案檔案到/var/www/html

如:上傳檔案為test.html或test.php

四、訪問阿里雲apahe+php伺服器

如:在瀏覽器中輸入:阿里雲公網ip/test.html/php 訪問阿里雲伺服器

至此配置結束。

阿里雲redis伺服器安裝配置

使用yum安裝 yum install redis 配置redis.conf檔案 vi etc redis.conf 如果要在外網訪問訪問你的redis伺服器,將阿里雲的公網ip加到ping 127.0.0.1後面 新增訪問密碼,新增 requirepass yourpassword 重啟服務 se...

阿里雲ECS伺服器安裝配置MongoDB

本人阿里雲ecs伺服器安裝的作業系統為centos 7.3 64位。需要安裝mongodb,因為網上的教程大多比較老了,所以自己結合各種教程總結了一下,親測可用。不熟悉linux命令的小夥伴可自行搜尋。curl otar zxvf mongodb linux x86 64 3.2.9.tgz將解壓後...

FTP安裝配置(內含阿里雲伺服器配置方法)

yum y install ftp 客戶端 yum y install vsftpd 服務端 刪除 yum y remove ftp 客戶端 yum y remove vsftpd 服務端 ftp passive 切換主動模式與被動模式 passive為on時,被動模式開啟 systemctl st...