- 浏览: 804022 次
- 性别:
- 来自: 南京
文章分类
最新评论
-
xieye:
jetty插件有好几个版本,1.6,1.7,1.8
我选的是用 ...
tapestry入门(翻译)3 导入项目到eclipse -
xieye:
还有,
注:第2部分时,需要先安装jetty,我自己在安装过程 ...
tapestry入门(翻译)3 导入项目到eclipse -
xieye:
说明一下:实际使用中,导入时我并没有错误。2、我把eclips ...
tapestry入门(翻译)3 导入项目到eclipse -
xieye:
其实还是有一些先决条件的。1是外部环境,2是进步是阶段性的(意 ...
(转载文章)如何愉悦起来:一位精神治疗师的见解 -
mandy_yanzi:
我都已经饿7天了坚持为了我的衣衣
身体健康的问题
centos8 使用阿里镜像快速安装php7.4套件
本文只考虑centos8
今日日期:2020-11-16
所谓套件:指php相关的各类软件集合。
remi是一个php安装仓库。是rpm包。
经实测,全部安装时间大约2分钟,包括下面全部的软件(不含操作系统本身)
本文各软件版本
centos 8
php 7.4.12
nginx 1.18
mysql 8.0.21
redis 5.0.3 其实稳定版 6 已经出来了,这里不讲究了。
git 2.18.4
首先,安装阿里的centos仓库。
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
rm -f /etc/yum.repos.d/CentOS-centosplus.repo
rm -f /etc/yum.repos.d/CentOS-PowerTools.repo
rm -f /etc/yum.repos.d/CentOS-Extras.repo
rm -f /etc/yum.repos.d/CentOS-AppStream.repo
dnf makecache
dnf repolist
然后安装 阿里的epel仓库。
dnf install -y epel-release
sed -i 's|^#baseurl=https://download.fedoraproject.org/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
dnf makecache
dnf repolist
然后安装阿里的remi的仓库
dnf install -y https://mirrors.aliyun.com/remi/enterprise/remi-release-8.rpm
sed -i 's/https*:\/\/rpms.remirepo.net/https:\/\/mirrors.aliyun.com\/remi/g' /etc/yum.repos.d/remi*
sed -i 's/#baseurl/baseurl/g' /etc/yum.repos.d/remi*
快如闪电的最关键是下一句,清除镜像列表!!否则又去读取国外的镜像了。
sed -i 's|^mirrorlist|#mirrorlist|' /etc/yum.repos.d/remi*
dnf makecache
dnf repolist
安装php
dnf install -y yum-utils
dnf install -y php74 php74-php-devel php74-php-fpm php74-php-mbstring php74-php-memcache php74-php-memcached php74-php-redis php74-php-mysqlnd php74-php-pdo php74-php-bcmath php74-php-xml php74-php-gd php74-php-gmp php74-php-igbinary php74-php-imagick php74-php-mcrypt php74-php-pdo_mysql php74-php-posix php74-php-simplexml php74-php-opcache php74-php-xsl php74-php-xmlwriter php74-php-xmlreader php74-php-swoole php74-php-zip php74-php-phalcon php74-php-yaml php74-php-yar php74-php-yaf php74-php-uuid
体验到快如闪电的速度了吧!
安装阿里的 composer 镜像源
ln -s /usr/bin/php74 /usr/bin/php
curl -o /usr/local/bin/composer https://mirrors.aliyun.com/composer/composer.phar
chmod +x /usr/local/bin/composer
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
注意观察,确认安装成功,且大版本是2.0
composer -V
安装 nginx 1.18 并整合 php-fpm 服务
下面这个echo是一句命令,得一起复制
echo $'[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true ' > /etc/yum.repos.d/nginx.repo
上面是一条echo命令。
dnf makecache
dnf install -y nginx
systemctl enable nginx
systemctl enable php74-php-fpm
sed -i 's/user\ =\ apache/user\ =\ nginx/g' /etc/opt/remi/php74/php-fpm.d/www.conf
sed -i 's/group\ =\ apache/group\ =\ nginx/g' /etc/opt/remi/php74/php-fpm.d/www.conf
sed -i 's/listen\ =\ \/var\/opt\/remi\/php74\/run\/php-fpm\/www.sock/listen=9000/g' /etc/opt/remi/php74/php-fpm.d/www.conf
rm -f /etc/nginx/conf.d/default.conf
vi /etc/nginx/conf.d/default.conf
server {
listen 80;
server_name localhost;
charset utf-8 ;
access_log /var/log/nginx/host.access.log main;
root /usr/share/nginx/html;
index index.php index.html index.htm;
error_page 404 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
}
vi /usr/share/nginx/html/1.php
<?php
phpinfo();
systemctl start nginx
systemctl start php74-php-fpm
curl localhost/1.php
如果能看到很多的大量输出,说明php和nginx正确安装了。
安装mysql 8
实际也用了阿里的镜像,因为是从AppStream库下载的。
dnf install -y @mysql
systemctl enable mysqld
systemctl start mysqld
mysql -uroot
上面的命令就可以登陆。
说明,用此方法安装好的mysql服务默认账号root,默认密码空
安装redis,git 以及其他常用库
dnf install -y git wget vim redis zip unzip p7zip rsync crontabs supervisor net-tools python3
git config --global core.autocrlf false
git config --global core.safecrlf false
systemctl enable redis
systemctl start redis
总结
用了国内镜像会速度极快,下载包的速度:3MB/秒,惊人的快!
无论docker还是linux环境都非常的快!!
整个安装过程就是吃着阿里,喝着阿里,真想唱支山歌给阿里听~
本文只考虑centos8
今日日期:2020-11-16
所谓套件:指php相关的各类软件集合。
remi是一个php安装仓库。是rpm包。
经实测,全部安装时间大约2分钟,包括下面全部的软件(不含操作系统本身)
本文各软件版本
centos 8
php 7.4.12
nginx 1.18
mysql 8.0.21
redis 5.0.3 其实稳定版 6 已经出来了,这里不讲究了。
git 2.18.4
首先,安装阿里的centos仓库。
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
rm -f /etc/yum.repos.d/CentOS-centosplus.repo
rm -f /etc/yum.repos.d/CentOS-PowerTools.repo
rm -f /etc/yum.repos.d/CentOS-Extras.repo
rm -f /etc/yum.repos.d/CentOS-AppStream.repo
dnf makecache
dnf repolist
然后安装 阿里的epel仓库。
dnf install -y epel-release
sed -i 's|^#baseurl=https://download.fedoraproject.org/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
dnf makecache
dnf repolist
然后安装阿里的remi的仓库
dnf install -y https://mirrors.aliyun.com/remi/enterprise/remi-release-8.rpm
sed -i 's/https*:\/\/rpms.remirepo.net/https:\/\/mirrors.aliyun.com\/remi/g' /etc/yum.repos.d/remi*
sed -i 's/#baseurl/baseurl/g' /etc/yum.repos.d/remi*
快如闪电的最关键是下一句,清除镜像列表!!否则又去读取国外的镜像了。
sed -i 's|^mirrorlist|#mirrorlist|' /etc/yum.repos.d/remi*
dnf makecache
dnf repolist
安装php
dnf install -y yum-utils
dnf install -y php74 php74-php-devel php74-php-fpm php74-php-mbstring php74-php-memcache php74-php-memcached php74-php-redis php74-php-mysqlnd php74-php-pdo php74-php-bcmath php74-php-xml php74-php-gd php74-php-gmp php74-php-igbinary php74-php-imagick php74-php-mcrypt php74-php-pdo_mysql php74-php-posix php74-php-simplexml php74-php-opcache php74-php-xsl php74-php-xmlwriter php74-php-xmlreader php74-php-swoole php74-php-zip php74-php-phalcon php74-php-yaml php74-php-yar php74-php-yaf php74-php-uuid
体验到快如闪电的速度了吧!
安装阿里的 composer 镜像源
ln -s /usr/bin/php74 /usr/bin/php
curl -o /usr/local/bin/composer https://mirrors.aliyun.com/composer/composer.phar
chmod +x /usr/local/bin/composer
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
注意观察,确认安装成功,且大版本是2.0
composer -V
安装 nginx 1.18 并整合 php-fpm 服务
下面这个echo是一句命令,得一起复制
echo $'[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true ' > /etc/yum.repos.d/nginx.repo
上面是一条echo命令。
dnf makecache
dnf install -y nginx
systemctl enable nginx
systemctl enable php74-php-fpm
sed -i 's/user\ =\ apache/user\ =\ nginx/g' /etc/opt/remi/php74/php-fpm.d/www.conf
sed -i 's/group\ =\ apache/group\ =\ nginx/g' /etc/opt/remi/php74/php-fpm.d/www.conf
sed -i 's/listen\ =\ \/var\/opt\/remi\/php74\/run\/php-fpm\/www.sock/listen=9000/g' /etc/opt/remi/php74/php-fpm.d/www.conf
rm -f /etc/nginx/conf.d/default.conf
vi /etc/nginx/conf.d/default.conf
server {
listen 80;
server_name localhost;
charset utf-8 ;
access_log /var/log/nginx/host.access.log main;
root /usr/share/nginx/html;
index index.php index.html index.htm;
error_page 404 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
}
vi /usr/share/nginx/html/1.php
<?php
phpinfo();
systemctl start nginx
systemctl start php74-php-fpm
curl localhost/1.php
如果能看到很多的大量输出,说明php和nginx正确安装了。
安装mysql 8
实际也用了阿里的镜像,因为是从AppStream库下载的。
dnf install -y @mysql
systemctl enable mysqld
systemctl start mysqld
mysql -uroot
上面的命令就可以登陆。
说明,用此方法安装好的mysql服务默认账号root,默认密码空
安装redis,git 以及其他常用库
dnf install -y git wget vim redis zip unzip p7zip rsync crontabs supervisor net-tools python3
git config --global core.autocrlf false
git config --global core.safecrlf false
systemctl enable redis
systemctl start redis
总结
用了国内镜像会速度极快,下载包的速度:3MB/秒,惊人的快!
无论docker还是linux环境都非常的快!!
整个安装过程就是吃着阿里,喝着阿里,真想唱支山歌给阿里听~
发表评论
-
召唤神龙 - 安装 centos 8, php 8, mysql 8, laravel 8 的整套 php 运行环境
2020-11-27 16:26 552本文编写时间:2020-11-27 传说集齐龙珠可以召唤神 ... -
centos7 使用阿里镜像快速安装php7.4套件
2020-11-15 00:32 1000本文只考虑centos7 今日 2020-11-16 rem ... -
composer常用命令
2020-11-05 14:46 1003列出当前全局配置 composer config -l -g ... -
期待centos8+php8 + mysql8 + laravel8,8888
2020-10-29 19:24 379期待centos8+php8 + mysql8 目前主要使用 ... -
ubuntu 安装 php7.4以及各类插件
2020-10-24 13:20 895ubuntu 安装 php7.4以及各类插件 安装系统 最近 ... -
宝塔定义站点
2020-02-24 10:41 2宝塔定义站点。 1111111111111111111111 ... -
让php-fpm以root账号运行
2020-02-19 21:41 692一般来说,我们没有这种需求,但是当需要时, 可以让php-fp ... -
将代码部署到coding.net
2020-01-10 14:20 538coding.net 是一个git仓库,有免费有收费。 首先 ... -
php部署工具deployer技巧 - vendor目录创建
2020-01-06 12:06 805deployer是个好东西,可是每次都composer ,其实 ... -
自定义redis多个实例
2020-01-04 01:17 577假如多个项目部署到同一台服务器,有时会被redis的各项目前缀 ... -
推荐使用php的部署工具 deployer
2020-01-03 16:48 806php部署代码可以使用 https://deployer.or ... -
使用composer 类库 cachetool 清除opcache 的缓存
2020-01-03 16:38 876php的生产服务器上,需要把opche打开。 但有时,会被缓 ... -
laravel容器学习体会
2019-12-31 15:11 566根据文档与实测结果 假设我在app下建一个Services目 ... -
phalcon 自定义超强日志类
2019-12-18 10:00 759phalcon自带的日志文件类,有两个麻烦之处。 1、路径不能 ... -
自定义后台的使用
2019-12-18 05:22 361如果自己写后台,保存用户的表单请求值 所有的情况如下: 1 ... -
phalcon 自定义事件使用的多种方式
2019-12-16 20:43 710方法1:官方文档的方式。 这是控制器: public ... -
phalcon对控制器返回值的使用以输出json
2019-12-16 19:17 728在phalcon里,控制器的Action的方法的返回值没啥用。 ... -
phalcon数据库DB使用实例
2019-12-12 17:12 587整理了一下phalcon的db使用,写了个demo。 ... -
php-redis5.0降级成php-redis4.3
2019-08-22 00:01 834最新版本的php的redis插件,版本是5.0 但是可能会有 ... -
aes加密解密php和java互通代码
2019-08-20 20:19 1080代码主要来源如下,但是注意做了修改: https://gist ...
相关推荐
Centos7.4.1708版本最小化安装镜像 附件内容: CentOS-7-x86_64-Minimal-1708.iso CentOS-7-x86_64-Minimal-1708.torrent
CentOS7.4环境安装MySQL5.7步骤,包括环境准备,依赖包的安装等
通过rpm软件包在centos7.4安装docker,附件中包含rpm包和安装指导
使用docker pull 拉下的镜像并使用docker save保存的,可以使用docker load -i导入
centos7源码安装php-7.4.19和常用扩展,centos7.8下测试通过。
CentOS7.4 安装mongodb
本指南提供了在 CentOS 8 / RHEL 8 Linux 系统上安装 PHP 7.4 的步骤。有兴趣的开发者已经可以在生产环境中使用使用 PHP 7.4,正式版本的官方发布时间为2019 年 11 月 28 日。 请按照以下步骤在 CentOS 8 / RHEL 8 ...
CentOS-7.4-x86_64-DVD-1708 ISO镜像-Linux工具类资源 可以在虚拟机上安装Centos7.4系统,学习linux,附件为百度云链接
CentOS 7 2009版镜像文件,内附下载安装全套教程 CentOS 7是CentOS项目发布的开源类服务器操作系统,于2014年7月7日正式发布。 [1] CentOS 7是一个企业级的Linux发行版本,它源于RedHat免费公开的源代码进行再发行...
附件包含redhat 7.0 64位镜像资源 和 centos 7.4 64位镜像资源
Centos7系列所有镜像文件,分享到了百度网盘,大家可以直接下载使用。 分享仅用作学术交流使用,未对原作进行任何修改,如有版权争议请私信我删除分享链接,感谢。
DELL R750/740服务器H750/H755 raid卡 安装CentOS/RHEL7.4/7.5/7.6/7.7操作系统
ioncube11 for centos版,支持php7.1-php7.4版本,将目录里so文件全部拷贝到php下的module目录下,将00-ioncube.ini文件拷贝到/etc/php.d/里,重新启动apache服务,将里面loader-wizard.php文件拷贝到网站根目录下,...
本文档描述了在centos7.4下PHP环境的安装,安装的软件包括PHP:7.0.33 MySQL: 5.6 Apache: 2.4,本次安装所用的系统为:CentOS Linux release 7.4.1708 (Core)
CentOS7.4 Linux安装步骤详细说明。适合初学者,对还不会安装的人有帮助
centos7.4下安装nginx1.16.0.docx
CentOS7 Docker Tar镜像,