您的位置:首页 > 博客中心 > 网络系统 >

Linux_lampp(xampp)

时间:2022-04-03 13:15

1 什么是lampp???

网上搜了下大致是这样:

lampp=xampp    #改名称为xampp,是因为和lampp环境模块有冲突

XAMPP(Apache+MySQL+PHP+PERL))是一个功能强大的建站集成软件包

  01 安装Apache

  • yum install -y httpd   #yum命令安装
    • rpm -qa | grep httpd  #检查是否安装httpd
  • /etc/init.d/httpd start  #启动httpd
    • ps -ef | grep httpd     #检查进程是否启动
    • service httpd start    #这个也可以查看是否运行
  • /etc/init.d/httpd stop     #停止httpd
  • chkconfig httpd on     #设置开机自启动
  • 学到的小技巧
    • 给路径取个名字-别名,下次直接执行别名,就可以,不行用别名直接unalias  别名
    • vim ~/.bash_profile    #编辑
    • 加入想要设置的变量:alias  变量名=‘执行路径‘,如,alias httpd_start=‘/etc/init.d/httpd start‘  保存
    • source ~/.bash_profile  #重载资源文件
    • 执行httpd_start     #等同于/etc/init.d/httpd start
    • unalias httpd_start取消别名

注:

这块遇到一个恨奇怪的问题,启动时提示

正在启动 httpd:httpd: apr_sockaddr_info_get() failed for root
httpd: Could not reliably determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName

 后来午饭后,电脑锁屏后网络中断,再次开屏后,竟然没这个问题了。。。。不过还是在网上搜了下相关资料,避免后续出现类似问题,一头雾水:

参考文章:http://blog.csdn.net/u010187139/article/details/50885071  

复制文章中如下方案:

vi /etc/httpd/conf/httpd.conf #编辑

找到 #ServerName www.example.com:80

修改为ServerName www.1000seo.com:80 #这里设置为你自己的域名,

如果没有域名,可以设置为localhost :wq! #保存退出      

  02 安装MySQL

参考文章:http://blog.csdn.net/u010187139/article/details/50885071

  03 安装PHP

 

本类排行

今日推荐

热门手游