mac下遠(yuǎn)程連接阿里云服務(wù)器

個人覺得阿里云自帶的控制臺命令行真心不好用,還是習(xí)慣mac自帶的終端
用終端連接阿里云服務(wù)器方法:

#ssh yourName@yourServerIp  //其中yourName指服務(wù)器登錄用戶名  yourServerIp指服務(wù)器地址

回車,輸入服務(wù)器密碼,不出意外已經(jīng)連上了你的服務(wù)器,接下來為所欲為吧。

Apache安裝

yum install httpd

啟動

systemctl start httpd.service #啟動
systemctl stop httpd.service #停止
systemctl restart httpd.service #重啟

第二、設(shè)置開機啟動/關(guān)閉

systemctl enable httpd.service #開機啟動
systemctl disable httpd.service #開機不啟動

第三、檢查httpd狀態(tài)

systemctl status httpd.service

關(guān)閉防火墻

關(guān)閉:systemctl stop firewalld.service
查看狀態(tài):systemctl status firewalld.service

PHP安裝

yum -y install php

php各項服務(wù)安裝:

yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel php-mysql

MariaDB數(shù)據(jù)庫操作命令

安裝:yum -y install mariadb-server mariadb-client
啟動:systemctl start mariadb.service
停止:systemctl stop mariadb.service
查看狀態(tài):systemctl status mariadb.service
開機啟動:systemctl enable mariadb.service
重啟:systemctl restart mariadb.service

經(jīng)過一番掙扎,決定使用xampp,但是也有問題,在剛更新完服務(wù)器文件之后,會有緩存,打開頁面會是之前的,所以需要重啟一下服務(wù):

/opt/lampp/lampp restart

單獨操作MySQL:

1、進入mysql

XAMPP中的命令工具在/opt/lampp/bin/目錄中,運行mysql命令
/opt/lampp/bin/mysql -uroot -p

2、停止mysql服務(wù)器

sudo /opt/lampp/lampp stopmysql

3、啟動mysql服務(wù)器

sudo /opt/lampp/lampp startmysql

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容