1
0
forked from cheng/wallet

updating instructions for restoring blog

This commit is contained in:
reaction.la 2024-10-25 00:07:13 +00:00
parent 6fcb592334
commit 230b748a09
No known key found for this signature in database
3 changed files with 31 additions and 21 deletions

View File

@ -912,6 +912,9 @@ But other systems like a `*.rpm` package, which is built by `git-buildpackage-rp
But desktop integration is kind of random. But desktop integration is kind of random.
To put a program into the desktop applications menu, put its desktop file in
`~/.local/share/applications` (which may need to be created).
Under Mate and KDE Plasma, bitcoin implements run-on-login by generating a Under Mate and KDE Plasma, bitcoin implements run-on-login by generating a
`bitcoin.desktop` file and writing it into `~/.config/autostart` `bitcoin.desktop` file and writing it into `~/.config/autostart`

View File

@ -158,6 +158,10 @@ Everyone shall be white, male, heterosexual, and vaguely Christian, even
if they quite obviously are not, but no one shall unnecessarily and if they quite obviously are not, but no one shall unnecessarily and
irrelevantly reveal their actual race, sex, religion, or political orientation. irrelevantly reveal their actual race, sex, religion, or political orientation.
No one shall be a citizen or resident of any identifiable country, as this results
in the applicability of a pile of sanctions related laws. If you are resident of
country X, this can cause problems for someone who is resident of country Y.
Unnecessarily informing people one is female or Jewish or nonwhite Unnecessarily informing people one is female or Jewish or nonwhite
should get similar treatment to unnecessarily informing people one is a should get similar treatment to unnecessarily informing people one is a
pure blooded Aryan. pure blooded Aryan.

View File

@ -1297,7 +1297,13 @@ Thus, after certbot has worked its magic, your conf file looks like
## Lemp stack on Debian ## Lemp stack on Debian
```bash ```bash
apt-get -qy update && apt-get -qy install nginx mariadb-server php php-cli php-xml php-mbstring php-mysql php7.3-fpm systemctl stop apache2
apt-get remove --purge apache2 #apache is routinely installed by default,
# and then nginix tries to respect its files and configuration,
# with confusing and disturbing results.
# Apache must die. DIE DIE DIE.
apt-get upgrade
apt-get -qy update && apt-get -qy install ufw nginx mariadb-server php php-cli php-xml php-mbstring php-mysql php-fpm
nginx -t nginx -t
ufw status verbose ufw status verbose
``` ```
@ -1395,7 +1401,7 @@ arbitrarily name `config` that specifies how your domain names are to be
handled, and how php is to be executed for each domain names. handled, and how php is to be executed for each domain names.
This config file assumes your domain is called `reaction.la` and your This config file assumes your domain is called `reaction.la` and your
service is called `php7.3-fpm.service`. Create the following config file, service is called `php-fpm.service`. Create the following config file,
substituting your actual domains for the example domains, and your actual substituting your actual domains for the example domains, and your actual
php fpm service for the fpm service. php fpm service for the fpm service.
@ -1403,8 +1409,6 @@ php fpm service for the fpm service.
nginx -t nginx -t
# find the name of your php fpm service # find the name of your php fpm service
systemctl status php* | grep fpm.service systemctl status php* | grep fpm.service
# substitute the actual php fpm service for
# php7.3-fpm.sock in the configuration file.
systemctl stop nginx systemctl stop nginx
rm -v /etc/nginx/sites-enabled/* rm -v /etc/nginx/sites-enabled/*
nano /etc/nginx/sites-enabled/config nano /etc/nginx/sites-enabled/config
@ -1426,7 +1430,7 @@ server {
} }
location ~ \.php$ { location ~ \.php$ {
include snippets/fastcgi-php.conf; include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_pass unix:/run/php/php-fpm.sock;
} }
location = /favicon.ico {access_log off; } location = /favicon.ico {access_log off; }
location = /robots.txt {access_log off; allow all; } location = /robots.txt {access_log off; allow all; }
@ -1445,7 +1449,7 @@ server {
} }
location ~ \.php$ { location ~ \.php$ {
include snippets/fastcgi-php.conf; include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_pass unix:/run/php/php-fpm.sock;
} }
location = /favicon.ico {access_log off; } location = /favicon.ico {access_log off; }
location = /robots.txt {access_log off; allow all; } location = /robots.txt {access_log off; allow all; }
@ -1467,7 +1471,7 @@ eliminates those pesky `www`s.
The root tells it where to find the actual files. The root tells it where to find the actual files.
The first location tells nginx that if a file name is not found, give a 404 rather than doing the disastrously clever stuff that it is apt to do, and the second location tells it that if a file name ends in `.php`, pass it to `php7.3-fpm.sock` (you did substitute your actual php fpm service for `php7.3-fpm.sock`, right?) The first location tells nginx that if a file name is not found, give a 404 rather than doing the disastrously clever stuff that it is apt to do, and the second location tells it that if a file name ends in `.php`, pass it to `php-fpm.sock` (you did substitute your actual php fpm service for `php-fpm.sock`, right?)
Now check that your configuration is OK with `nginx -t`, and restart nginx to read your configuration. Now check that your configuration is OK with `nginx -t`, and restart nginx to read your configuration.
@ -1675,7 +1679,7 @@ server {
} }
location ~ \.php$ { location ~ \.php$ {
include snippets/fastcgi-php.conf; include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_pass unix:/run/php/php-fpm.sock;
} }
location = /favicon.ico {access_log off; } location = /favicon.ico {access_log off; }
location = /robots.txt {access_log off; allow all; } location = /robots.txt {access_log off; allow all; }
@ -1698,7 +1702,7 @@ server {
} }
location ~ \.php$ { location ~ \.php$ {
include snippets/fastcgi-php.conf; include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_pass unix:/run/php/php-fpm.sock;
} }
location = /favicon.ico {access_log off; } location = /favicon.ico {access_log off; }
location = /robots.txt {access_log off; allow all; } location = /robots.txt {access_log off; allow all; }
@ -1783,7 +1787,7 @@ apt-get -qy install php-curl php-gd php-intl php-mbstring php-soap php-xml php-x
systemctl status php* | grep fpm.service systemctl status php* | grep fpm.service
# restart the service indicated above # restart the service indicated above
systemctl stop nginx systemctl stop nginx
systemctl stop php7.3-fpm.service systemctl stop php-fpm.service
mariadb mariadb
``` ```
@ -1820,7 +1824,7 @@ cd temp
curl -LO https://wordpress.org/latest.tar.gz curl -LO https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz tar -xzvf latest.tar.gz
cp -v wordpress/wp-config-sample.php wordpress/wp-config.php cp -v wordpress/wp-config-sample.php wordpress/wp-config.php
cp -av wordpress/. /var/www/blog.reaction.la cp -av wordpress/* /var/www/blog.reaction.la
chown -R www-data:www-data /var/www/blog.reaction.la && find /var/www -type d -exec chmod 755 {} \; && find /var/www -type f -exec chmod 644 {} \; chown -R www-data:www-data /var/www/blog.reaction.la && find /var/www -type d -exec chmod 755 {} \; && find /var/www -type f -exec chmod 644 {} \;
# so that wordpress can write to the directory # so that wordpress can write to the directory
curl -s https://api.wordpress.org/secret-key/1.1/salt/ curl -s https://api.wordpress.org/secret-key/1.1/salt/
@ -1852,7 +1856,6 @@ define( 'DB_COLLATE', 'utf8mb4_unicode_ci' );
``` ```
```bash ```bash
systemctl start php7.3-fpm.service
systemctl start nginx systemctl start nginx
``` ```
@ -1870,7 +1873,7 @@ PhpMyAdmin even though it is easer and safer.
```bash ```bash
systemctl stop nginx systemctl stop nginx
systemctl stop php7.3-fpm.service systemctl stop php-fpm.service
mdir temp && cd temp mdir temp && cd temp
fn=blogdb fn=blogdb
db=wordpress db=wordpress
@ -1879,7 +1882,7 @@ dbpass=FGikkdfj3878
mysqldump -u $dbuser --password=$dbpass $db > $fn.sql mysqldump -u $dbuser --password=$dbpass $db > $fn.sql
head -n 30 $fn.sql head -n 30 $fn.sql
zip $fn.sql.zip $fn.sql zip $fn.sql.zip $fn.sql
systemctl start php7.3-fpm.service systemctl start php-fpm.service
systemctl start nginx systemctl start nginx
``` ```
@ -1902,7 +1905,6 @@ Replace the defines for `DB_NAME`, `DB_USER`, and `DB_PASSWORD` in `wp_config.ph
```bash ```bash
systemctl stop nginx systemctl stop nginx
systemctl stop php7.3-fpm.service
# we dont want anyone browsing the blog while we are setting it up # we dont want anyone browsing the blog while we are setting it up
# nor the wordpress update service running. # nor the wordpress update service running.
mariadb mariadb
@ -1910,8 +1912,7 @@ mariadb
```sql ```sql
DROP DATABASE IF EXISTS wordpress; DROP DATABASE IF EXISTS wordpress;
CREATE DATABASE wordpress DEFAULT CHARACTER SET CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8;
utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL ON wordpress.* TO 'wordpress_user'@'localhost' GRANT ALL ON wordpress.* TO 'wordpress_user'@'localhost'
IDENTIFIED BY 'FGikkdfj3878'; IDENTIFIED BY 'FGikkdfj3878';
exit exit
@ -1923,15 +1924,19 @@ on Lemp]. Dont do that, or if you start nginx and do that to make sure
everything is working, then start over by deleting and recreating the everything is working, then start over by deleting and recreating the
database as above. database as above.
Alternatively, if you want to merge this content into an blog that has
already been setup, perhaps an almost empty blog, you remove all the drop
table commands and create table commands from the sql, and replace all the `INSERT INTO`
statements with `INSERT IGNORE INTO`
Now we will populate the database. Now we will populate the database.
```bash ```bash
tar -xvf wordpress.sql.zst
fn=wordpress fn=wordpress
db=wordpress db=wordpress
dbuser=wordpress_user dbuser=wordpress_user
dbpass=FGikkdfj3878 dbpass=FGikkdfj3878
unzip $fn.sql.zip
mv *.sql $fn.sql
mariadb -u $dbuser --password=$dbpass $db < $fn.sql mariadb -u $dbuser --password=$dbpass $db < $fn.sql
mariadb -u $dbuser --password=$dbpass $db mariadb -u $dbuser --password=$dbpass $db
``` ```
@ -1946,7 +1951,6 @@ exit
Adjust `$table_prefix = 'wp_';` in `wp_config.php` if necessary. Adjust `$table_prefix = 'wp_';` in `wp_config.php` if necessary.
```bash ```bash
systemctl start php7.3-fpm.service
systemctl start nginx systemctl start nginx
``` ```
@ -1972,7 +1976,6 @@ SELECT * FROM wp_comments l LIMIT 10;
Adjust `$table_prefix = 'wp_';` in `wp_config.php` if necessary. Adjust `$table_prefix = 'wp_';` in `wp_config.php` if necessary.
```bash ```bash
systemctl start php7.3-fpm.service
systemctl start nginx systemctl start nginx
``` ```