httpd-2.4.59 php-7.4.33 mariadb-11.3.2
useradd -s /usr/sbin/nologin user
mkdir /all_files
chown user:user /all_files
========Apache:
./configure --prefix=/all_files/http_2 --disable-log-config --with-expat=/all_files/http_2 --with-pcre=/all_files/http_2/bin/pcre2-config
make -j8
make install
========PHP:
apt-get install libxml2-dev libonig-dev
./configure --prefix=/all_files/http_2 --without-sqlite3 --without-pdo-sqlite --disable-cgi --disable-cli --enable-mysqlnd --disable-mysqlnd-compression-support --enable-mbstring --with-mysqli=mysqlnd --with-mysql-sock=/tmp/mysql.socket --with-apxs2=/all_files/http_2/bin/apxs
make -j8
make install
cp php.ini-production /all_files/http_2/conf/php.ini
==conf/httpd.conf:
User user
Group user
PHPIniDir /all_files/http_2/conf
DirectoryIndex index.html index.php
AddType application/x-httpd-php .php
==conf/php.ini
log_errors = Off
========Mariadb:
apt-get install libncurses5-dev libgnutls28-dev libbison-dev libssl-dev
cmake -DCMAKE_INSTALL_PREFIX=/all_files/http_2 -DCMAKE_BUILD_TYPE=Release
make -j8
make install
==conf/my.cnf:
[client]
socket = /tmp/mysql.socket
[mariadb]
user = user
basedir = /all_files/http_2
datadir = /all_files/http_2/htdocs/data
socket = /tmp/mysql.socket
skip-networking
skip-log-bin
scripts/mariadb-install-db --defaults-file=conf/my.cnf
su - root
bin/mariadbd-safe --defaults-file=conf/my.cnf &
bin/mariadb --defaults-file=conf/my.cnf
select user from mysql.user; //show users
drop user user@localhost; //delete user user
create user phpbb@localhost; //create user phpbb
create database phpbb; //create database
grant all on phpbb.* to phpbb@localhost; //grant phpbb to phpbb(user)
bin/mariadb-dump --defaults-file=conf/my.cnf -uphpbb phpbb > phpbb.sql
bin/mariadb --defaults-file=conf/my.cnf -uphpbb phpbb < phpbb.sql
删除 mariadb-test
========bin/starter
#!/bin/sh
case $1 in
start)
bin/apachectl start &&
bin/mariadbd-safe --defaults-file=conf/my.cnf &
;;
stop)
bin/apachectl stop &&
killall mariadbd
;;
esac
========start:
bin/starter start
bin/starter stop
========bbs/phpbb/version_helper.php
protected $host = 'localhost'