User Tools

Site Tools


nndocs:lamp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nndocs:lamp [2024/09/17 12:26] – [Tune Apache] add example Apache scoreboard naptasticnndocs:lamp [2024/09/17 13:51] (current) – [First, create the Universe...] We're on Debian 12 now, lol naptastic
Line 3: Line 3:
 In this guide, I'm just gonna do everything as root unless otherwise specified. In this guide, I'm just gonna do everything as root unless otherwise specified.
  
-Install Debian 7, following the [[nndocs:initial|Naptastic Initial]] guide. During the install process:+Install Debian, following the [[nndocs:initial|Naptastic Initial]] guide. During the install process:
  
   * De-select Graphical Desktop Environment and Laptop.   * De-select Graphical Desktop Environment and Laptop.
Line 130: Line 130:
   * Don't give users the root password or grant them privileges on *.*.   * Don't give users the root password or grant them privileges on *.*.
   * chmod 600    * chmod 600 
-==== PHP ==== 
- 
-You'll need these: 
- 
-  * ''apt-get -y install libxml2-dev zlib1g-dev libbz2-dev libcurl4-openssl-dev libjpeg8-dev libpng12-dev libmcrypt-dev libaspell-dev libpspell-dev libtidy-dev libxslt1-dev'' 
- 
-Download and build PHP to include everything we'll need: 
- 
-  * ''cd'' 
-  * ''<nowiki>curl http://www.php.net/get/php-7.0.16.tar.xz/from/this/mirror | xz -d | tar -x</nowiki>'' 
-  * ''cd php-7.0.16/'' 
-  * ''<nowiki>./configure --enable-fpm --prefix=/opt/php70 --enable-bcmath --enable-calendar --enable-ftp --enable-libxml --enable-mbstring --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-mcrypt --enable-pdo --enable-soap --enable-sockets --enable-wddx --with-pcre-regex --with-pdo-mysql=shared --with-pic --with-pspell --with-tidy --with-xmlrpc --with-xsl --with-zlib --with-curl --with-mysqli 
-</nowiki>'' 
-  * ''make'' 
-  * ''make install'' 
- 
-FIXME Path is wrong 
-Install ''php.ini'': 
- 
-  * ''cp php.ini-production /usr/local/lib/php.ini'' 
- 
-FIXME We use systemd service definition files now, not init scripts. 
-Install the initscript: 
- 
-  * ''cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm'' 
-  * ''chown root. !$'' 
-  * ''chmod 755 !$'' 
-  * ''update-rc.d php-fpm defaults'' 
- 
-FIXME Path is wrong 
-Install the FPM-specific configuration files. 
- 
-  * ''mkdir -p /usr/local/etc/pools.d/'' 
- 
-FIXME Path is wrong 
-Edit the file ''/usr/local/etc/php-fpm.conf'' and put this in it: 
- 
-  include=/usr/local/etc/pools.d/*.conf 
-  [global] 
-  pid = /usr/local/var/run/php-fpm.pid 
-  error_log = /var/log/php-fpm.log 
- 
-FIXME Path is wrong 
-In ''/usr/local/etc/pools.d/'', you need to create a pool definition file for every user who will be using PHP scripts. I name them ''$username.conf''. 
- 
-Here's what you put in each pool definition file: 
- 
-  [david] 
-  user = david 
-  group = david 
-   
-  listen = /usr/local/var/run/php-fpm/david.sock 
-  listen.owner = www-data 
-  listen.group = www-data 
-  listen.mode = 0660 
-   
-  pm = dynamic 
-  pm.max_children = 24 
-  pm.start_servers = 1 
-  pm.min_spare_servers = 1 
-  pm.max_spare_servers = 2 
-  pm.max_requests = 32768 
-  ;pm.status_path = /fpm-status 
- 
-FIXME Path is wrong 
- 
-Of course, change 'david' to whatever username you're using. And you might have to create /usr/local/var/run/php.fpm 
- 
-At this point, PHP-FPM is ready to start if you want. 
- 
-  * ''service php-fpm start'' 
- 
  
nndocs/lamp.1726576011.txt.gz · Last modified: 2024/09/17 12:26 by naptastic