Moving YaDDNet from USA to UK
yaddnet python code (in a tar-ball) that deals with the network feeds of Yadd and DSCDecoder and injects the resulting data into the MySQLdatabase from the existing server.pip…. I need pip2… how to get it - it's no longer available from Ubuntu's apt repositories.get-pip.py at githubpython-dev from aptmy_config.h from where..?pip install MySQL-pythoncurl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py sudo python2 get-pip.py sudo apt-get install python-dev sudo wget https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h -O /usr/include/mysql/my_config.h sudo pip2 install MySQL-python
systemd systemdskip-grant-tables$ sudo systemctl stop mysql $ sudo systemctl status mysql $ sudo systemctl edit mysql
[Service] ExecStart= ExecStart=/usr/sbin/mysqld --skip-grant-tables --skip-networking
$ sudo systemctl daemon-reload $ sudo systemctl start mysql $ sudo mysql -u root
mysql> FLUSH PRIVILEGES; mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; mysql> exit
$ sudo systemctl revert mysql $ sudo systemctl daemon-reload $ sudo systemctl restart mysql
$ mysqldump -u root yadd > yadd_backup.sql
sql file containing all the existing datascp transfer to the new serverscp yaddnet_backup.sql.bz2 gm4slv@109.228.53.165:bunzip2 yaddnet_backup.sql.bz2mysql -u root yadd < yaddnet_backup.sql
/var/www/htmlsudo apt-get install php-mysql
CREATE USER 'XXXXX'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YYYYY'; GRANT ALL PRIVILEGES ON *.* TO 'XXXXX'@'localhost' WITH GRANT OPTION;
sql-mode but again the old method using *.cnf files no longer works# MySQL systemd service file [Unit] Description=MySQL Community Server After=network.target [Install] WantedBy=multi-user.target [Service] Type=notify User=mysql Group=mysql PIDFile=/run/mysqld/mysqld.pid PermissionsStartOnly=true ExecStartPre=/usr/share/mysql/mysql-systemd-start pre ExecStart=/usr/sbin/mysqld --sql-mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION TimeoutSec=infinity Restart=on-failure RuntimeDirectory=mysqld RuntimeDirectoryMode=755 LimitNOFILE=10000 # Set enviroment variable MYSQLD_PARENT_PID. This is required for restart. Environment=MYSQLD_PARENT_PID=1 ~ ~
Then
systemctl daemon-reload systemctl restart mysql
./new_tmux.sh
yaddnet.org and www.yaddnet.org → 109.228.53.165/var/www/html/pages/php/test/tmp world read/writable to allow new text files to be written there (eg REU searches etc.)@reboot sleep 60; sudo -u gm4slv /home/gm4slv/yaddnet/tmux_yadd.sh >/dev/null 2>&1 15 */4 * * * /home/gm4slv/yaddnet/purge_err.sh > /dev/null * * * * * /home/gm4slv/yaddnet/purge_tmp.sh > /dev/null
SSL certificates from Fasthost and convert Apache2 to HTTPS, per previous postsPayPal Donate buttonmercurial on new server and make new code repositorieshg init hg add hg com -m "first commit, new server"
yaddnet_repo containing the python and various bash scripts for handling incoming data and SQL injectionyaddnet_web_repo containing the html and php web pages.htaccess and .htpasswd<Directory /path/to/website/database_tweaks/config> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
.htaccess file in config directoryAuthType Basic AuthName "Password Protected Area" AuthUserFile /path/to/website/database_tweaks/config/.htpasswd Require valid-user
.htpasswd file for the user who can have access to configindex.html file) remove Indexes from apache2.conf<Directory /var/www/> Options FollowSymLinks AllowOverride None Require all granted </Directory>
<Directory /var/www/html/pages/php/test/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
— John Pumford-Green 14/04/24 18:11 BST