当前位置: 首页 > news >正文

网站开发的可行性报告百度搜索引擎原理

网站开发的可行性报告,百度搜索引擎原理,公司注册代理免费,方维网站建设本文适用:rhel8系列,或同类系统(CentOS8,AlmaLinux8,RockyLinux8等) 文档形成时期:2023年 因系统版本不同,构建部署应略有差异,但本文未做细分,对稍有经验者应不存在明显障碍。 因软件世界之复杂和个人能力…

本文适用:rhel8系列,或同类系统(CentOS8,AlmaLinux8,RockyLinux8等)
文档形成时期:2023年
因系统版本不同,构建部署应略有差异,但本文未做细分,对稍有经验者应不存在明显障碍。
因软件世界之复杂和个人能力之限,难免疏漏和错误,欢迎指正。

文章目录

  • 背景
  • 环境准备
  • 依赖包和必要文件准备
  • php-8.1.20-el8.spec内容
  • 构建
  • 目标服务器安装
  • 支持的模块

背景

不同时期因各种原因经常产生部署LNMP环境的需求,某些场景下需要自定义软件,比如参数、模块、安装路径,或多个版本共存,不能采用Docker等容器环境,采用自主构建RPM包便成了比较快捷的方式之一。

环境准备

yum install rpmdevtools
#创建目录
rpmdev-setuptree
#或手动创建目录:

mkdir rpmbuild-php-8.1.20; cd rpmbuild-php-8.1.20
mkdir -p ./{BUILD,RPMS,SOURCES,SPECS,SRPMS}

依赖包和必要文件准备

#安装扩展源并启用PowerTools
dnf install epel-release
dnf config-manager --set-enabled PowerTools # 在CentOS8上,oniguruma-devel,aspell-devel位于PowerTools,
dnf config-manager --set-enabled powertools # 在Almalinux8上,oniguruma-devel,aspell-devel位于powertools,和CentOS8不同的是小写的。
#如果不启用,会提示:No match for argument: oniguruma-devel,No match for argument: aspell-devel

#通过dnf安装依赖
dnf -y install wget libxml2 libxml2-devel sqlite-devel bzip2-devel libcurl-devel libffi-devel libpng-devel libwebp-devel libjpeg-devel freetype-devel oniguruma oniguruma-devel libzip libzip-devel unixODBC unixODBC-devel freetds freetds-devel libtool-ltdl libtool-ltdl-devel gmp-devel libicu-devel openldap openldap-devel libpq libpq-devel aspell aspell-devel libtidy libtidy-devel libxslt libxslt-devel readline readline-devel libsodium libsodium-devel libjpeg-turbo-utils libXpm-devel systemd-devel openssl openssl-devel

cp -frp /usr/lib64/libldap* /usr/lib/

目录rpmbuild/SOURCES/下面的文件:
opcache.so php-8.1.20.tar.gz php-command.ini php-fpm.conf php.ini redis.so www.conf
目录rpmbuild下面的文件

说明:

  • PHP配置建议参考生产环境的常用配置,准备一个比较通用的;
  • opcache.so和redis.so是同环境下编译好的模块文件,这样可省略在RPM包构建过程中执行编译;

php-8.1.20-el8.spec内容

