layout: post
xampp配置使用
subtitle: xampp配置使用 date: 2020-05-27 author: BY jcleng header-img: img/post-bg-kuaidi.jpg catalog: true tags: - mac - 软件 - 笔记本
Apache配置域名
# 去除注释,开启虚拟域名,保存,且把端口配置为 801
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
# 编辑虚拟主机配置文件,就是该文件,文件的绝对路径:
code /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
# 注释全部,添加如下
<VirtualHost *:801>
ServerAdmin [email protected]
DocumentRoot "/Users/jcleng/work/promake/tpAdmin/public"
ServerName lxx.test.net
# ErrorLog "/Users/yourname/Dev/xiaohua.com/error_log"
# CustomLog "/Users/yourname/Dev/xiaohua.com/access_log" common
<Directory "/Users/jcleng/work/promake/tpAdmin/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
mysql密码配置
# 修改密码(默认密码为空)
/Applications/XAMPP/xamppfiles/bin/mysqladmin -uroot password '123456'
# http://127.0.0.1:801/dbninja/
httpd-vhosts.conf原文
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
# <VirtualHost *:80>
# ServerAdmin [email protected]
# DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host.example.com"
# ServerName dummy-host.example.com
# ServerAlias www.dummy-host.example.com
# ErrorLog "logs/dummy-host.example.com-error_log"
# CustomLog "logs/dummy-host.example.com-access_log" common
# </VirtualHost>
# <VirtualHost *:80>
# ServerAdmin [email protected]
# DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host2.example.com"
# ServerName dummy-host2.example.com
# ErrorLog "logs/dummy-host2.example.com-error_log"
# CustomLog "logs/dummy-host2.example.com-access_log" common
# </VirtualHost>
<VirtualHost *:801>
ServerAdmin webmaster@xiaohua.com
DocumentRoot "/Users/jcleng/work/promake/tpAdmin/public"
ServerName lxx.test.net
# ErrorLog "/Users/yourname/Dev/xiaohua.com/error_log"
# CustomLog "/Users/yourname/Dev/xiaohua.com/access_log" common
<Directory "/Users/jcleng/work/promake/tpAdmin/public">
Options Indexes FollowSymLinks MultiViews
# 全部允许
allow from all
# 没有默认首页,展示脚本的列表
Options indexes
# 配置默认首页
DirectoryIndex index.php index.html
# 重写模式权限,tp5等需要配置
AllowOverride All
# 访问目录有权限
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:801>
ServerAdmin webmaster@xiaohua.com
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/dbninja"
ServerName lxx.db.net
<Directory "/Applications/XAMPP/xamppfiles/htdocs/dbninja">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
mac 安装 redis 服务器(4.0)
brew install [email protected]
# 安装成功提示如下:
➜ ~ brew install [email protected]
Updating Homebrew...
Warning: [email protected] has been deprecated!
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles/re
==> Downloading from https://akamai.bintray.com/a3/a3da3a3af97a3ca5c36c2399defd0
######################################################################## 100.0%
==> Pouring [email protected]_1.catalina.bottle.tar.gz
==> Caveats
[email protected] is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have [email protected] first in your PATH run:
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
To have launchd start [email protected] now and restart at login:
brew services start [email protected]
Or, if you don't want/need a background service you can just run:
/usr/local/opt/[email protected]/bin/redis-server /usr/local/etc/redis.conf
==> Summary
🍺 /usr/local/Cellar/[email protected]/4.0.14_1: 13 files, 2.8MB
# 放到变量环境中
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
# 跑起来
redis-server