标签:org 通用 www apply date git mkdir 一键 arch
github
首先在虚拟机下载ssh服务 (如果xshell连接不上)
apt install openssh-server
通过ifconfig查看ip连接xshell
下载安装解压
apt-get install unzip
一键安装php、nginx 地址https://github.com/centos-bz/ezhttp
wget https://github.com/centos-bz/ezhttp/archive/master.zip?time=$(date +%s) -O ezhttp.zip
unzip ezhttp.zip
cd ezhttp-master
chmod +x start.sh
./start.sh
更新源
apt update (root)
修改IP:vim /etc/netplan/xxx.yaml
addresses [192.168.81.135/24]
netplan apply 网络配置生效
ifconfig 查看网络配置信息
安装 git
apt install git
配置php-fpm
vim /usr/local/php/etc/php-fpm.d/www.conf
user = xxx (普通用户)
group = xxx (普通用户)
修改环境变量 PATH
vim /etc/profile
PATH=$PATH:
source /etc/profile 生效环境变量
安装composer
wget https://getcomposer.org/download/1.8.5/composer.phar
mv composer.phar composer
chmod +x composer
mv composer /usr/bin
安装composer出错 /usr/bin/env: php: No such file or directory
因为环境变量没source /etc/profile
Redis:
编译源码包安装 https://redis.io/
源码包地址 wget http://download.redis.io/releases/redis-5.0.5.tar.gz
1 tar xzf redis-5.0.5.tar.gz
2 make
3
mkdir -p /usr/local/redis/bin
cp src/redis-server /usr/local/redis/bin
cp src/redis-cli /usr/local/redis/bin
4 修改环境变量
vim /etc/profile
:/usr/local/redis/bin
5 source /etc/profile
Laravel中配置Redis
安装 Redis扩展 http://pecl.php.net/
源码包:http://pecl.php.net/get/redis-4.3.0.tgz
安装Redis扩展步骤:
1 phpize
2 ./configure
3 make && make install
4 修改php.ini
extension = redis.so
标签:org 通用 www apply date git mkdir 一键 arch
原文地址:https://www.cnblogs.com/blogwwl/p/11131006.html