关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

腾讯云服务器如何安装apache

发布时间:2019-12-11 12:27:21

云服务器如何安装apache?Apache是目前世界上非常流行的web服务器,以云服务器 centos系统为例,在上面安装apache非常简单。

利用yum命令安装apache

yum install httpd -y

执行完成之后,使用Systemctl start httpd 将apache加入开机命令中

systemctl enable httpd

简单介绍一下apache目录

网站数据主要存放在 /var/www/html

运行日志 /var/log/httpd/access_log

错误日志 /var/log/httpd/error_log

apache常搭配PHP语言使用,php是目前较为流行的后端语言,接下来简单介绍一下如何安装。

yum localinstall -y http://mirror.webtatic.com/yum/el7/webtatic-release.rpm 更新rpm包

yum -y install php71w php71w-cli php71w-common php71w-devel

php71w-embedded php71w-gd php71w-mcrypt php71w-mbstring php71w-pdo php71w-xml php71w-fpm

php71w-mysqlnd php71w-opcache php71w-pecl-memcached php71w-pecl-redis php71w-pecl-mongodb

安装php7.1

systemctl start php-fpm

systemctl enable php-fpm

可以将php设置为开机自启



/template/Home/Zkeys/PC/Static