Create your own LAMP distribution, e.g. XAMPP

I want to create a standalone LAMP distro package from the source, at least as follows:
* php must have mysqli support, ldap and GD
* all required .so must be included (e.g. libpng, required by GD) (independently)

I managed to do this, but I continue to correct the quirks, so I decided to start with the widely used one, for example XAMPP, but I can not find the source that creates it (some shell script, where it records all the configuration parameters, the sources involved, etc. .).

Where can I find such script / information?

I need this so that my users have a simple installation for my software, they are not LAMP administrators.

I need XAMPP package configuration options or similar.

+3
source share
3 answers

Here are the configuration options that I used to build my own lamp.
They are extracted from CentOS rpm lamp packages.

# APACHE
cd httpd-2.2.14/
./configure \
--prefix=/opt/clamp \
--sysconfdir=/opt/clamp/etc \
--enable-auth-dbm \
--enable-cern-meta \
--enable-auth-digest \
--enable-charset-lite \
--enable-deflate \
--enable-expires \
--enable-cache \
--enable-disk-cache \
--enable-file-cache \
--enable-headers \
--enable-info \
--enable-mime-magic \
--enable-proxy \
--enable-proxy-ajp \
--enable-proxy-balancer \
--enable-proxy-connect \
--enable-proxy-ftp \
--enable-proxy-http \
--enable-rewrite \
--enable-so \
--enable-ssl
make
make install
cd ..

# MYSQL
cd mysql-5.1.44/
./configure \
--prefix=/opt/clamp \
--sysconfdir=/opt/clamp/etc \
--libexecdir=/opt/clamp/sbin \
--localstatedir=/opt/clamp/var \
--with-unix-socket-path=/opt/clamp/tmp/mysql.sock
make
make install
cd ..

# LIBS_DEP
yum install freetype
yum install freetype-devel
yum install libjpeg
yum install libjpeg-devel
yum install libpng
yum install libpng-devel
yum install libXpm
yum install libXpm-devel

# PHP
cd php-5.2.13/
./configure \
--prefix=/opt/clamp \
--sysconfdir=/opt/clamp/etc \
--with-apxs2=/opt/clamp/bin/apxs \
--with-config-file-path=/opt/clamp/etc/php.conf \
--disable-debug \
--with-pic \
--disable-rpath \
--without-pear \
--with-bz2 \
--with-curl \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--enable-gd-native-ttf \
--without-gdbm \
--with-gettext \
--with-gmp \
--with-iconv \
--with-jpeg-dir=/usr \
--with-openssl \
--with-pspell \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-sysvsem --enable-sysvshm --enable-sysvmsg \
--enable-wddx \
--with-kerberos \
--enable-ucd-snmp-hack \
--enable-shmop \
--enable-calendar \
--without-sqlite \
--enable-force-cgi-redirect \
--enable-pcntl \
--with-imap --with-imap-ssl \
--enable-mbstring \
--enable-mbregex \
--with-ncurses \
--with-gd \
--enable-bcmath \
--with-xmlrpc \
--with-ldap --with-ldap-sasl \
--with-mysql=/opt/clamp \
--with-mysqli=/opt/clamp/bin/mysql_config \
--enable-dom \
--with-pgsql \
--enable-soap \
--enable-xmlreader --enable-xmlwriter \
--enable-fastcgi 
make
make install

ln -s /opt/clamp/share/mysql/mysql.server /opt/clamp/bin/mysql.server
mkdir /opt/clamp/tmp
/bin/cp -f /root/clamp/use/etc/* /opt/clamp/etc
/bin/cp -f /root/clamp/use/run /opt/clamp
/bin/cp -f /root/clamp/use/install /opt/clamp

./bin/mysql_install_db --user=clamp \
--basedir=/opt/clamp \
--datadir=/opt/clamp/var

groupadd clamp
useradd -g clamp -s /bin/nologin -d /opt/clamp clamp
chown -R clamp.clamp /opt/clamp


# start first !!!!!!!!!

/opt/clamp/bin/mysqladmin -u root -P 3307 password 123clamp456
/opt/clamp/bin/mysqladmin -u root -p123clamp456 -P 3307 flush-privileges

/opt/clamp/bin/mysql -u root -p123clamp456 -P 3307 -e "CREATE USER 'clamp'@'%' IDENTIFIED BY '123clamp456'";
/opt/clamp/bin/mysql -u root -p123clamp456 -P 3307 -e "update mysql.user set password = PASSWORD('123clamp456') where user='clamp'";
/opt/clamp/bin/mysql -u root -p123clamp456 -P 3307 -e "GRANT ALL PRIVILEGES ON *.* TO 'clamp'@'localhost' IDENTIFIED BY '123clamp456'";
/opt/clamp/bin/mysql -u root -p123clamp456 -P 3307 -e "GRANT ALL PRIVILEGES ON *.* TO 'clamp'@'%' IDENTIFIED BY '123clamp456'";
/opt/clamp/bin/mysql -u root -p123clamp456 -P 3307 -e "flush privileges";
+2
source

You understand that you can enable these extensions inside XAMPP by simply editing the php.ini file?

Also you should use Imagick (aka ImageMagick) instead of GD, it is much faster (about 3x) and more functionality. Imagick replace GD.

I see no reason to create a custom installation, just configure the one you have.

+1
source

(, , ) Linux?????!!!!!

????!!!!!!!!!!!!!!!!!!!!

- , , , IIRC Linux.

, Puppy Linux, .

, , ( VirtualBox, , - Bochs, VMWare....).

, , LAMP ( ) XAMPP ( -, db, PERL PHP).

.

+1

Source: https://habr.com/ru/post/1735587/


All Articles