2022-10-23 367
CentOS上15分钟内安装LAMP(适用于所有VPS)
本文适用于所有的vps,测试环境为YARD 128M OPENVZ和IWEBFUSION 256M OPENVZ
非LNMP,非一键安装包
yum-yupdate yum-yinstallgccgcc-c++authconfautomakelibtoollibeventlibevent-devel yum-yinstallncursenucrse-develgdgd-deevelfreetypefreetype-develfontconfigfontconfig-devellibjpeglibjpeg-develzlibzlib-develpcrepcre-devel yum-yinstalllibmcryptmhash yum-yinstallmysqlmysql-servermysql-devel yum-yinstallhttpdhttpd-devel yum-yinstallphp*
启动apache
/etc/init.d/httpdrestart
启动mysql
/etc/init.d/mysqldrestart
编辑一个php测试文件
vi/var/www/html/info.php
加入:
现在可以通过http://ip/info.php查看LAMP信息了
例如我的测试机地址是
http://64.34.205.27/info.php
设置开机启动
chkconfighttpdon chkconfigmysqldon
附:如果需要修改的话,那么修改配置文件即可。
附1:mysql配置文件所在位置:
#ls-l/etc/my.cnf -rw-r--r--1rootroot441Nov402:53/etc/my.cnf #
附2:apache配置文件所在位置:
#ls-l/etc/httpd/total 8
drwxr-xr-x 2 root root 4096 Jan 11 07:06 conf
drwxr-xr-x 2 root root 4096 Jan 11 07:03 conf.d
lrwxrwxrwx 1 root root 19 Jan 11 06:53 logs -> ../../var/log/httpd
lrwxrwxrwx 1 root root 27 Jan 11 06:53 modules -> ../../usr/lib/httpd/modules
lrwxrwxrwx 1 root root 13 Jan 11 06:53 run -> ../../var/run
#
附3:php配置文件所在位置:
#ls-l/etc/php.ini -rw-r--r--1rootroot45079Nov3000:53/etc/php.ini #
原文链接:https://77isp.com/post/8368.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态