linux centos 安装xampp
2016-01-19 19:05
666 查看
安装xampp
1、xampp下载地址:
https://www.apachefriends.org/zh_cn/download.html
wget url(你选择的版本地址)
2. 添加执行权限
chmod a+x xampp-linux-x64-1.8.3-a-installer.run
3.安装执行
./xampp-linux-x64-1.8.3-1-installer.run
4、安装后的文件在 /opt/lamp
5.启动xampp:
/opt/lampp/xampp start
/opt/lampp/xampp stop
6. 启用phpmyadmin
/opt/lampp/etc/extra/httpd-xampp.conf
将下面的phpmyadmin去掉即可
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
7. 数据库操作
备份:/opt/lampp/bin/mysqldump --user=root --password="" test > test20160120.sql
创建:/opt/lampp/bin/mysql --user=root --password="" -e "CREATE DATABASE myblog CHARACTER SET utf8 COLLATE utf8_general_ci"
恢复:/opt/lampp/bin/mysql --user=root --password="" --database=myblog < test20160120.sql
登录:/opt/lampp/bin/mysql --user=root --password=""
配置密码:/opt/lampp/bin/mysqladmin --user=root password "newpassword"
再次修改密码:/opt/lampp/bin/mysqladmin --user=root --password="newpassword" password "newnewpassword"
/opt/lampp/bin/mysql --user=root --password="root"
8. 添加域名
/opt/lampp/etc/httpd.conf去掉“#”
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
/opt/lampp/etc/extra/httpd-vhosts.conf
添加域名:
<VirtualHost *:80>
ServerAdmin zhoushengchao@mhjk.cc
DocumentRoot "/opt/lampp/htdocs/xiaoshouguanli/"
ServerName xiaoshouguanli.sh1.newtouch.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/xiaoshouguanli.sh1.newtouch.com-error_log"
CustomLog "logs/xiaoshouguanli.sh1.newtouch.com-access_log" common
</VirtualHost>
重启服务即可
8. 卸载xampp
#/opt/lampp/xampp stop
#rm -rf /opt/lampp
1、xampp下载地址:
https://www.apachefriends.org/zh_cn/download.html
wget url(你选择的版本地址)
2. 添加执行权限
chmod a+x xampp-linux-x64-1.8.3-a-installer.run
3.安装执行
./xampp-linux-x64-1.8.3-1-installer.run
4、安装后的文件在 /opt/lamp
5.启动xampp:
/opt/lampp/xampp start
/opt/lampp/xampp stop
6. 启用phpmyadmin
/opt/lampp/etc/extra/httpd-xampp.conf
将下面的phpmyadmin去掉即可
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
7. 数据库操作
备份:/opt/lampp/bin/mysqldump --user=root --password="" test > test20160120.sql
创建:/opt/lampp/bin/mysql --user=root --password="" -e "CREATE DATABASE myblog CHARACTER SET utf8 COLLATE utf8_general_ci"
恢复:/opt/lampp/bin/mysql --user=root --password="" --database=myblog < test20160120.sql
登录:/opt/lampp/bin/mysql --user=root --password=""
配置密码:/opt/lampp/bin/mysqladmin --user=root password "newpassword"
再次修改密码:/opt/lampp/bin/mysqladmin --user=root --password="newpassword" password "newnewpassword"
/opt/lampp/bin/mysql --user=root --password="root"
8. 添加域名
/opt/lampp/etc/httpd.conf去掉“#”
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
/opt/lampp/etc/extra/httpd-vhosts.conf
添加域名:
<VirtualHost *:80>
ServerAdmin zhoushengchao@mhjk.cc
DocumentRoot "/opt/lampp/htdocs/xiaoshouguanli/"
ServerName xiaoshouguanli.sh1.newtouch.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/xiaoshouguanli.sh1.newtouch.com-error_log"
CustomLog "logs/xiaoshouguanli.sh1.newtouch.com-access_log" common
</VirtualHost>
重启服务即可
8. 卸载xampp
#/opt/lampp/xampp stop
#rm -rf /opt/lampp
相关文章推荐
- Hadoop在Linux下伪分布式的安装 以及wordcount实例的运行
- centos6.7 安装gitlab
- linux无锁化编程--__sync_fetch_and_add系列原子操作函数
- linux文件系统
- centos静态联接编译程序时出错
- centos 下配置 yum 全!
- CentOS下Git的服务器版安装和使用
- linux下配置本地yum源仓库
- linux使用wget
- Linux 动画显示
- Linux内核-源码目录结构分析
- Linux下mysql中文乱码问题
- linux grep 正则表达式
- centos6 安装多个mysql5.7.10
- linux加密文件系统
- Linux系统下Hadoop环境的搭建
- centos 6 编译emacs-24.5
- Centos7修改profile错误导致命令行不能用,情况的解救方案
- Linux下" >/dev/null 2>&1 "相关知识说明
- 转: Linux与JVM的内存关系分析