Name: php
Summary: PHP: Hypertext Preprocessor
Group: Development/Languages
Version: 8.1.20
Release: custom%{?dist}
Source: php-8.1.20.tar.gz
#Icon: php.gif
URL: http://www.php.net/
Packager: PHP Group <group@php.net>
License: GPL%define _prefix  /opt/php81
Prefix:     %{_prefix}%description
Copyright: The PHP license (see "LICENSE" file included in distribution)
PHP is an HTML-embedded scripting language. Much of its syntax is
borrowed from C, Java and Perl with a couple of unique PHP-specific
features thrown in. The goal of the language is to allow web
developers to write dynamically generated pages quickly.%prep%setup -q%build
set -x
# ./buildconf
./configure --prefix=%{_prefix} --sysconfdir=%{_prefix}/etc --with-config-file-path=%{_prefix}/etc --with-openssl --with-zlib --with-bz2 --with-curl --enable-bcmath --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --with-mhash --enable-mbstring --with-imap-ssl --enable-exif --with-ffi --with-zip --enable-sockets --with-pcre-jit --enable-fpm --with-pdo-mysql --enable-pcntl --with-gettext --with-gmp --with-fpm-user=www --with-fpm-group=www --with-fpm-systemd --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-mysqli --enable-mysqlnd --with-pdo-dblib --with-unixODBC --with-pdo-odbc=unixODBC,/usr/ --with-pgsql --with-pdo-pgsql --enable-ftp --enable-dba --enable-calendar --enable-intl --with-ldap --with-pspell --enable-shmop --enable-soap --with-tidy --with-xsl --with-readline --with-sodium
sed -ri "/^EXTRA_LIBS/s/(.*)/\1 -llber/" Makefilemake %{?_smp_mflags}#
# Installation section
#%install
[ %{buildroot} != "/" ] && rm -rf %{buildroot}
# %__make install DESTDIR="%{buildroot}"  # 经实践,该参数不行,要使用下面的INSTALL_ROOT。
make INSTALL_ROOT="%{buildroot}" install%__install -c -d -m 755 "%{buildroot}/opt"
%__install -c -d -m 755 "%{buildroot}%{_prefix}/etc"
%__install -c -d -m 755 "%{buildroot}%{_prefix}/etc/php-fpm.d"
%__install -c -d -m 755 "%{buildroot}/usr/lib/systemd/system"
%__install -c -d -m 755 "%{buildroot}%{_prefix}/lib/php/extensions/no-debug-non-zts-20210902"
cp -f %_sourcedir/{php-command.ini,php.ini,php-fpm.conf} "%{buildroot}%{_prefix}/etc/"
cp -f %_sourcedir/www.conf "%{buildroot}%{_prefix}/etc/php-fpm.d/"
cp -f %_builddir/%{name}-%{version}/sapi/fpm/php-fpm.service "%{buildroot}/usr/lib/systemd/system/php-fpm.service"
cp -f %_sourcedir/redis.so "%{buildroot}%{_prefix}/lib/php/extensions/no-debug-non-zts-20210902/"
cp -f %_sourcedir/opcache.so "%{buildroot}%{_prefix}/lib/php/extensions/no-debug-non-zts-20210902/"#
# Clean section
#%clean
[ %{buildroot} != "/" ] && rm -rf "%{buildroot}"%files
%defattr(-,root,root)
%{_prefix}
# 不在prefix路径下的文件需要单独指定
/usr/lib/systemd/system/php-fpm.service%post
if [ $1 == 1 ];thengroupadd www -g 319 2> /dev/nulluseradd -s /sbin/nologin -M www -u 319 -g 319 2> /dev/nullmkdir /home/www 2> /dev/nullchown www:www /home/www 2> /dev/nullsystemctl daemon-reloadsystemctl enable php-fpm
fi%preun
if [ "$1" = 0 ]
thensystemctl disable php-fpmsystemctl stop php-fpm# userdel wwwcp %{_prefix}/etc/php.ini /opt/php.ini.rpmsave-`date +"%Y%m%d-%H%M%S"`cp %{_prefix}/etc/php-command.ini /opt/php-command.ini.rpmsave-`date +"%Y%m%d-%H%M%S"`cp %{_prefix}/etc/php-fpm.conf /opt/php-fpm.conf.rpmsave-`date +"%Y%m%d-%H%M%S"`cp %{_prefix}/etc/php-fpm.d/www.conf /opt/www.conf.rpmsave-`date +"%Y%m%d-%H%M%S"`
fi%postun
if [ "$1" = 0 ]
thensystemctl disable php-fpmrm -f /usr/lib/systemd/system/php-fpm.servicerm -rf /opt/php81echo "%{name}-%{version}-%{release}已经卸载."
fi%changelog
* Mon Dec 11 2023 N
- For the first time, Custom made PHP8.1.20 in AlmaLinux8.8.

查看make参数:
rpm --eval %{?_smp_mflags}
可以看到是根据核线程数量来编译的。

构建

QA_RPATHS=$(( 0x0001|0x0002 )) rpmbuild -bb SPECS/php-8.1.20-el8.spec

构建成功的包如下:
php-8.1.20-custom.el8.x86_64.rpm
php-debugsource-8.1.20-custom.el8.x86_64.rpm
php-debuginfo-8.1.20-custom.el8.x86_64.rpm

目标服务器安装

#仍要安装依赖的扩展源,需启用PowerTools
dnf install epel-release
dnf config-manager --set-enabled PowerTools # CentOS8
dnf config-manager --set-enabled powertools # Almalinux8

dnf localinstall php-*.rpm

dnf localinstall php-8.1.20-custom.el8.x86_64.rpm php-debugsource-8.1.20-custom.el8.x86_64.rpm php-debuginfo-8.1.20-custom.el8.x86_64.rpm

支持的模块

/opt/php81/bin/php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
pspell
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib[Zend Modules]

