mac下远程连接阿里云服务器

    xiaoxiao2022-07-15  151

    个人觉得阿里云自带的控制台命令行真心不好用,还是习惯mac自带的终端 用终端连接阿里云服务器方法:

    #ssh yourName@yourServerIp //其中yourName指服务器登录用户名 yourServerIp指服务器地址

    回车,输入服务器密码,不出意外已经连上了你的服务器,接下来为所欲为吧。

    Apache安装

    yum install httpd

    启动

    systemctl start httpd.service #启动 systemctl stop httpd.service #停止 systemctl restart httpd.service #重启

    第二、设置开机启动/关闭

    systemctl enable httpd.service #开机启动 systemctl disable httpd.service #开机不启动

    第三、检查httpd状态

    systemctl status httpd.service

    关闭防火墙

    关闭:systemctl stop firewalld.service 查看状态:systemctl status firewalld.service

    PHP安装

    yum -y install php

    php各项服务安装:

    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数据库操作命令

    安装:yum -y install mariadb-server mariadb-client 启动:systemctl start mariadb.service 停止:systemctl stop mariadb.service 查看状态:systemctl status mariadb.service 开机启动:systemctl enable mariadb.service 重启:systemctl restart mariadb.service

    经过一番挣扎,决定使用xampp,但是也有问题,在刚更新完服务器文件之后,会有缓存,打开页面会是之前的,所以需要重启一下服务:

    /opt/lampp/lampp restart
    最新回复(0)