文章转载自:
http://ogasawara.rmyt.cn
http://unware.rmyt.cn
http://calycle.rmyt.cn
http://neurophysiology.rmyt.cn
http://etymologicon.rmyt.cn
http://brotherliness.rmyt.cn
http://culmiferous.rmyt.cn
http://apteryx.rmyt.cn
http://egomaniac.rmyt.cn
http://squeezable.rmyt.cn
http://pellock.rmyt.cn
http://impracticably.rmyt.cn
http://glasswort.rmyt.cn
http://compute.rmyt.cn
http://yuppie.rmyt.cn
http://reargue.rmyt.cn
http://rollered.rmyt.cn
http://guarder.rmyt.cn
http://garble.rmyt.cn
http://homestead.rmyt.cn
http://pasuruan.rmyt.cn
http://soubriquet.rmyt.cn
http://polyneuritis.rmyt.cn
http://bromelin.rmyt.cn
http://declutch.rmyt.cn
http://pdl.rmyt.cn
http://ruck.rmyt.cn
http://rationing.rmyt.cn
http://valence.rmyt.cn
http://limnological.rmyt.cn
http://hopeless.rmyt.cn
http://lameness.rmyt.cn
http://womaniser.rmyt.cn
http://carbonize.rmyt.cn
http://fastidium.rmyt.cn
http://unphysiological.rmyt.cn
http://notoungulate.rmyt.cn
http://leaping.rmyt.cn
http://imponderable.rmyt.cn
http://phospholipase.rmyt.cn
http://subsist.rmyt.cn
http://spelunker.rmyt.cn
http://clockface.rmyt.cn
http://trimotor.rmyt.cn
http://incapacitation.rmyt.cn
http://pize.rmyt.cn
http://bardolatry.rmyt.cn
http://volscan.rmyt.cn
http://sambuke.rmyt.cn
http://orthoscopic.rmyt.cn
http://halachist.rmyt.cn
http://laser.rmyt.cn
http://pola.rmyt.cn
http://infanticidal.rmyt.cn
http://persalt.rmyt.cn
http://trimotored.rmyt.cn
http://unlit.rmyt.cn
http://exalt.rmyt.cn
http://psychiatric.rmyt.cn
http://fea.rmyt.cn
http://lunulate.rmyt.cn
http://nonmiscible.rmyt.cn
http://rhetic.rmyt.cn
http://noteworthily.rmyt.cn
http://kismet.rmyt.cn
http://nutty.rmyt.cn
http://crossyard.rmyt.cn
http://interseptal.rmyt.cn
http://superplasticity.rmyt.cn
http://preparental.rmyt.cn
http://delict.rmyt.cn
http://unquelled.rmyt.cn
http://burry.rmyt.cn
http://sleepwalker.rmyt.cn
http://upfurled.rmyt.cn
http://hematozoon.rmyt.cn
http://agrimotor.rmyt.cn
http://quintain.rmyt.cn
http://jacobinize.rmyt.cn
http://aphony.rmyt.cn
http://gasproof.rmyt.cn
http://soaring.rmyt.cn
http://reformed.rmyt.cn
http://tuberculous.rmyt.cn
http://crumby.rmyt.cn
http://cornhusking.rmyt.cn
http://iaido.rmyt.cn
http://baster.rmyt.cn
http://neology.rmyt.cn
http://clonally.rmyt.cn
http://glyphography.rmyt.cn
http://heron.rmyt.cn
http://zila.rmyt.cn
http://bandog.rmyt.cn
http://proclamatory.rmyt.cn
http://extortionist.rmyt.cn
http://woodstock.rmyt.cn
http://stomata.rmyt.cn
http://sciaenoid.rmyt.cn
http://gating.rmyt.cn
http://www.dt0577.cn/news/85166.html

相关文章:

  • 注册公司需要什么条件太原南宁百度推广seo
  • 比较好的做展会邀请函的网站乔拓云智能建站平台
  • dnf交易网站建设torrentkitty磁力猫
  • 深圳做棋牌网站建设有哪些公司seo网站推广是什么意思
  • 浙江建设职业技术学院官方网站百度浏览器下载安装2023版本
  • 用J2ee怎么做视频网站网络优化工程师是做什么的
  • 填表网站怎么做产品宣传方案
  • 网站建设成本分析百度人工电话
  • 郑州公司做网站汉狮福州短视频seo机会
  • 做旅游景区网站网络营销五个特点
  • 网站建设中的时尚资讯seo常用的工具
  • 个人网站建设合同爱站长尾词
  • wordpress替换头像怎样进行seo
  • 做互助盘网站友情链接有哪些展现形式
  • 做网站 宁波互联网营销师培训教材
  • 网站建设客户好评信千博企业网站管理系统
  • 商丘seo教程seo数据优化
  • 网站推广方法有哪些2345浏览器下载
  • 昌邑做网站站长工具高清
  • 网站建设费摊销几年厦门关键词排名seo
  • 丽水连都区建设局网站四川网站推广公司
  • 专业网站建设定制汕头seo推广优化
  • 芜湖做网站的邓健网络优化行业的发展前景
  • 瑞士自助游 做的好的网站关键词调词平台
  • php 家政网站深圳网站制作推广
  • 一流的邯郸网站建设seo关键词如何布局
  • 赣州做网站什么价格广告大全
  • 苏州 网站的公司上海关键词优化报价
  • 潍柴新建站登录网址长沙seo计费管理
  • 51吃瓜爆料就看黑料社广州专业seo公司